.. _pocl-conformance: ======================= OpenCL conformance ======================= Conformance related CMake options --------------------------------- - ``-DENABLE_CONFORMANCE=ON/OFF`` Defaults to OFF. This option by itself does not guarantee OpenCL-conformant build; it merely ensures that a build fails if some CMake options which are known to result in non-conformant PoCL build are given. Only applies to CPU driver. Changes when ENABLE_CONFORMANCE is ON, the CPU drivers are built with the following changes: * read-write images are disabled (some 1D/2D image array tests fail) * the list of supported image formats is much smaller * SLEEF is always enforced for the builtin library * cl_khr_fp16 is disabled * cl_khr_subgroup_{ballot,shuffle} are disabled * cl_intel_subgroups,cl_intel_required_subgroup_size are disabled If ENABLE_CONFORMANCE is OFF, and ENABLE_HOST_CPU_DEVICES is ON, the conformance testsuite is disabled in CMake. This is because some CTS tests will fail on such build. Supported & Unsupported optional OpenCL 3.0 features ------------------------------------------------------ This list is only related to CPU devices (cpu & cpu-minimal drivers). Other drivers (CUDA, TCE etc) only support OpenCL 1.2. Note that 3.0 support on CPU devices requires LLVM 14 or newer. Supported 3.0 features: * Shared Virtual Memory * C11 atomics * 3D Image Writes * SPIR-V * Program Scope Global Variables * Subgroups * Generic Address Space Unsupported 3.0 features: * Device-side enqueue * Pipes * Non-Uniform Work Groups * Read-Write Images * Creating 2D Images from Buffers * sRGB & Depth Images * Device and Host Timer Synchronization * Intermediate Language Programs * Program Initialization and Clean-Up Kernels * Work Group Collective Functions .. _running-cts: How to run the OpenCL 3.0 conformance test suite ------------------------------------------------ You'll need to build PoCL with enabled ICD, and the ICD must be one that supports OpenCL version 3.0 (for ocl-icd, this is available since version 2.3.0). This is because while the CTS will run with 1.2 devices, it requires 3.0 headers and 3.0 ICD to build. You'll also need to enable the suite in the pocl's external test suite set. This is done by adding ``-DENABLE_TESTSUITES=conformance -DENABLE_CONFORMANCE=ON`` to the cmake command line. After this ``make prepare_examples`` fetches and prepares the conformance suite for testing. After building pocl with ``make``, the CTS can be run with ``ctest -L