facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.81k stars 1.32k forks source link

pytroch3d installing on win11 errors #1603

Closed cmy-hhxx closed 1 year ago

cmy-hhxx commented 1 year ago

šŸ› Bugs / Unexpected behaviors

I'm trying to build pytorch3d on Windows 11 using CUDA 11.8 and PyTorch 2.0.1 but having some issues coming from CUB.

I am starting the building process on "x64 Native Tools Command Prompt for VS 2022" using a conda environment: python setup.py install What I've done so far:

following the issue#1227, I tried to copy new cub 11.7 to cuda folder, this problem solved

C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: invalid combination of type specifiers

C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: expected an identifier

C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.7/include\cub/device/dispatch/dispatch_segmented_sort.cuh(379): error: expected a member name

but get new error:

"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc" -c D:\dataset\pytorch3d-0.7.4\pytorch3d\csrc\iou_box3d\iou_box3d.cu -o build\temp.win-amd64-cpython-38\Release\dataset\pytorch3d-0.7.4\pytorch3d\csrc\iou_box3d\iou_box3d.obj -ID:\dataset\pytorch3d-0.7.4\pytorch3d\csrc -IC:\Users\Mayn\.conda\envs\pointnet\lib\site-packages\torch\include -IC:\Users\Mayn\.conda\envs\pointnet\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\Mayn\.conda\envs\pointnet\lib\site-packages\torch\include\TH -IC:\Users\Mayn\.conda\envs\pointnet\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\Mayn\.conda\envs\pointnet\include -IC:\Users\Mayn\.conda\envs\pointnet\Include -ID:\VisualStudio\VC\Tools\MSVC\14.36.32532\include -ID:\VisualStudio\VC\Tools\MSVC\14.36.32532\ATLMFC\include -ID:\VisualStudio\VC\Auxiliary\VS\include "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.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 -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
iou_box3d.cu
C:/Users/Mayn/.conda/envs/pointnet/lib/site-packages/torch/include\c10/macros/Macros.h(138): warning C4067: 预处ē†å™ØęŒ‡ä»¤åŽęœ‰ę„å¤–ę ‡č®° - åŗ”č¾“å…„ę¢č”Œē¬¦
C:/Users/Mayn/.conda/envs/pointnet/lib/site-packages/torch/include\c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator==(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=size_t, one_sided=false, <unnamed>=0]"
(61): here
            instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator!=(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=size_t, one_sided=false, <unnamed>=0]"
C:/Users/Mayn/.conda/envs/pointnet/lib/site-packages/torch/include\c10/core/TensorImpl.h(77): here

C:/Users/Mayn/.conda/envs/pointnet/lib/site-packages/torch/include\c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator==(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=size_t, one_sided=true, <unnamed>=0]"
(61): here
            instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator!=(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=size_t, one_sided=true, <unnamed>=0]"
C:/Users/Mayn/.conda/envs/pointnet/lib/site-packages/torch/include\ATen/core/qualified_name.h(73): here

C:/Users/Mayn/.conda/envs/pointnet/lib/site-packages/torch/include\c10/macros/Macros.h(138): warning C4067: 预处ē†å™ØęŒ‡ä»¤åŽęœ‰ę„å¤–ę ‡č®° - åŗ”č¾“å…„ę¢č”Œē¬¦
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\thrust/system/cuda/detail/core/agent_launcher.h(524): error: namespace "thrust::cub" has no member "DebugSyncStream"

1 error detected in the compilation of "D:/dataset/pytorch3d-0.7.4/pytorch3d/csrc/iou_box3d/iou_box3d.cu".
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\\nvcc.exe' failed with exit code 2

I tried cub 2.1.0 , doesn't work. I googled it , found nothing. Maybe I should uninstall vs2022 and install vs2019 and give it a try? Snipaste_2023-08-01_15-34-58

cmy-hhxx commented 1 year ago

problem solved. I degraded the cuda to 11.7 and follow the # 1227 instruction, pytroch3d installed successfully.