4 ms·
The OpenCL kernel language is very similar to the CUDA one, before they started adding more C++ support. It's pretty easy to translate between the two if you do
by gcp 9y ago
The OpenCL kernel language is very similar to the CUDA one, before they started adding more C++ support. It's pretty easy to translate between the two if you don't use hw intrinsics.
And segmenting the codebase is a MAJOR feature. With CUDA you are stuck on an old compiler until NVIDIA issues an update. How anyone can think this is a good idea...
- pjmlp 9y agoBecause NVidia understands the GPU world has moved beyond C. "Designing (New) C++ Hardware” https://www.youtube.com/watch?v=86seb-iZCnI https://www.youtube.com/watch?v=86seb-iZCnI CUDA has had C++, Fortran support since the early days, with PTX for additional compiler backends added in version 1.4. That was 2007, Khronos waited until 2015 to specific similar capabilities.
- gcp 9y agoWhat GPU world though? People still write regular shaders in languages that are much more C like. People writing GPGPU code are few. Most of the DL GPU use is in Python through several layers, and in the end you are running hand-written SASS assembly sitting in an NVIDIA DLL or whatever. I guess some people must think it's handy to have C++ support in GPU kernels, or they wouldn't have added the feature. But for it to drive technology, hard to believe.
- pjmlp 9y agoThe only GPU shaders that are C like are the OpenGL ones. The Metal, DirectX, PS3, PS4, Nintendo and several middleware engines are C++ like. Also the fact that OpenCL lost to CUDA for being stuck in C for so long, shows what most GPU devs actually prefer.
- gcp 9y agoAlso the fact that OpenCL lost to CUDA for being stuck in C for so long, shows what most GPU devs actually prefer. Aw come on, you're sure it has nothing to do with the largest GPGPU vendor pushing CUDA very heavily and intentionally gutting their OpenCL tools? Or putting out a ton of very high performance libraries with no OpenCL equivalent? Putting out a shitton of marketing and tutorial videos for CUDA only? Yeah, that surely was totally unrelated. Also pushing a proprietary standard goes faster than a standardized one. No surprise there.
- pjmlp 9y agoNVidia is not the only GPU producer. If AMD, Intel and embedded OEMs actually produced quality OpenCL drivers, debugger and IDE support and libraries that could match CUDA productivity, maybe devs would bother to use C with OpenCL. Even Google decided to create their Renderscript dialect instead of supporting OpenCL on Android.