Giter Club home page Giter Club logo

Comments (8)

goldsborough avatar goldsborough commented on July 30, 2024

Hi, thanks for reporting this issue. This is not enough information to help me debug your issue. Please fill out this template here: https://github.com/pytorch/pytorch/blob/master/.github/ISSUE_TEMPLATE.md and update your description so that I can better understand how to fix your problem.

from extension-cpp.

kfpandayang avatar kfpandayang commented on July 30, 2024

so this issue is solved?

from extension-cpp.

goldsborough avatar goldsborough commented on July 30, 2024

Sorry, I didn't see you had updated the issue. There was no response on my comment so I thought you had solved the issue.

from extension-cpp.

goldsborough avatar goldsborough commented on July 30, 2024

I will have to investigate this. I recall running into various issues with setup.py on windows. I believe pybind11 actually requires a custom CMake setup on Windows (see here) -- setuptools may not work out of the box.

from extension-cpp.

kfpandayang avatar kfpandayang commented on July 30, 2024

OK,thank you for your response, i will try pybind cmake first

from extension-cpp.

kfpandayang avatar kfpandayang commented on July 30, 2024

I tried pybind cmake example, it works for me, but i don't know how to incorporate pybind cmake to the pytorch cpp extension build system, could you please help me?

from extension-cpp.

goldsborough avatar goldsborough commented on July 30, 2024

Can you share your CMakeLists.txt? But all you'll really need is:

Essentially everything that https://github.com/pytorch/pytorch/blob/master/torch/utils/cpp_extension.py#L213 does.

from extension-cpp.

kfpandayang avatar kfpandayang commented on July 30, 2024

I use the following CMakeLists.txt

cmake_minimum_required(VERSION 2.8.12)
project(lltm)
add_subdirectory(pybind11)
include_directories("C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Lib\site-packages\torch\lib\include")
include_directories(ENV{CUDA_PATH_V9_1}\include)
link_directories("C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\Lib\site-packages\torch\lib")
pybind11_add_module(lltm src/lltm.cpp)
target_link_libraries(lltm PRIVATE ATen)

howerver, I still got the lnk 2001 error:

lltm.obj : error LNK2001: unresolved external symbole __imp_THPVariableClass
lltm.obj : error LNK2001: unresolved external symbole "struct _object * __cdecl THPVariable_Wrap(struct torch::autograd::Variable)" (?THPVariable_Wrap@@YAPEAU_object@@uvariab
le@autograd@torch@@@z)

from extension-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.