compiler-explorer / infra

Infrastructure to set up the public Compiler Explorer instances and compilers

Home Page:https://godbolt.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

pauleonix opened this issue · comments

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.