Author Topic: Codeplay Release “clspv”, an OpenCL Tool for Vulkan Enabled Devices  (Read 624 times)

0 Members and 1 Guest are viewing this topic.


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4032
    • View Profile
 In collaboration with Google, Codeplay is proud to announce the release of a new open-source tool allowing the compilation of OpenCL C language kernels to run on the Vulkan API.

Vulkan is a low-overhead, cross-platform 3D graphics and compute API, available on the Android, Linux, and Windows platforms. OpenCL C is the kernel language used in the OpenCL API allowing developers to program for execution on heterogeneous devices.
The tool, named 'clspv', allows a subset of the OpenCL C language to be targeted at the Vulkan API. This tool allows developers to port code containing more than a million lines of OpenCL C to run on the Vulkan API.
As active members of the Khronos Vulkan working group, Codeplay has been instrumental in pushing two extensions that the clspv codebase requires - VK_KHR_variable_pointers and VK_KHR_16bit_storage, which were announced yesterday by Khronos.
The tool source code is available at and is available under the Apache 2.0 open source license.
Some notes on the clspv:
  • [size=1.1rem]This is a prototype, with known issues.  However, it does compile significant portions of kernels[/size]
  • [/size][size=1.1rem]It uses close to top-of-tree versions of LLVM and Clang as third-party projects - this is not a fork[/size]
  • [/size][size=1.1rem]It is mainly a set of LLVM module passes. The flow starts with the SPIR code generated from stock Clang, then massages it into SPIR-V for Vulkan[/size]
  • [/size][size=1.1rem]It exercises SPV_KHR_variable_pointers (rev13)[/size]