Closed lucasjinreal closed 1 year ago
This is an error seen in https://github.com/facebookresearch/pytorch3d/issues/1227, but no one has really got to the bottom of it I think.
the bottom was locked by meta.
(Now reopened. I think it may have been getting unrelated comments ages ago.) I see that one comment elsewhere suggested fixing a similar problem by upgrading to cub 1.16.0
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: expected an identifier C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(379): error: expected a member name
Just had the same error when building with CUDA 11.8 and PyTorch 2.0.1 under Windows 11. Add the "-DWIN32_LEAN_AND_MEAN" flag to the nvcc_args in setup.py. This helped me.
For anyone get this error as well, I now successfully build pytorch3d on windows, here is the result:
Be note, this is not CUDA117, am using CUDA12.1
Don't know it's only cuda118 issue or anything else, but CUDA12.1 just worked.
As well, I added -DWIN32_LEAN_AND_MEAN
suggested by @zhangheng815323856
It will work.
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: expected an identifier C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(379): error: expected a member name
Just had the same error when building with CUDA 11.8 and PyTorch 2.0.1 under Windows 11. Add the "-DWIN32_LEAN_AND_MEAN" flag to the nvcc_args in setup.py. This helped me.
i just had the same problem, under the same environment but in window10 , i already add this nvcc_args = [ "-DWIN32_LEAN_AND_MEAN" ##add "-DCUDA_HAS_FP16=1", "-DCUDA_NO_HALF_OPERATORS", "-DCUDA_NO_HALF_CONVERSIONS", "-D__CUDA_NO_HALF2_OPERATORS__", ]to the setup.py but still come the same error..... @zhangheng815323856 can you help me plz!
@karaokenoway Please open a new issue.
C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(338): error: expected an identifier C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.8/include\cub/device/dispatch/dispatch_segmented_sort.cuh(379): error: expected a member name
Just had the same error when building with CUDA 11.8 and PyTorch 2.0.1 under Windows 11. Add the "-DWIN32_LEAN_AND_MEAN" flag to the nvcc_args in setup.py. This helped me.
i just had the same problem, under the same environment but in window10 , i already add this nvcc_args = [ "-DWIN32_LEAN_AND_MEAN" ##add "-DCUDA_HAS_FP16=1", "-DCUDA_NO_HALF_OPERATORS", "-DCUDA_NO_HALF_CONVERSIONS", "-D__CUDA_NO_HALF2_OPERATORS__", ]to the setup.py but still come the same error..... @zhangheng815323856 can you help me plz!
you missed comma(",") after adding content("-DWIN32_LEAN_AND_MEAN")