4 ms·
C++ for gpgpu was more of an afterthought in nvcc, wasn't it. I would be surprised if not most cuda kernels are written in plain C.
by andi999 5y ago
C++ for gpgpu was more of an afterthought in nvcc, wasn't it. I would be surprised if not most cuda kernels are written in plain C.
- pjmlp 5y agoNot at all, it was one of the reasons why OpenCL lost, by staying too long focused on C. CUDA supports C++ since version 3.0, and NVidia designs the cards to follow C++ semantics, regardless of the polyglot capabilities from PTX. Hardly an afterthought, it was Khronos that became surprised that most researchers don't want to use plain old C on their research efforts.
- andi999 5y agoGood to know. Do you have further reading material on this?
- pjmlp 5y agoSure, "CppCon 2016: “Bringing Clang and C++ to GPUs: An Open-Source, CUDA-Compatible GPU C++ Compiler" https://www.youtube.com/watch?v=KHa-OSrZPGo https://www.youtube.com/watch?v=KHa-OSrZPGo "CppCon 2019: Olivier Giroux “The One-Decade Task: Putting std::atomic in CUDA.”" https://www.youtube.com/watch?v=VogqOscJYvk https://www.youtube.com/watch?v=VogqOscJYvk "Octane render. The Future of GPU Rendering: Real-Time Raytracing" (with CUDA) https://www.youtube.com/watch?v=wGTIGjgXs6M https://www.youtube.com/watch?v=wGTIGjgXs6M NVIDIA HPC SDK https://developer.nvidia.com/hpc-sdk https://developer.nvidia.com/hpc-sdk