Skip to content

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 #1614

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

Closed
lucasjinreal opened this issue Aug 17, 2023 · 8 comments

Comments

@lucasjinreal
Copy link

  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
@bottler
Copy link
Contributor

bottler commented Aug 18, 2023

This is an error seen in #1227, but no one has really got to the bottom of it I think.

@lucasjinreal
Copy link
Author

the bottom was locked by meta.

@bottler
Copy link
Contributor

bottler commented Aug 21, 2023

(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

@zhangheng815323856
Copy link

  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.

@lucasjinreal
Copy link
Author

For anyone get this error as well, I now successfully build pytorch3d on windows, here is the result:

image

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.

sometimesacoder added a commit to sometimesacoder/gsgen-windows that referenced this issue Sep 30, 2023
machenmusik pushed a commit to machenmusik/gsplat that referenced this issue Oct 18, 2023
tancik pushed a commit to nerfstudio-project/gsplat that referenced this issue Oct 18, 2023
maturk pushed a commit to nerfstudio-project/gsplat that referenced this issue Oct 25, 2023
@karaokenoway
Copy link

karaokenoway commented Feb 26, 2024

  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",
"-D__CUDA_NO_HALF_OPERATORS__",
"-D__CUDA_NO_HALF_CONVERSIONS__",
"-D__CUDA_NO_HALF2_OPERATORS__",
]to the setup.py
but still come the same error..... @zhangheng815323856 can you help me plz!

@bottler
Copy link
Contributor

bottler commented Feb 26, 2024

@karaokenoway Please open a new issue.

@zhenga90
Copy link

zhenga90 commented Apr 23, 2024

  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", "-D__CUDA_NO_HALF_OPERATORS__", "-D__CUDA_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")

bwang413 pushed a commit to bwang413/Gsplat that referenced this issue May 22, 2024
scy5335 pushed a commit to scy5335/gsplat that referenced this issue Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants