Skip to content
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

Allow usage of C++20 library features with CUDA 12 nvcc #1310

Open
pauleonix opened this issue May 21, 2024 · 0 comments
Open

Allow usage of C++20 library features with CUDA 12 nvcc #1310

pauleonix opened this issue May 21, 2024 · 0 comments

Comments

@pauleonix
Copy link

pauleonix commented May 21, 2024

CUDA 12 supports C++20 but depends on the host compiler for library features like iterator concepts (I think CCCL trunk's libcu++ might also provide these specifically as cuda::std:: but that is beside the point). At the moment all CUDA versions are installed on top of some old GCC (10.2.0) which doesn't ship these features: Example

According to Spack's internals

  • CUDA >= 11.5 supports GCC 11.1
  • CUDA >= 11.6 supports GCC 11.2
  • CUDA >= 12.0 supports GCC 12
  • CUDA >= 12.4 supports GCC 13 (although there have been some problems with CUDA 12.4.0 concerning GCC 13 prompting fixes in CUDA 12.4.1)

It is possible to change the host compiler (and therefore the standard library, I guess. If I get the right path I would try it out.) using nvcc's -ccbin, but I think it would be cool if each CUDA version on Compiler Explorer would just use the newest supported GCC out of the box.

If the paths to other host compilers were listed (or at least a list of them linked) somewhere in the GUI for easy access usage would be even more flexible as one might want to use e.g. clang++ instead of g++ as host compiler).

Ideally one would have both I guess - better defaults and easier access to paths for customization.

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

1 participant