This commit reduces the overall dataset size for conversion tests
while maintaining high confidence in edge-case coverage. By replacing
hardcoded arrays with a dynamically generated set of problematic
corner cases, the test execution time and memory footprint are
optimized without sacrificing strict conformance validation.
It also introduces an exhaustive testing mode (`-a` flag) to test 2^32
inputs when full coverage is explicitly desired, and corrects the
workload reduction math for Wimpy and Embedded modes. Thread safety is
guaranteed via a global `std::recursive_mutex`, and exact bit-level
deduplication using `std::unordered_set` prevents redundant
floating-point testing (e.g., collapsing NaNs or signed zeros).
Special Value Selection Strategies:
* Integer Types (Base and Conversions)
Focuses on a dense cluster of known boundary triggers rather than
sparse randoms. The generator populates a baseline pool (0 to 255),
calculates powers of 2, 3, 5, 7, and 10 up to the sign bit, and
creates bitwise combinations of repeating patterns and shifting
masks. Crucially, to catch off-by-one and alignment errors, every
base value generates its immediate neighbors (offsets from -3 to
+3), along with their bitwise NOT and sign-bit XORs.
* Floating-Point Types
Focuses strictly on precision loss and rounding boundaries. It seeds
a core set of known difficult values (-/+ INF, NaN, subnormals, and
type limits). To test exact rounding thresholds, the generator
calculates the +/- 1 ULP neighbors for every seeded value via
integer bitcasting. Finally, to guarantee coverage of saturation and
overflow thresholds, cross-type boundary values corresponding to the
specific destination type's domain limits (e.g., injecting exact
char/short limits into float inputs) are dynamically added to the
test set.
Use get_max_sub_group_size() when calculating the size of the final
subgroup in a non-uniform workgroup.
get_sub_group_size() may already return the size of the current partial
subgroup. Using it as the modulus divisor can therefore calculate an
incorrect size, split the subgroup at the wrong lane, and pass
non-uniform indices to sub_group_non_uniform_broadcast.
Signed-off-by: Riccardo Zanetti <riccardo.zanetti@arm.com>
As approved on 28Jul26 call
The compiler tests assemble SPIR-V binaries into the build directory
(COMPILER_SPV_PATH, i.e. spirv_bin) at build time, but the existing
install() rules only copied the includeTestDirectory and
secondIncludeTestDirectory resources. As a result, the spirv_bin
directory was missing from the install tree, causing the compiler tests
to fail at runtime when run from an installed location.
Add an install(DIRECTORY) rule for COMPILER_SPV_PATH so the assembled
SPIR-V binaries are placed alongside the other compiler test resources
under CMAKE_INSTALL_BINDIR.
Fixes#2746
Signed-off-by: Eric Guo <eric.guo@nxp.com>
As approved on 28Jul26 call
Related to #2623, additional cleanup corrections applied (replaced
regular cl objects with wrappers and smart pointers).
Fixes vulkan validation layer errors:
Vulkan validation layer: Validation Error: [
VUID-vkImportSemaphoreFdKHR-semaphore-01142 ] | MessageID = 0x668a54af |
vkImportSemaphoreFdKHR(): pImportSemaphoreFdInfo->semaphore can't be
called on VkSemaphore 0xfa21a40000000003[] that is currently in use by
VkSemaphore 0xfa21a40000000003[]. The Vulkan spec states: semaphore must
not be associated with any queue command that has not yet completed
execution on that queue
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkImportSemaphoreFdKHR-semaphore-01142)
Vulkan validation layer: Validation Error: [
VUID-vkFreeMemory-memory-00677 ] | MessageID = 0x485c8ea2 |
vkFreeMemory(): can't be called on VkDeviceMemory 0xe7e6d0000000000f[]
that is currently in use by VkBuffer 0x967dd1000000000e[]. The Vulkan
spec states: All submitted commands that refer to memory (via images or
buffers) must have completed execution
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkFreeMemory-memory-00677)
Vulkan validation layer: Validation Error: [
VUID-vkFreeCommandBuffers-pCommandBuffers-00047 ] Object 0: handle =
0x5ef05db4a000, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle =
0xcfef35000000000a, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID =
0x1ab902fc | vkFreeCommandBuffers(): pCommandBuffers[0] (VkCommandBuffer
0x5ef05db4a000[]) is in use. The Vulkan spec states: All elements of
pCommandBuffers must not be in the pending state
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00047)
Vulkan validation layer: Validation Error: [
VUID-vkDestroySemaphore-semaphore-05149 ] | MessageID = 0x93e24db1 |
vkDestroySemaphore(): semaphore can't be called on VkSemaphore
0xfa21a40000000003[] that is currently in use by VkSemaphore
0xfa21a40000000003[]. The Vulkan spec states: All submitted batches that
refer to semaphore must have completed execution
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkDestroySemaphore-semaphore-05149)
As approved on 28Jul26 call
Add tests for clEnqueueMapBuffer and clEnqueueUnmapMemObject with a
buffer created using a AHardwareBuffer
---------
Signed-off-by: Alex Davicenko <alex.davicenko@arm.com>
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Co-authored-by: Alex Davicenko <alex.davicenko@arm.com>
As agreed on 28Jul26 call
The OpenCL C Specification explicitly calls out that "The w component of
float4 result returned will be 0.0." but the CTS was not testing for
this.
[run-test: test_geometrics geom_cross]
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
As approved on 28Jul26 call
Related to https://github.com/KhronosGroup/OpenCL-CTS/issues/2623
Fixes vulkan validation layer error:
Vulkan validation layer: Validation Error: [
VUID-vkDestroyDevice-device-05137 ] Object 0: handle =
0xfa21a40000000003, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID =
0x4872eaa0 | vkCreateDevice(): OBJ ERROR : For VkDevice
0x5cbfef8c9530[], VkDeviceMemory 0xfa21a40000000003[] has not been
destroyed. The Vulkan spec states: All child objects created on device
must have been destroyed prior to destroying device
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
As approved on 28Jul26 call
Related to #2623
Fixes vulkan validation layer error:
Vulkan validation layer: Validation Error: [
VUID-vkDestroyDevice-device-05137 ] Object 0: handle =
0xf443490000000006, type = VK_OBJECT_TYPE_DEVICE_MEMORY; | MessageID =
0x4872eaa0 | vkCreateDevice(): OBJ ERROR : For VkDevice
0x5573db5a6f10[], VkDeviceMemory 0xf443490000000006[] has not been
destroyed. The Vulkan spec states: All child objects created on device
must have been destroyed prior to destroying device
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkDestroyDevice-device-05137)
As approved on 28Jul26 call
This patch restructures the image copy conformance tests to eliminate
unnecessary host-side memory allocations and data duplication,
significantly improving the execution speed of the test loops.
Key changes include:
* Removed the redundant `srcHost` buffer allocation and its associated
`memcpy` operation. The test loop now directly uses `srcData` for
validation.
* Split the monolithic `test_copy_image_generic` into
`test_copy_init_images` (for setup) and `test_copy_image_generic` (for
execution). This hoists buffer sizing, random data generation, and image
creation out of the inner testing loops.
* Extracted memory mapping and initialization logic from `create_image`
into a standalone `init_image` function in `common.cpp`. This allows
destination images to be efficiently reset during test iterations
without fully recreating the OpenCL memory objects.
* Consolidated scattered `extern` function declarations across all
dimension tests into a new `test_copy_generic.h` header.
* Fixed a minor typo in `test_copy_1D_buffer.cpp` where `srcImageInfo`
was incorrectly passed as the destination descriptor.
Ref #2723
[run-test: test_cl_copy_images --num-worker-threads 2 small_images]
The goal of the `link_error_returns_program` test is to verify that the
API returns a usable program object even when linking fails (so that a
build log can still be queried).
In offline compilation mode, there isn't necessarily a returned program
object to inspect, as an offline compiler may produce just a diagnostic
without any binary output. In that case there won't be a binary to load,
so skip this test for offline compilation.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
A few kernels in the SVM and C11_atomics tests use
MEMORY_SCOPE_ALL_SVM_DEVICES without querying for its support.
Added a fix to either use a narrower scope or skip the subtest
altogether if the support is not present.
…nd image creation
The format query in test_loops.cpp uses CL_MEM_WRITE_ONLY, but
test_write_*.cpp creates images with both CL_MEM_WRITE_ONLY and
CL_MEM_READ_WRITE flags. This causes test failures for formats that are
only supported with WRITE_ONLY flag (e.g., CL_RGB + CL_SIGNED_INT8).
Solution:
- Change write_only_mem_flag_types array from 2 elements to 1 element
- Only test CL_MEM_WRITE_ONLY flag for kWriteTests
- CL_MEM_READ_WRITE is already covered by kReadWriteTests which uses
read_write kernel and queries formats with CL_MEM_KERNEL_READ_AND_WRITE
Signed-off-by: jiajia Qian <jiajia.qian@nxp.com>
Related to #2623, additional cleanup corrections applied (replaced
regular cl objects with wrappers and smart pointers).
Fixes vulkan validation layer errors:
Vulkan validation layer: Validation Error: [
VUID-vkImportSemaphoreFdKHR-semaphore-01142 ] | MessageID = 0x668a54af |
vkImportSemaphoreFdKHR(): pImportSemaphoreFdInfo->semaphore can't be
called on VkSemaphore 0xfa21a40000000003[] that is currently in use by
VkSemaphore 0xfa21a40000000003[]. The Vulkan spec states: semaphore must
not be associated with any queue command that has not yet completed
execution on that queue
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkImportSemaphoreFdKHR-semaphore-01142)
Vulkan validation layer: Validation Error: [
VUID-vkFreeMemory-memory-00677 ] | MessageID = 0x485c8ea2 |
vkFreeMemory(): can't be called on VkDeviceMemory 0xe7e6d0000000000f[]
that is currently in use by VkBuffer 0x967dd1000000000e[]. The Vulkan
spec states: All submitted commands that refer to memory (via images or
buffers) must have completed execution
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkFreeMemory-memory-00677)
Vulkan validation layer: Validation Error: [
VUID-vkFreeCommandBuffers-pCommandBuffers-00047 ] Object 0: handle =
0x5ef05db4a000, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle =
0xcfef35000000000a, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID =
0x1ab902fc | vkFreeCommandBuffers(): pCommandBuffers[0] (VkCommandBuffer
0x5ef05db4a000[]) is in use. The Vulkan spec states: All elements of
pCommandBuffers must not be in the pending state
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00047)
Vulkan validation layer: Validation Error: [
VUID-vkDestroySemaphore-semaphore-05149 ] | MessageID = 0x93e24db1 |
vkDestroySemaphore(): semaphore can't be called on VkSemaphore
0xfa21a40000000003[] that is currently in use by VkSemaphore
0xfa21a40000000003[]. The Vulkan spec states: All submitted batches that
refer to semaphore must have completed execution
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkDestroySemaphore-semaphore-05149)
Previously, the select conformance test attempted to sequentially
iterate through
large ranges of 32-bit and 64-bit integers for comparison values. This
approach
was inefficient and required a "wimpy mode" to arbitrarily skip values
in order
to finish within a reasonable timeframe.
Since the OpenCL `select` built-in evaluates the Most Significant Bit
(MSB) for
vector types, exhaustive iteration of the entire integer space is
unnecessary.
This patch refactors `initCmpBuffer` to systematically generate bitmasks
that
toggle the MSB across all vector lanes, filling the remaining bits with
random
data. This ensures complete coverage of the vector selection mechanics
within a
bounded execution time.
Additionally, this patch cleans up the test harness by:
- Removing the now-obsolete wimpy mode and its custom argument parsing.
- Hoisting `src1` and `src2` host-to-device buffer writes outside of the
main
vector loop, as these buffers only depend on the source type and do not
need
to be re-written for every vector size iteration.
Related to #2623
Fixes vulkan validation layer errors:
Vulkan validation layer: Validation Error: [
VUID-vkImportSemaphoreFdKHR-semaphore-01142 ] | MessageID = 0x668a54af |
vkImportSemaphoreFdKHR(): pImportSemaphoreFdInfo->semaphore can't be
called on VkSemaphore 0xfa21a40000000003[] that is currently in use by
VkSemaphore 0xfa21a40000000003[]. The Vulkan spec states: semaphore must
not be associated with any queue command that has not yet completed
execution on that queue
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkImportSemaphoreFdKHR-semaphore-01142)
Vulkan validation layer: Validation Error: [
VUID-vkFreeMemory-memory-00677 ] | MessageID = 0x485c8ea2 |
vkFreeMemory(): can't be called on VkDeviceMemory 0xe7e6d0000000000f[]
that is currently in use by VkBuffer 0x967dd1000000000e[]. The Vulkan
spec states: All submitted commands that refer to memory (via images or
buffers) must have completed execution
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkFreeMemory-memory-00677)
Vulkan validation layer: Validation Error: [
VUID-vkFreeCommandBuffers-pCommandBuffers-00047 ] Object 0: handle =
0x5ef05db4a000, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle =
0xcfef35000000000a, type = VK_OBJECT_TYPE_COMMAND_POOL; | MessageID =
0x1ab902fc | vkFreeCommandBuffers(): pCommandBuffers[0] (VkCommandBuffer
0x5ef05db4a000[]) is in use. The Vulkan spec states: All elements of
pCommandBuffers must not be in the pending state
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkFreeCommandBuffers-pCommandBuffers-00047)
Vulkan validation layer: Validation Error: [
VUID-vkDestroySemaphore-semaphore-05149 ] | MessageID = 0x93e24db1 |
vkDestroySemaphore(): semaphore can't be called on VkSemaphore
0xfa21a40000000003[] that is currently in use by VkSemaphore
0xfa21a40000000003[]. The Vulkan spec states: All submitted batches that
refer to semaphore must have completed execution
(https://vulkan.lunarg.com/doc/view/1.3.275.0/linux/1.3-extensions/vkspec.html#VUID-vkDestroySemaphore-semaphore-05149)
Merged as agreed on 14Jul26 call
This patch removes the use of global state across the image conformance
tests and replaces it with a passed `context_t` structure.
The goal of this change is to be able to run `image_streams` in parallel
by removing global variables as they were not thread-safe. This
refactoring had to be applied everywhere because `image_streams` needs
to update `test_format_set_fn`, which is used by all the image tests.
Key changes:
* Removed global flags such as `gTestSmallImages`, `gTestMipmaps`,
`gDebugTrace`, `gEnablePitch`, etc.
* Initialized a `context_t` struct in the `main.cpp` files to store test
configuration.
* Updated test function signatures across `clCopyImage`, `clFillImage`,
`clGetInfo`, and `kernel_read_write` to accept `const context_t &ctx`.
[run-test: test_image_streams --num-worker-threads 2 CL_A
CL_FILTER_NEAREST 1D]
Merged as agreed on 14Jul26 call
This patch consolidates the hardcoded arrays of edge-case test values
from multiple individual test files into a single, shared location.
Merged as agreed on 14Jul26 call
The CTS kernel in `test_conformance/basic/test_work_item_functions.cpp`
used the deprecated `__OPENCL_VERSION__` preprocessor macro to guard
calls to `get_enqueued_local_size()` and `get_global_offset()`.
Merged as agreed on 14Jul26 call
Replace std::make_pair with explicit pair construction to fix GCC ABI
warning
Explicit std::pair<OutType, OutType> construction avoids the template
instantiation in std::make_pair that triggers GCC 10.1+ ABI
compatibility warnings between C++14 and C++17 parameter passing
conventions.
Signed-off-by: Antonios Christidis <a-christidis@ti.com>
Merged as agreed on 14Jul26 call
Modernizes the vector alignment conformance tests by replacing slow
nested procedural loops with thread pool parallelization, significantly
improving test execution times on multi-core systems.
Merged as agreed on 14Jul26 call
Split the `tests` job into three separate jobs:
- `check-triggers`: Parses triggers on pull requests.
- `build-pocl`: Builds and caches POCL. Runs on pushes to any branch or
when tests are triggered on PRs.
- `tests`: Runs the tests using the cached POCL.
This allows the POCL build to run on pushes to populate the cache,
ensuring subsequent PRs have a cache hit and don't need to rebuild POCL.
Isolate 'set_kernel_exec_info_kernel' into its own program source string
to prevent compilation failures on OpenCL 3.0 devices that only support
OpenCL C 1.2.
The 'set_kernel_exec_info_kernel' uses a struct containing a pointer
member (`__global BufPtr* buffer`), which is passed directly as a kernel
argument. This construct triggers a multi-level pointer evaluation
(`__global int **`) that violates Section 6.11.a of the OpenCL C 1.2
Specification.
Previously, this kernel was bundled inside
`clone_kernel_test_kernel`. On devices running OpenCL 3.0 but defaulting
to OpenCL C 1.2 build options, the compiler would reject the entire
source string, causing all unrelated `clone_kernel` API tests to fail
program compilation.
This change extracts the problematic kernel into a dedicated
`clone_kernel_exec_info_kernel` source, ensuring it is only compiled
when SVM features are verified and active, preserving test suite
conformance on 1.2-only compilers.
The purpose of test_allocations is to check that the device can allocate
the requested memory sizes successfully. To ensure that the allocated
memory is correctly allocated and writable by the device, a checksum
kernel is then enqueued on the entire buffer/image.
Without subdividing the work into multiple dispatches, image tests risk
triggering timeouts on slower devices. This can trigger, for example,
ANRs on
Android (https://developer.android.com/topic/performance/vitals/anr).
Maintain the core logic of the test, but split the verification kernel
into multiple dispatches, where each can finish safely within a timeout.
[run-test: test_allocations single 5 image2d_read]
[run-test: test_allocations multiple 5 image2d_read]
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Update the behaviour of `test_spirv_new` so that the default relative
path is resolved in relation to the path of the executable, not the
current working directory.
`--spirv-binaries-path` can now handle absolute and relative paths.
Remove the redundant path override from the CSV files, as it is setting
it to the default.
---------
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
The function explicitly casts to float but was returning double, causing
an unnecessary implicit float-to-double conversion.
Signed-off-by: Antonios Christidis <a-christidis@ti.com>
For replication, setup info:
GCC: 16.1
glibc: 2.43
target architecture build: aarch64
Config used to setup Yocto layers:
[Config](https://git.ti.com/cgit/arago-project/oe-layersetup/tree/configs/arago-master-config.txt)
While building Yocto wrynose, recipe in meta-oe layer, following error
appears multiple times:
```
test_conformance/commonfns/test_binary_fn.cpp:274:40: required from here
274 | error = test_binary_fn<cl_half>(device, context, queue, num_elems,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
275 | fnName.c_str(), vecParam,
| ~~~~~~~~~~~~~~~~~~~~~~~~~
276 | max_verify<cl_half>);
| ~~~~~~~~~~~~~~~~~~~~
test_conformance/commonfns/test_binary_fn.cpp:219:72: error: format '%g' expects argument of type 'double', but argument 8 has type 'int' [-Werror=format=]
219 | log_error("x[%d]=%g y[%d]=%g out[%d]=%g, expected %g. "
| ~^
| |
| double
| %d
......
223 | conv_to_flt(out[k]), v, k, i, j, vecSize);
| ~
| |
| int
```
The [commonfns: fix type mismatches across function
templates](d85a92794a)
patch fixes the above. This is also the only format error when building,
so
[commonfns: Remove -Wno-format
flag](5b099b9c63)
re-enables -W-format
---------
Signed-off-by: Antonios Christidis <a-christidis@ti.com>
The OpenCL C 3.1 printf length modifiers `t` and `z` require arguments
of type `ptrdiff_t` and `size_t` respectively. For implementations where
`CL_DEVICE_ADDRESS_BITS == 64`, these types are 64-bit, but the
`ptrdiff_t` and `size_t` printf tests pass integer literals such as 10
as a 32-bit `int` argument.
For example, the following calls use the same format string, but pass
arguments with different widths:
printf("%5td\n", 10); // int
printf("%5td\n", 10000000000L); // long
A variadic printf implementation cannot work around this type mismatch,
as it cannot know whether to read 32 or 64 bits from the vararg slot.
Fix by explicitly casting the argument to the tested type.
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
According to the OpenCL specification (Section 5.6.2), clLinkProgram
must return a valid non-zero cl_program object when a linker failure
occurs (setting errcode_ret to CL_LINK_PROGRAM_FAILURE). This allows
applications to query the build log via clGetProgramBuildInfo to
diagnose the linking errors.
See:
https://registry.khronos.org/OpenCL/specs/unified/refpages/man/html/clLinkProgram.html
This commit adds a test case that compiles a kernel with an unresolved
symbol, links it, and asserts that a valid program object is returned
along with CL_LINK_PROGRAM_FAILURE, and that the build log is queryable.
As approved on 7Jul26 call
Fixes#955
@kpet @bashbaug I've noticed procedure `clBuildProgram` does not return
`CL_LINKER_NOT_AVAILABLE`, only `CL_COMPILER_NOT_AVAILABLE`. Is this
intentional ? What if compiler is available but linker isn't ? Should it
still return `CL_COMPILER_NOT_AVAILABLE` ? Thanks
Approved for merge on 7Jul26 call
For replication, setup info:
- GCC: 16.1
- glibc: 2.43
- target architecture build: aarch64
- Config used to setup Yocto layers:
[Config](https://git.ti.com/cgit/arago-project/oe-layersetup/tree/configs/arago-master-config.txt)
While building Yocto wrynose, recipe in meta-oe layer, following errors
appeared:
1\)
```
test_conformance/commonfns/test_unary_fn.cpp:113:21: error: variable 'j' set but not used [-Werror=unused-but-set-variable=]
113 | for (int i = 0, j = 0; i < n; i++, j++)
| ^
cc1plus: all warnings being treated as errors
```
2)
```
test_conformance/extensions/cl_khr_command_buffer/command_buffer_printf.cpp:286:25: error: array subscript -1 is outside array bounds of 'signed char []' [-Werror=array-bounds=]
286 | pattern.back() = '\0';
| ~~~~~~~~~~~~^~
cc1plus: all warnings being treated as errors
```
Patches [test_unary_fn: Remove unused variable
j](51cab19be5)
and [command_buffer_printf: Fix out of bounds pattern
array](1080490bd8)
solve the above.
I am also including [c11_atomics: Remove -Wno-format
flag](d2607370de)
as there are no format errors that come from c11_atomics dir.
---------
Signed-off-by: Antonios Christidis <a-christidis@ti.com>
Merged as agreed on 30Jun26 call
The first patch is fixing a simple logic mistake when calculating the
amount of sub-groups in the very unlikely case that a local size of 170
creates only uniform subgroups (e.g. when the subgroup size is 2).
The second test solves a edge case behavior with `get_sub_group_size()`
because it's return value is actually implementation defined as per the
[OpenCL C
spec:](https://registry.khronos.org/OpenCL/specs/unified/html/OpenCL_C.html#:~:text=get%5Fsub%5Fgroup%5Fsize)
and it's legal to return e.g. 8 for a sub-group with just 2 work-items.
> Returns the number of work-items in the sub-group. This value is no
more than the maximum sub-group size and is implementation-defined based
on a combination of the compiled kernel and the dispatch dimensions.
This will be a constant value for the lifetime of the sub-group.
Merged as agreed on 30Jun26 call
`get_device_spirv_il_version` in the test harness has to be manually
updated for every new SPIR-V version released. In this instance it was
incorrectly reporting the highest version as 1.5 when it should be 1.6.
Update the helper function to parse the provided space-separated version
string and pick the "best" version available, i.e. the newest one.
Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
Merged as agreed on 30Jun26 call
The primary goal of this commit is to improve CI tracking by
introducing a new golden format that can differentiate test results
based on command-line arguments. To cleanly extract and pass these
arguments into the JSON result outputs, the command-line parsing
infrastructure across the CTS required a significant refactoring.
Key changes include:
* Enhanced CI Tracking: Updates `ci/compare_results.py`,
`ci/pocl/golden.json`, and `saveResultsToJson` to include and evaluate
an `args` key. The golden JSON now uses a nested format mapping
specific argument strings (e.g., `--wimpy -1`) to their expected
results, allowing the CI to validate the same binary run under
different parameters.
* Centralized Parsing Infrastructure: Introduces the `ParseArgsFn`
callback and `runTestHarnessWithCheckAndParse`. This offloads custom
argument parsing from individual test `main()` functions and safely
extracts the arguments used so they can be logged by the test harness.
* Help Text Consolidation: Replaces fragmented `printUsage()`
functions with unified `help` string references populated directly by
the standard parsing callbacks.
As agreed on 30Jun26 call
Fixes the following issues:
1. Incorrect suppression condition in sections 2 & 3
Both sections use if (errors > 10) twice instead of having a trigger
condition (errors == 10). As a result, the "Suppressing further
results..." message never prints, and errors are skipped silently.
2. Incorrect pass reporting in section 3
Since errors are global, earlier sub-tests may already push it beyond
10. Section 3 then immediately skips error handling (due to errors >
10), including setting pass = 0, and incorrectly reports "Passed" even
when errors occur.
3. Repeated suppression message in section 1
When errors == 10, the code prints the suppression message and continues
without incrementing errors. This causes the condition to remain true,
printing the message repeatedly for every subsequent error instead of
just once, while doing nothing else.