About 3 error from building wheel for pytorch3d: dispatch_segmented_sort.cuh(338/379)
Closed this issue · 2 comments
Hey guys!
If you encounter some questions like the following:
E:/NVDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: invalid combination of type specifiers E:/NVDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: expected an identifier E:/NVDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(379): error: expected a member name 3 errors detected in the compilation of "F:/Codes/GaussianObject/pytorch3d-0.7.8/pytorch3d/csrc/pulsar/cuda/renderer.backward.gpu.cu". renderer.backward.gpu.cu error: command 'E:\\NVDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\\nvcc' failed with exit code 2 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pytorch3d Running setup.py clean for pytorch3d Failed to build pytorch3d ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pytorch3d)
Try move cub dir from a new version cub(such as cub-1.17.1) dir to replace the old cub dir (such as cub in CUDA/v11.8/include) !!!
Thank you for sharing this knowledge! I was suffering greatly with this.
To add to this, instead of replacing the cub in CUDA/v11.8/include
, I just defined CUB_HOME
to point to a newer version of CUB (I used 2.1.0) as per instructions in INSTALL.md.
However, I still encountered an error:
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\thrust/system/cuda/config.h(79): 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.
I attempted to fix this by modifying setup.py
to define THRUST_IGNORE_CUB_VERSION_CHECK
as per this, but this did not fix the issue.
However, modifying config.h
within thrust to define this macro did fix the issue, as described here.
try:
setup.py add nvcc_args the line "-DWIN32_LEAN_AND_MEAN""
nvcc_args = [
"-DCUDA_HAS_FP16=1",
"-D__CUDA_NO_HALF_OPERATORS__",
"-D__CUDA_NO_HALF_CONVERSIONS__",
"-D__CUDA_NO_HALF2_OPERATORS__",
"-DWIN32_LEAN_AND_MEAN",## add this line
]