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.
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.
In order to build PoCL, you need the following support libraries and tools:
libclang-dev, libclang-cpp-dev, libllvm-dev, zlib1g-dev,
libtinfo-dev...)libhwloc-dev)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).
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 |
:green_circle: : Supported with all hardware & LLVM versions
:yellow_circle: : Partially supported, see notes
:red_circle: : Unsupported
empty cell : Unknown status
Some extensions are available at Platform level:
cl_khr_icd - if compiled with ENABLE_ICD=1cl_khr_create_command_queuecl_pocl_content_sizecl_ext_buffer_device_addressNote 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: |
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: |
cl_khr_fp16 extension is enabled on CPU if all of these are met:cl_khr_fp64 extension is enabled by default on all CPU architectures,
unless explicitly disabled.cl_khr_extended_bit_ops is only supported with LLVM 20+.cl_khr_fp16 is supported on CUDA devices with Compute Capability >= 6.0 only.:large_blue_diamond: Achieved status of
暂无开放 Issues,或尚未同步最近议题。