2 ms·
OpenCL isn't very useful now that we have Vulkan. Its biggest advantage is that there exist C++ compilers for its kernels. But AMD's OpenCL runtime inserts exce
by Conscat 3y ago
OpenCL isn't very useful now that we have Vulkan. Its biggest advantage is that there exist C++ compilers for its kernels. But AMD's OpenCL runtime inserts excessive memory barriers not required by the spec (they won't fix this due to Hyrum's Law) and Vulkan gives you more control over the memory allocation and synchronization anyways. If we had better Vulkan shader compilers, OpenCL would serve basically no purpose, at least for AMD hardware.
- cpill 3y agoAI libs could use it and we'd break the bonds in CUDA. Also Rust might get an implementation which would give it they non-intervention to overtake C++
- pjmlp 3y agoNo it wouldn't, until it provides the same polyglot support and graphical tooling as CUDA. At least Intel is trying with oneAPI into that direction.
- raphlinus 3y agoYeah, that's a big if. In theory there's nothing preventing good compilation to Vulkan compute shaders, in practice people just aren't doing it, as CUDA actually works today. I also agree that Vulkan is more promising than OpenCL. With recent extensions, it has real pointers (buffer device address), cooperative matrix multiplication (also known as tensor cores or WMMA), scalar types other than 32 bits, proper barrier (including device-scoped, needed for single pass scan), and other important features.
- 20k 3y agoIts not that they're supporting buggy code, they just downgraded the quality of their implementation significantly. They made the compiler a lot worse when they swapped to rocm https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/issues/143 https://github.com/RadeonOpenCompute/ROCm-OpenCL-Runtime/iss... is the tracking issue for it filed a year ago, which appears to be wontfix largely because its a lot of work OpenCL still unfortunately supports quite a few things that vulkan doesn't, which makes swapping away very difficult for some use cases