3 ms·
That's unfortunate because OpenCL seems like a great idea. SYCL is very similar to OpenCL, except it is based on C++17 instead of C99. Not a great advantage I t
by bjourne 4y ago
That's unfortunate because OpenCL seems like a great idea. SYCL is very similar to OpenCL, except it is based on C++17 instead of C99. Not a great advantage I think because for HPC you want to get as close to the metal as possible.
- ColonelPhantom 4y agoThe main advantage of approaches like CUDA and SYCL is that host code and device code are written in the same language. That makes it easier to e.g. deal with custom structs. Also, I don't buy that C99 is that much closer to the metal than C++17. From what I've seen, a lot of code still uses C-style anyway (e.g. C arrays). C++ just adds some nice stuff like namespaces. (I think a lot of the standard library would not work GPU-side anyway, at least with CUDA/HIP.)
- bjourne 4y agoTrue, though for me, control over placement of memory buffers and low-level scheduling is way more important than C++ lambdas and getting to write kernels in the host language. Those benefits are certainly not great enough to throw the whole eco-system out and start over. :/
- ColonelPhantom 4y agoThere's honestly barely an OpenCL ecosystem to speak of. Even Blender abandoned it. Also, at least with CUDA and HIP, you need to manually malloc GPU memory, and explicitly launch GPU kernels (using <<<>>> syntax for CUDA or optionally hipLaunchKernel for HIP). Ecosystem is the main problem of anything not CUDA or sort-of compatible like HIP. A ton production GPGPU code uses CUDA.