Codeplay & Google Release Tool To Compile OpenCL C To Vulkan
Google and Codeplay have developed a new open-source tool for compiling OpenCL C code to Vulkan compute shaders.
This new tool, clspv, allows compiling a subset of the OpenCL C language to target the Vulkan API. At this stage clspv is considered a prototype and relies upon the very latest LLVM and Clang code -- it mostly comes down to being a set of LLVM passes to turn it into SPIR and then SPIR-V for consumption by Vulkan.
Before getting too excited, clspv relies upon the VK_KHR_variable_pointers and VK_KHR_16bit_storage Vulkan extensions that were just rolled out yesterday as part of Vulkan 1.0.54. This means to try out clspv you need to be using NVIDIA's new Vulkan beta driver or patches not yet merged to Mesa for Intel ANV Vulkan. There isn't yet the necessary patches/releases for RADV or AMDGPU-PRO Vulkan yet.
It will be fun to see where clspv leads and could be useful for open-source Linux compute if it ends up doing a better job with converting OpenCL C to SPIR-V for Vulkan and executing on RADV/ANV than the current various open-source OpenCL Linux driver projects.
More details on clspv via the Codeplay announcement or the code can be found via GitHub.
Add A Comment