-
Notifications
You must be signed in to change notification settings - Fork 526
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
[Feature Request] support -std=c++17
#755
Comments
I just found the reason: CUDA 10.1 doesn't support C++ 17. |
cuda<=10 doesn't support `-std=c++17`, but conda compilers will add it into the flag. We can friendly remove such flag to prevent users go here and ask deepmodeling#428. fix deepmodeling#755.
It seems that CUDA 11.1 does not support c++17 either. I was building with gcc 8.4 and cudatoolkit 11.1 and got the same error. Changing it to std=c++11 solved the problem. |
I can reproduce |
NVIDIA announced CUDA 11 supports c++17. I don't know why it still doesn't work. |
CUDA 11 has included cub, so we don't need to include it any more. cub can be upgraded along with the CUDA Toolkit to obtain bugfixes. See https://github.com/NVIDIA/cub#releases. See also https://github.com/NVIDIA/cub/blob/main/CHANGELOG.md. P.S. It's still unclear to me that which version of C++ it supports. From the changelog, maybe C++ 17 is supported in CUDA 11.2? (deepmodeling#755)
CUDA 11 has included cub, so we don't need to include it any more. cub can be upgraded along with the CUDA Toolkit to obtain bugfixes. See https://github.com/NVIDIA/cub#releases. See also https://github.com/NVIDIA/cub/blob/main/CHANGELOG.md. P.S. It's still unclear to me that which version of C++ it supports. From the changelog, maybe C++ 17 is supported in CUDA 11.2? (deepmodeling#755)
CUDA 11 has included cub, so we don't need to include it any more. cub can be upgraded along with the CUDA Toolkit to obtain bugfixes. See https://github.com/NVIDIA/cub#releases. See also https://github.com/NVIDIA/cub/blob/main/CHANGELOG.md. P.S. It's still unclear to me that which version of C++ it supports. From the changelog, maybe C++ 17 is supported in CUDA 11.2? (#755)
cuda<=10 doesn't support `-std=c++17`, but conda compilers will add it into the flag. We can friendly remove such flag to prevent users go here and ask deepmodeling#428. fix deepmodeling#755.
CUDA 11 has included cub, so we don't need to include it any more. cub can be upgraded along with the CUDA Toolkit to obtain bugfixes. See https://github.com/NVIDIA/cub#releases. See also https://github.com/NVIDIA/cub/blob/main/CHANGELOG.md. P.S. It's still unclear to me that which version of C++ it supports. From the changelog, maybe C++ 17 is supported in CUDA 11.2? (deepmodeling#755)
Summary
When add
-std=c++17
toCXXFLAGS
(this is the default environment variables of conda compilers), CUDA files will throw the following errors (CPU version works well). It works after changing-std=c++17
to-std=c++11
.It's not a bug, but I hope
-std=c++17
can be supported on some day.UPDATE: I am not sure whether it's a bug. Maybe CMake should set the proper C++ standard option?
Detailed Description
Further Information, Files, and Links
The text was updated successfully, but these errors were encountered: