Codeplay & Google Release Tool To Compile OpenCL C To Vulkan
Written by Michael Larabel in Standards on 14 July 2017 at 08:58 AM EDT. Add A Comment
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.
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter or contacted via

Related Standards News
Popular News