-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link error with roi_align and nms with Visual Studio 2017 #51
Comments
Also tried with MSVC tools 14.10.25017. Same result. |
I think the problem is, that the linker does not link the torch core libraries: libTHC.lib & libTH.lib (see https://pytorch.org/blog/a-tour-of-pytorch-internals-2/) For some reason, those libraries are not installed in venv\Lib\site-packages\torch\lib and I am not sure why. I used: |
It looks like extension support for Windows is generally experimental: I also see a lot of 'cp' in exp_utils.py. |
I have the same problem with you. How did you solve this link error? |
I switched to Linux, there it runs without major problems. |
Yes, it did not work in windows. In Linux, it works fine. |
When calling build.py for "roi_align", I am getting the following link error with Visual Studio 2017.
I am not sure why, TH.h contains only template definitions, so there shouldn't be any library dependency right? Same problem with nms.
Creating library .\Release\_crop_and_resize.lib and object .\Release\_crop_and_resize.exp LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_zero crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_data crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_resize4d crop_and_resize.obj : error LNK2001: unresolved external symbol __imp_THFloatTensor_size [....]
The linker call is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/lib/x64" "/LIBPATH:C:\Program Files\NVIDIA Corporation\NvToolsExt\/lib/x64" /LIBPATH:D:\stewun\mdf\medicaldetectiontoolkit\venv\lib\site-packages\torch\utils\ffi\..\..\lib /LIBPATH:D:\stewun\mdf\medicaldetectiontoolkit\venv\libs /LIBPATH:D:\stewun\WinPython3.6.5\python-3.6.5.amd64\libs /LIBPATH:D:\stewun\WinPython3.6.5\python-3.6.5.amd64 /LIBPATH:D:\stewun\mdf\medicaldetectiontoolkit\venv\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit__crop_and_resize .\Release\_crop_and_resize.obj .\Release\stewun\mdf\medicaldetectiontoolkit\cuda_functions\roi_align_3D\roi_align\src\crop_and_resize.obj .\Release\stewun\mdf\medicaldetectiontoolkit\cuda_functions\roi_align_3D\roi_align\src\crop_and_resize_gpu.obj D:\stewun\mdf\medicaldetectiontoolkit\cuda_functions\roi_align_3D\roi_align\src/cuda/crop_and_resize_kernel.cu.o /OUT:.\_crop_and_resize.pyd /IMPLIB:.\Release\_crop_and_resize.lib
The text was updated successfully, but these errors were encountered: