百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

pocl

> 编程语言
开源

pocl - 便携计算语言

1.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

pocl - 便携计算语言

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

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).

Device drivers

PoCL supports several backend drivers, with different levels of maturity in terms of received testing, reliability and available features.

CPU/x86_64 is continuously tested to pass CTS, and is also able to pass >99% of all CTS tests when built with Thread or Address sanitizers. CPU driver is also tested on RISCV and ARM64; CPU driver on ARM32, i386, PPC, S390x is not tested or supported. We won't prevent building on these architectures, but we don't actively support them currently.

CTS pass rate reflects the expected pass rate of OpenCL-CTS tests when PoCL is compiled with ENABLE_CONFORMANCE=ON setting.

Driver Maturity CTS pass rate Dev. OpenCL ver. input SPIR-V
CPU/x86_64 very high 100% 3.0 1.4
CPU/RISCV high 100% 3.0 1.4
CPU/ARM64 high >99% 3.0 1.4
LevelZero high >99% 3.0 as LZ runtime
CUDA low 3.0 1.2
OpenASIP low 1.2 none
Vulkan low 3.0 ExecModel=Shader only

Supported OpenCL extensions & OpenCL C features

Support legend:

:green_circle: : Supported with all hardware & LLVM versions

:yellow_circle: : Partially supported, see notes

:red_circle: : Unsupported

empty cell : Unknown status

OpenCL extensions

Some extensions are available at Platform level:

  • cl_khr_icd - if compiled with ENABLE_ICD=1
  • cl_khr_create_command_queue
  • cl_pocl_content_size
  • cl_ext_buffer_device_address

Note that Remote devices pass-through most of their extensions, with a few exceptions; these are marked Unsupported in the table.

Extension CPU device Level Zero CUDA OpenASIP Remote
cl_exp_tensor :yellow_circle: :two: :yellow_circle: :one:
cl_exp_defined_builtin_kernels :yellow_circle: :two: :yellow_circle: :one:
cl_ext_buffer_device_address :green_circle: :yellow_circle: :one: :red_circle:
cl_ext_float_atomics :green_circle: :yellow_circle: :one: :green_circle:
cl_intel_command_queue_families :red_circle:
cl_intel_device_attribute_query :red_circle: :yellow_circle: :one:
cl_intel_required_subgroup_size :yellow_circle: :two:
cl_intel_split_work_group_barrier :red_circle: :yellow_circle: :two:
cl_intel_spirv_subgroups :red_circle: :yellow_circle: :one:
cl_intel_subgroups :yellow_circle: :two: :yellow_circle: :two:
cl_intel_subgroups_short :yellow_circle: :two: :yellow_circle: :two:
cl_intel_subgroups_char :yellow_circle: :two: :yellow_circle: :two:
cl_intel_subgroups_long :red_circle: :yellow_circle: :two:
cl_intel_subgroup_local_block_io :red_circle: :yellow_circle: :two:
cl_intel_unified_shared_memory :green_circle: :yellow_circle: :one: :red_circle:
cl_khr_3d_image_writes :green_circle: :yellow_circle: :two:
cl_khr_byte_addressable_store :green_circle: :green_circle: :green_circle:
cl_khr_device_uuid :green_circle: :green_circle: :red_circle:
cl_khr_extended_bit_ops :yellow_circle: :six:
cl_khr_global_int32_base_atomics :green_circle: :green_circle: :green_circle:
cl_khr_global_int32_extended_atomics :green_circle: :green_circle: :green_circle:
cl_khr_local_int32_base_atomics :green_circle: :green_circle: :green_circle:
cl_khr_local_int32_extended_atomics :green_circle: :green_circle: :green_circle:
cl_khr_int64_base_atomics :green_circle: :yellow_circle: :two: :one: :green_circle:
cl_khr_int64_extended_atomics :green_circle: :yellow_circle: :two: :one: :green_circle:
cl_khr_suggested_local_work_size :green_circle:
cl_khr_pci_bus_info :red_circle: :yellow_circle: :one:
cl_khr_depth_images :red_circle: :yellow_circle: :two:
cl_khr_integer_dot_product :green_circle: :yellow_circle: :one:
cl_khr_kernel_clock :yellow_circle: :two: :eight:
cl_khr_command_buffer :yellow_circle: :two: :yellow_circle: :two:
cl_khr_command_buffer_multi_device :yellow_circle: :two:
cl_khr_command_buffer_mutable_dispatch :yellow_circle: :two:
cl_khr_subgroups :yellow_circle: :two: :yellow_circle: :one: :yellow_circle: :two:
cl_khr_subgroup_ballot :yellow_circle: :two: :yellow_circle: :two:
cl_khr_subgroup_shuffle :yellow_circle: :two: :yellow_circle: :two:
cl_khr_subgroup_shuffle_relative :red_circle: :yellow_circle: :two:
cl_khr_subgroup_extended_types :red_circle: :yellow_circle: :two:
cl_khr_subgroup_non_uniform_arithmetic :red_circle: :yellow_circle: :two:
cl_khr_subgroup_non_uniform_vote :red_circle: :yellow_circle: :two:
cl_khr_subgroup_clustered_reduce :red_circle: :yellow_circle: :two:
cl_khr_il_program :yellow_circle: :three: :yellow_circle: :three: :yellow_circle: :three:
cl_khr_spir :red_circle: :red_circle: :red_circle: :red_circle: :red_circle:
cl_khr_spirv_queries :yellow_circle: :three: :yellow_circle: :three: :yellow_circle: :three:
cl_khr_spirv_no_integer_wrap_decoration :green_circle: :green_circle:
cl_khr_spirv_linkonce_odr :green_circle: :yellow_circle: :one:
cl_khr_fp16 :yellow_circle: :four: :yellow_circle: :two: :one: :yellow_circle: :seven:
cl_khr_fp64 :yellow_circle: :five: :yellow_circle: :two: :one: :green_circle:
cl_nv_device_attribute_query :red_circle: :red_circle: :green_circle: :red_circle:
cl_pocl_svm_rect :yellow_circle: :two:
cl_pocl_command_buffer_svm :yellow_circle: :two:
cl_pocl_command_buffer_host_buffer :yellow_circle: :two:

OpenCL C features

Some of these have prequisites (e.g. for __opencl_c_ext_fp64_local_atomic_add requires cl_khr_fp64 & cl_ext_float_atomics), these must be additionally supported by the device.

Features CPU device Level Zero CUDA OpenASIP Remote
__opencl_c_images :green_circle: :yellow_circle: :one:
__opencl_c_3d_image_writes :green_circle: :yellow_circle: :one:
__opencl_c_atomic_order_acq_rel :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_atomic_order_seq_cst :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_atomic_scope_device :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_atomic_scope_all_devices :green_circle: :yellow_circle: :one:
__opencl_c_generic_address_space :green_circle: :green_circle: :green_circle:
__opencl_c_work_group_collective_functions :green_circle: :green_circle:
__opencl_c_integer_dot_product_input_4x8bit :green_circle: :yellow_circle: :two: :one:
__opencl_c_integer_dot_product_input_4x8bit_packed :green_circle: :yellow_circle: :two: :one:
__opencl_c_kernel_clock_scope_device :yellow_circle: :two: :eight:
__opencl_c_kernel_clock_scope_work_group :yellow_circle: :two: :eight:
__opencl_c_kernel_clock_scope_sub_group :yellow_circle: :two: :eight:
__opencl_c_subgroups :yellow_circle: :two: :yellow_circle: :two: :one: :yellow_circle: :two:
__opencl_c_read_write_images :yellow_circle: :two: :yellow_circle: :one:
__opencl_c_program_scope_global_variables :yellow_circle: :two: :yellow_circle: :two: :green_circle:
__opencl_c_ext_fp32_global_atomic_add :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp32_local_atomic_add :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp32_global_atomic_min_max :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp32_local_atomic_min_max :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp64_global_atomic_add :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp64_local_atomic_add :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp64_global_atomic_min_max :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_ext_fp64_local_atomic_min_max :green_circle: :yellow_circle: :one: :green_circle:
__opencl_c_work_group_collective_functions :red_circle: :green_circle:

Notes

  1. Availability depends on Hardware and Runtime (LevelZero, CUDA) support; if both are available, the extensions/features are enabled by default.
  2. These extensions are only enabled when ENABLE_CONFORMANCE=OFF, because they're incomplete or fail some corner-cases or similar.
  3. These extensions are supported when PoCL is compiled with SPIR-V support.
  4. The cl_khr_fp16 extension is enabled on CPU if all of these are met:
    • both the host & device compilers support the required type (_Float16) and can emulate / execute operations on the type
    • Note: GCC only supports _Float16 since version 12
    • LLVM >= 19, ENABLE_CONFORMANCE=OFF, Linux, CpuArch != i386
  5. The cl_khr_fp64 extension is enabled by default on all CPU architectures, unless explicitly disabled.
  6. The cl_khr_extended_bit_ops is only supported with LLVM 20+.
  7. The cl_khr_fp16 is supported on CUDA devices with Compute Capability >= 6.0 only.
  8. Kernel clock functionality is only supported on native x86 CPU builds.

Supported CI environments

CI status:

Support Matrix legend:

:large_blue_diamond: Achieved status of

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cheterogeneous-parallel-programmingopencl

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言