3 ms·
C++20 would be news to me. Do you have a reference? The closest I can find is https://github.com/NVIDIA/cccl https://github.com/NVIDIA/cccl which seems to be at
by JonChesterfield 3y ago
C++20 would be news to me. Do you have a reference? The closest I can find is https://github.com/NVIDIA/cccl https://github.com/NVIDIA/cccl which seems to be atomic and bits of algorithm. E.g. can you point to unordered_map that works on the target?
I think some pieces of libc++ work but don't know of any testing or documentation effort to track what parts, nor of any explicit handling in the source tree.
- SubjectToChange 3y agoIIRC, CUDA Toolkit 12.0 added partial support for C++20 in nvcc and nvrtc.
- pjmlp 3y agoYes, it is right there on the documentation. https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#c-20-language-features https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.... Existing restrictions, https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#cpp20 https://docs.nvidia.com/cuda/cuda-c-programming-guide/index....
- JonChesterfield 3y agoWell, the docs say C++ support. There's a reference to <type_traits> and a lot of limitations on what you can do with lambda. I don't see supporting evidence that the rest of libc++ exists. I think what they mean is some syntax from C++20 is implemented, but the C++ library is not. By "run C on the GPU" I'm thinking of taking programs and compiling them for the GPU. The lua interpreter, sqlite, stuff like that. I'm personally interested in running llvm on one. Not taking existing code, deleting almost all uses of libc or libc++ from it, then strategically annotating it with host/device/global noise and partitioning it into host and target programs with explicit data transfer. That is, I don't consider "you can port it to cuda with some modern C++ syntax" to be "you can run C++", what with them being different languages and all. So it doesn't look like Nvidia have beaten us to shipping this yet. Thank you for the reference. Edit: a better link might be https://nvidia.github.io/libcudacxx/standard_api.html https://nvidia.github.io/libcudacxx/standard_api.html which shows an effort to port libc++, but it's early days for it. No STL data structures in there.