kpet/clvk

Implementation of OpenCL 3.0 on Vulkan

What it solves

clvk provides a conformant implementation of the OpenCL 3.0 standard, allowing OpenCL applications to run on any hardware that supports Vulkan. This effectively bridges the gap between the OpenCL framework and Vulkan-based GPUs, enabling broader hardware compatibility for compute workloads.

How it works

clvk acts as a translation layer. It uses the clspv compiler to compile OpenCL kernels into SPIR-V, which is the binary format used by Vulkan. It then maps OpenCL API calls to corresponding Vulkan commands to execute these kernels on the GPU.

Who it’s for

  • Developers who want to run OpenCL-based software on platforms where a native OpenCL driver is missing or inadequate.
  • System Integrators targeting platforms like Android or Raspberry Pi where Vulkan support is more prevalent than OpenCL.

Highlights

  • OpenCL 3.0 Conformant: Implements the standard to ensure compatibility with a wide range of applications.
  • Cross-Platform Support: Buildable for Linux, macOS, Windows, and Android.
  • Performance Tuning: Supports configurable batching and grouping of commands to optimize latency and throughput.
  • Observability: Integrated support for Perfetto traces and global timing information for performance analysis.
  • ICD Loader Support: Compatible with the cl_khr_icd extension, allowing it to be used seamlessly with the OpenCL ICD Loader.

Related

  • Project
  • Project
  • Project
  • Project
  • Project