GitHunt
MA

pocl - Portable Computing Language

Portable Computing Language (PoCL)

PoCL is a conformant implementation (for CPU
and Level Zero GPU targets)
of the OpenCL 3.0 standard which can be easily adapted for new targets.

Official web page

Full documentation

OpenSSF Best Practices
Coverity Scan Build Status

Building

This section contains instructions for building PoCL in its default
configuration and a subset of driver backends. You can find the full build
instructions including a list of available options
in the install guide.

Requirements

In order to build PoCL, you need the following support libraries and
tools:

  • Latest released version of LLVM & Clang
  • development files for LLVM & Clang + their transitive dependencies
    (e.g. libclang-dev, libclang-cpp-dev, libllvm-dev, zlib1g-dev,
    libtinfo-dev...)
  • CMake 3.15 or newer
  • GNU make or ninja
  • Optional: pkg-config
  • Optional: hwloc v1.0 or newer (e.g. libhwloc-dev)
  • Optional (but enabled by default): python3 (for support of LLVM bitcode with SPIR target)
  • Optional: llvm-spirv (version-compatible with LLVM) and spirv-tools
    (required for SPIR-V support in CPU / CUDA; Vulkan driver supports SPIR-V through clspv)

For more details, consult the install guide.

Building PoCL follows the usual CMake build steps. Note however, that PoCL
can be used from the build directory (without installing it system-wide).

Supported environments

CI status:

x86-64
x86-64
ARM64
CUDA
Level Zero
OpenASIP+Vulkan
Remote
Apple Silicon
Windows

Support Matrix legend:

๐Ÿ”ท Achieved status of OpenCL conformant implementation

๐Ÿ”ถ Tested in CI extensively, including OpenCL-CTS tests

๐ŸŸข : Tested in CI

๐ŸŸก : Should work, but is untested

โŒ : Unsupported

Linux

CPU device LLVM 14 LLVM 15 LLVM 16 LLVM 17 LLVM 18 LLVM 19 LLVM 20
x86-64 ๐ŸŸข ๐ŸŸข ๐ŸŸข ๐ŸŸข ๐ŸŸข ๐Ÿ”ท ๐Ÿ”ถ ๐Ÿ”ถ
ARM64 ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸข ๐ŸŸก
i686 ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก
ARM32 ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก
RISC-V ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก
PowerPC ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก
GPU device LLVM 17 LLVM 18 LLVM 19 LLVM 20
CUDA SM5.0 ๐ŸŸก ๐ŸŸข ๐ŸŸข ๐ŸŸก
CUDA SM other than 5.0 ๐ŸŸก ๐ŸŸก ๐ŸŸก ๐ŸŸก
Level Zero ๐ŸŸก ๐ŸŸข ๐ŸŸข ๐Ÿ”ถ
Vulkan ๐ŸŸข โŒ โŒ โŒ
Special device LLVM 17 LLVM 18 LLVM 19 LLVM 20
OpenASIP ๐ŸŸข โŒ โŒ โŒ
Remote ๐ŸŸก ๐ŸŸข ๐ŸŸก ๐ŸŸก
Remote + RDMA ๐ŸŸก ๐ŸŸข ๐ŸŸก ๐ŸŸก

Mac OS X

CPU device LLVM 17 LLVM 18 LLVM 19 LLVM 20
Apple Silicon ๐ŸŸข ๐ŸŸข โŒ โŒ
Intel CPU ๐ŸŸก ๐ŸŸก โŒ โŒ

Windows

CPU device LLVM 18 LLVM 19 LLVM 20
MinGW / x86-64 ๐ŸŸข ๐ŸŸข ๐ŸŸก
MSVC / x86-64 ๐ŸŸข ๐ŸŸข ๐ŸŸก

Binary packages

Linux distros

PoCL with CPU device support can be found on many linux distribution managers.
See latest packaged version(s)

PoCL with CUDA driver

PoCL with CUDA driver support for Linux x86_64, aarch64 and ppc64le
can be found on conda-forge distribution and can be installed with

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh   # install mambaforge

To install pocl with cuda driver

mamba install pocl-cuda

To install all drivers

mamba install pocl

macOS

Homebrew

PoCL with CPU driver support Intel and Apple Silicon chips can be
found on homebrew and can be installed with

brew install pocl

Note that this installs an ICD loader from KhronoGroup and the builtin
OpenCL implementation will be invisible when your application is linked
to this loader.

Conda

PoCL with CPU driver support Intel and Apple Silicon chips
can be found on conda-forge distribution and can be installed with

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash Mambaforge-$(uname)-$(uname -m).sh

To install the CPU driver

mamba install pocl

Note that this installs an ICD loader from KhronosGroup and the builtin
OpenCL implementation will be invisible when your application is linked
to this loader. To make both pocl and the builtin OpenCL implementaiton
visible, do

mamba install pocl ocl_icd_wrapper_apple

License

PoCL is distributed under the terms of the MIT license. Contributions are expected
to be made with the same terms.

Languages

C57.7%LLVM21.9%C++16.6%CMake2.3%Python0.8%Shell0.3%Ruby0.2%Dockerfile0.2%Cuda0.0%Gnuplot0.0%PowerShell0.0%
MIT License
Created May 7, 2020
Updated April 22, 2025