3 ms·
You can use Vulkan as a pretty much direct replacement for OpenCL
by waiseristy 7y ago
You can use Vulkan as a pretty much direct replacement for OpenCL
- bilbo0s 7y agoNo you can't, because Vulkan forbids the kernel execution model. So that's a huge gotcha that a lot of beginners fall into. Only the shader execution model is usable in Vulkan. Both Vulkan Shader Language and OpenCL get you SPIR-V code, but they are not drop in replacements for each other. In practice, you have to use CUDA or OpenCL. CUDA, because everyone uses it. OpenCL because it runs everywhere and you can easily translate all the opensource CUDA into OpenCL without as many gotchas as trying to get to Vulkan Shading Language.
- pjmlp 7y agoOpenCL doesn't run on Android. Google has the poorly documented C99 dialect named Renderscript. Some OEMs do actually ship OpenCL drivers, which can only be safely accessed via a device specific SDK.
- waiseristy 7y agoWhat's so bad with rewriting your kernels for Vulkan compute? This is what I have done up to this point as I refuse to use CUDA