-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Error building from source | Windows 10; torch 1.7.0; CUDA 11.4 #843
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
Comments
I also tried building pytorch3d version 0.4.0 as it doesn't have sample_pdf and got new error: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/include\thrust/system/cuda/config.h(78): fatal error C1189: #error: The version of CUB in your include path is not compatible with this release of Thrust. CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. Define THRUST_IGNORE_CUB_VERSION_CHECK to ignore this. |
After I deleted environment variable CUB_HOME and built 0.4.0, the error is: C:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\detail/common.h(108): warning C4005: 'HAVE_SNPRINTF': macro redefinition C:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\cast.h(1503): error: too few arguments for template template parameter "Tuple" 2 errors detected in the compilation of "c:/pytorch3d-0.4.0/pytorch3d/csrc/blending/sigmoid_alpha_blend.cu". |
Several things going on:
|
|
In your new version, you are missing the first
|
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe -c C:\pytorch3d-main\pytorch3d\csrc\ball_query\ball_query.cu -o build\temp.win-amd64-3.8\Release\pytorch3d-main\pytorch3d\csrc\ball_query\ball_query.obj -IC:\pytorch3d-main\pytorch3d\csrc -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\include" -IC:\Users\PC\AppData\Local\Programs\Python\Python38\include -IC:\Users\PC\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -std=c++14 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --use-local-env C:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\cast.h(1503): error: too few arguments for template template parameter "Tuple" 2 errors detected in the compilation of "c:/pytorch3d-main/pytorch3d/csrc/ball_query/ball_query.cu".
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\bin\nvcc.exe -c C:\pytorch3d-0.4.0\pytorch3d\csrc\blending\sigmoid_alpha_blend.cu -o build\temp.win-amd64-3.8\Release\pytorch3d-0.4.0\pytorch3d\csrc\blending\sigmoid_alpha_blend.obj -IC:\pytorch3d-0.4.0\pytorch3d\csrc -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\TH -IC:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.4\include" -IC:\Users\PC\AppData\Local\Programs\Python\Python38\include -IC:\Users\PC\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -std=c++14 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --use-local-env C:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\pybind11\cast.h(1503): error: too few arguments for template template parameter "Tuple" 2 errors detected in the compilation of "c:/pytorch3d-0.4.0/pytorch3d/csrc/blending/sigmoid_alpha_blend.cu". |
The change to sigmoid_alpha_blend.cu should look like this |
Yeah, it worked. Built 0.4.0. Thanks a lot!!! |
Summary: Remove use of nonstandard C++. Noticed on windows in issue #843. (We use `__restrict__` in CUDA, where it is fine, even on windows) Reviewed By: nikhilaravi Differential Revision: D31006516 fbshipit-source-id: 929ba9b3216cb70fad3ffa3274c910618d83973f
Summary: Unlike other cu files, sigmoid_alpha_blend uses torch/extension.h. Avoid for possible build speed win and because of a reported problem #843 on windows with CUDA 11.4. Reviewed By: nikhilaravi Differential Revision: D31054121 fbshipit-source-id: 53a1f985a1695a044dfd2ee1a5b0adabdf280595
After I run python setup.py develop, I get the following error:
log_ninja_enabled.txt
log_ninja_disabled.txt
C:\Users\PC\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\include\ATen/core/ivalue_inl.h(389): warning C4101: 'e': unreferenced local variable
C:\pytorch3d-main\pytorch3d\csrc\sample_pdf\sample_pdf_cpu.cpp(35): error C2146: syntax error: missing ';' before identifier 'output_p'
C:\pytorch3d-main\pytorch3d\csrc\sample_pdf\sample_pdf_cpu.cpp(35): error C2065: 'output_p': undeclared identifier
C:\pytorch3d-main\pytorch3d\csrc\sample_pdf\sample_pdf_cpu.cpp(67): error C2065: 'output_p': undeclared identifier
C:\pytorch3d-main\pytorch3d\csrc\sample_pdf\sample_pdf_cpu.cpp(96): error C2065: 'output_p': undeclared identifier
C:\pytorch3d-main\pytorch3d\csrc\sample_pdf\sample_pdf_cpu.cpp(97): error C2065: 'output_p': undeclared identifier
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX86\x64\cl.exe' failed with exit status 2
Could you please give some clarification on what I'm doing wrong
The text was updated successfully, but these errors were encountered: