Commit Graph

1699 Commits

Author SHA1 Message Date
Sven van Haastregt
591a736918 vectors: improve error messages (#2609)
Clarify that the first number is the work-item.

Print hexadecimal numbers with a `0x` prefix.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2026-01-28 11:14:45 -08:00
Marcin Hajder
6f38c799c1 Added support for cl_ext_float_atomics in CBasicTestFetchAddSpecialFloats with atomic_half (#2386)
Related to #2142, according to the work plan, extending
CBasicTestFetchAddSpecialFloats with support for atomic_half.
2026-01-27 08:46:57 -08:00
Jose Lopez
584f27afd4 Clean up cl_khr_external_semaphore_dx_fence test (#2580)
Removes the duplicated code from the tests. Improves the Base test
class.
2026-01-20 23:32:26 +05:30
Krzysztof Gibala
5af0e74ef4 Add cl_khr_icd_unloadable to the list of known_extensions (#2605)
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>

Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
2026-01-20 09:59:56 -08:00
Grzegorz Wawiorko
e076b4a9e9 Fix test_atomics - wrong HostDataType taken for comparing (#2601)
We see compiler errors on Intel GPU without this fix.
2026-01-13 09:51:17 -08:00
Michael Rizkalla
b681d4f2c8 Add cl_ext_immutable_memory_objects tests writing to and from buffer (#2432)
This change extends the test coverage for
https://github.com/KhronosGroup/OpenCL-Docs/pull/1280

The change tests:
1. Writing to immutable buffers.
2. Writing to buffer/image from immutable buffers.
3. Reading from immutable buffers.

This change adds the following tests:
1. `test_negative_imagearraycopy`
2. `test_negative_imagearraycopy3d`
3. `test_immutable_bufferreadwriterect`
4. `test_immutable_arrayreadwrite`
5. `test_write_from_immutable_buffer_to_buffer`
6. `test_immutable_buffer_map_*`

and extends the following tests:
1. `test_arrayimagecopy3d`
2. `test_arrayimagecopy`
3. `test_imagearraycopy3d`
4. `test_imagearraycopy`
5. `test_buffer_copy`
6. `test_buffer_partial_copy`

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
2026-01-13 17:46:02 +00:00
Marcin Hajder
02a3c7e609 Replaced test values for hexfloat and printf to avoid ambiguity (#2425)
Fixes #1335 according to the issue description. 

@alycm replaced with straightforward values in terms of hex float
representation
2026-01-13 10:44:39 -07:00
Michael Rizkalla
6774fc1dc3 Add negative tests for context API functions (#2494)
This PR adds negative tests for the following API functions:

- clCreateContext
- clCreateContextFromType
- clRetainContext
- clReleaseContext
- clSetContextDestructorCallback

Also, define a new macro `test_object_failure_ret` to test for an
expected error code and the returned object is `NULL` as a result of a
failure.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
2026-01-13 17:43:13 +00:00
Ahmed Hesham
b460aae39d Add AHB sub buffer test (#2592)
Add test for clCreateSubBuffer using a buffer created from a
AHardwareBuffer

Signed-off-by: Alex Davicenko <alex.davicenko@arm.com>
Co-authored-by: Alex Davicenko <alex.davicenko@arm.com>
2025-12-16 17:25:44 +00:00
Romaric Jodin
6b20272159 fix compiler/options_build_optimizations (#2595)
We need to define -cl-std when compiling with option not in 1.0.
2025-12-16 17:23:37 +00:00
Yilong Guo
119af24d54 c11_atomics: unify host half representation and conversion with wrapper class (#2503)
Introduce `HostHalf` wrapper class to eliminate explicit
`cl_half_from_float`
and `cl_half_to_float` conversions throughout the test code. The wrapper
provides semantic value constructors/operators and automatic
conversions,
simplifying half-precision arithmetic operations.

Key improvements:
- `HostHalf` class with operator overloading for arithmetic and
comparisons
- Type traits `is_host_atomic_fp_v` and `is_host_fp_v` for generic FP
handling
- Unified floating-point atomic operations (add/sub/min/max/exchange)
- Removed 300+ lines of half-specific conditional branches
- Consistent calculation for all FP types
2025-12-16 08:37:33 -08:00
Marcin Hajder
67fbbe4ee2 Unified cl_khr_external_semaphore tests using the same export and import scheme (#2591)
Due to discussion from #2542 and following work from closed PR #2568

This change refactors the external semaphore tests by unifying
`external_semaphores_import_export_fd` with
`external_semaphores_cross_context` tests, removing duplicated logic and
avoiding OS-specific conditions. The updated test now covers all
import/export handle types consistently across single- and multi-context
scenarios.
v2025-12-09-03
2025-12-09 23:40:56 +05:30
Xin Jin
afb6f6519c Tighten AHB buffer row pitch in test_cl_khr_external_memory_ahb test (#2594)
What was wrong:
enqueue_copy_buffer_to_image (and the related write/fill tests) mis-set
imageInfo.rowPitch to width*height*pixelSize. Because get_image_size
multiplies row pitch by height, this wrongly calculates the intended
buffer size.

How it’s fixed: set rowPitch to the true per-line pitch
(width*pixelSize) for all buffer-backed image cases so the calculated
sizes match the actual data layout and stay within the expected memory
footprint.

Signed-off-by: Xin Jin <xin.jin@arm.com>
2025-12-09 23:36:57 +05:30
Marcin Hajder
68c3eec051 Remove overwrite of CMAKE_CXX_FLAGS from cl_khr_external_semaphore test (#2596)
Fixes #2430
2025-12-09 08:40:39 -08:00
Marcin Hajder
5179e06ed9 Added test to verify reqd_work_group_size attribute with cl_khr_command_buffer extension (#2583)
Fixes #2501 according to issue description

---------

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
2025-12-09 08:37:12 -08:00
gtrebuchet-arm
bd167754d9 Add multi device and negative tests for cl_ext_buffer_device_address (#2561)
The tests checks that invalid parameters for
clSetKernelArgDevicePointerEXT are reported successfully and ensure that
a kernel can access a buffer from their respective device address on
each device in a multi device context.

Signed-off-by: Guillaume Trebuchet <guillaume.trebuchet@arm.com>
2025-12-02 09:40:16 -08:00
Ahmed Hesham
b0876629f8 Add AHB lifetime test (#2569)
Add lifetime test for AHardwareBuffer in which for both CL Buffers and
CL Images the following steps are taken
 - Create AHB
 - Create mem object from the AHB
 - Release the AHB
 - Read and write from and to the mem object
 - Verify the reads and write have happened sucessfully

The CL implementation should maintain a reference count to the AHB since
the AHB must not be deallocated for the test to pass.

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>
2025-12-02 09:36:36 -08:00
Michael Rizkalla
011caecb57 Implement negative tests for cl_device_id API functions (#2495)
Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
Co-authored-by: Chetankumar Mistry <chetan.mistry@arm.com>
2025-12-02 09:34:45 -08:00
Marcin Hajder
0c064ac017 Added a test case for printing an empty string (#2590)
Fixes #2364 according to issue description
2025-12-02 08:41:36 -08:00
Marcin Hajder
0cca0ee869 Added support for cl_ext_float_atomics in CBasicTestFetchSub with atomic_double (#2368)
Related to #2142, according to the work plan, extending
CBasicTestFetchSub with support for atomic_double.
2025-12-02 08:39:16 -08:00
dependabot[bot]
2bb364bb1d Bump actions/checkout from 5 to 6 in the github-actions group (#2589)
Bumps the github-actions group with 1 update:
[actions/checkout](https://github.com/actions/checkout).

Updates `actions/checkout` from 5 to 6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>v6-beta by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2298">actions/checkout#2298</a></li>
<li>update readme/changelog for v6 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2311">actions/checkout#2311</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v5.0.0...v6.0.0">https://github.com/actions/checkout/compare/v5.0.0...v6.0.0</a></p>
<h2>v6-beta</h2>
<h2>What's Changed</h2>
<p>Updated persist-credentials to store the credentials under
<code>$RUNNER_TEMP</code> instead of directly in the local git
config.</p>
<p>This requires a minimum Actions Runner version of <a
href="https://github.com/actions/runner/releases/tag/v2.329.0">v2.329.0</a>
to access the persisted credentials for <a
href="https://docs.github.com/en/actions/tutorials/use-containerized-services/create-a-docker-container-action">Docker
container action</a> scenarios.</p>
<h2>v5.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v5...v5.0.1">https://github.com/actions/checkout/compare/v5...v5.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>V6.0.0</h2>
<ul>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
</ul>
<h2>V5.0.1</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<h2>V5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>V4.3.1</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<h2>V4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<h2>v4.2.0</h2>
<ul>
<li>Add Ref and Commit outputs by <a
href="https://github.com/lucacome"><code>@​lucacome</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li>
<li>Dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>- <a
href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>,
<a
href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li>
</ul>
<h2>v4.1.7</h2>
<ul>
<li>Bump the minor-npm-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li>
<li>Check out other refs/* by commit by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li>
<li>Pin actions/checkout's own workflows to a known, good, stable
version. by <a href="https://github.com/jww3"><code>@​jww3</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li>
</ul>
<h2>v4.1.6</h2>
<ul>
<li>Check platform to set archive extension appropriately by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li>
</ul>
<h2>v4.1.5</h2>
<ul>
<li>Update NPM dependencies by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li>
<li>Bump github/codeql-action from 2 to 3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li>
<li>Bump actions/setup-node from 1 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li>
<li>Bump actions/upload-artifact from 2 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1af3b93b68"><code>1af3b93</code></a>
update readme/changelog for v6 (<a
href="https://redirect.github.com/actions/checkout/issues/2311">#2311</a>)</li>
<li><a
href="71cf2267d8"><code>71cf226</code></a>
v6-beta (<a
href="https://redirect.github.com/actions/checkout/issues/2298">#2298</a>)</li>
<li><a
href="069c695914"><code>069c695</code></a>
Persist creds to a separate file (<a
href="https://redirect.github.com/actions/checkout/issues/2286">#2286</a>)</li>
<li><a
href="ff7abcd0c3"><code>ff7abcd</code></a>
Update README to include Node.js 24 support details and requirements (<a
href="https://redirect.github.com/actions/checkout/issues/2248">#2248</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-01 07:10:53 -08:00
Romaric Jodin
5846e9bc59 include algorithm for std::min(list) (#2587)
std::min(list) is defined in algorithm. Some setup might work without
it, but other require it to find the proper definition.

Otherwise it can lead to compilation error:
```
OpenCL-CTS/test_conformance/extensions/cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch/mutable_command_full_dispatch.cpp:141:22: error: no matching function for call to 'min'
  141 |         group_size = std::min(
      |                      ^~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate function template not viable: requires 2 arguments, but 1 was provided
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate function template not viable: requires 3 arguments, but 1 was provided
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
2025-11-27 07:42:35 +00:00
alan-baker
d1b75bd200 c11_atomics: Filter invalid memory orders for 2 order instructions (#2506)
* OpenCL C (and SPIR-V) require that the failure memory order is not
stronger than the success memory order.

Also see Khronos internal memory model issue #181

CC @bashbaug
2025-11-26 16:25:46 -08:00
vangthao95
2174715160 Fix incompatiable pointer type warning for device_execution test (#2558)
There are multiple incompatiable pointer types warnings when compiling
the device_execution test with clang. There was an upstream llvm patch
that will turn these warnings into an error
https://github.com/llvm/llvm-project/pull/157364.

To not encounter this issue in the future, fix these warnings by
changing the parameter types.

```
warning: incompatible pointer types passing '__global ulong (*)[512]' (aka '__global unsigned long (*)[512]') to parameter of type 'const __generic ulong *' (aka 'const __generic unsigned long *') [-Wincompatible-pointer-types]
   37 |         void (^checkBlock) (void) = ^{ check_res(tid, &value, res); };
      |                                                       ^~~~~~
note: passing argument to parameter 'value' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
   10 |   void (^kernelBlock)(void) = ^{ block_fn(len, val); };
      |                                                ^~~
note: passing argument to parameter 'val' here
```
2025-11-26 16:25:02 -08:00
Jose Lopez
5b2c1acd78 Add clFinish to compiler multiple_build_program test before building again (#2574)
[clBuildProgram](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clBuildProgram)
has the next error condition:

>
[CL_INVALID_OPERATION](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#CL_INVALID_OPERATION)
if there are kernel objects attached to program.

The test needs to wait for the NDRangeKernel to finish in order to build
the program again. If not, kernel0 might still have references and
therefore still be attached to program.
2025-11-26 16:24:03 -08:00
Nadezhda Samartseva
65fd490bc9 Registration for the profiling_timebase test has been changed: version 2.1 is now required. (#2584)
This fix is necessary to install the minimum version of OpenCL in the
profiling_timebase test. This test uses clGetDeviceAndHostTimer,
available only since version 2.1.
fix #2582
2025-11-26 16:23:34 -08:00
Michael Rizkalla
c0e6447961 Implement negative tests for clEnqueueMarkerWithWaitList (#2502)
This change adds negative tests for `clEnqueueMarkerWithWaitList`

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
2025-11-26 16:20:46 -08:00
Ewan Crawford
34e9baecda Test mutable command-buffer deferred kernel arguments (#2538)
Tests the scenario outlined in
https://github.com/KhronosGroup/OpenCL-CTS/issues/2520#issuecomment-3280930492
to verify the functionality added in OpenCL-Docs PR
https://github.com/KhronosGroup/OpenCL-Docs/pull/1382.

Closes #2520

---------

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
2025-11-26 16:19:59 -08:00
Romaric Jodin
df46a38e31 Better support for -cl-uniform-work-group-size (#2564)
Add support for build options available only after a certain version:
- -cl-uniform-work-group-size after 2.0
- -cl-no-subgroup-ifp after 2.1

Add specific test for cl-uniform-work-group-size
- Check that test can be executed when work group size is uniform.
- Check that test returns the proper error code when work group size is
not uniform.

Ref #2563
2025-11-26 16:19:33 -08:00
Ole Strohm
b7808f2b2d Limit work group size by the max item size in mutable_command_full_dispatch (#2578)
The maximum value for the workgroup size in a specific dimension can be
lower than the overall maximum workgroup size. This patch queries for
the maximum work item size in the first dimension and limits the
group_size by that value as well.

Signed-off-by: Ole Strohm <ole.strohm@arm.com>
2025-11-26 16:19:03 -08:00
Ben Ashbaugh
0da389cedb temporarily disable the negative_invalid_arg_size_local test (#2573)
Temporarily disable the negative_invalid_arg_size_local test, pending
working group discussion.
2025-11-26 16:11:20 -08:00
Ben Ashbaugh
afc7e64c57 fix the null required work group size test (#2576)
A 3D required work-group size is always valid, but a 1D or 2D required
work-group size is only valid when the work-group size in those
dimensions is equal to one.

fixes #2575
2025-11-26 16:10:47 -08:00
Ben Ashbaugh
02e99f4554 fixes a warning and a typo in the mutable dispatch test (#2579)
Fixes a warning in the mutable dispatch test with some compilers:

```
3>C:\git\OpenCL-CTS\test_conformance\extensions\cl_khr_command_buffer\cl_khr_command_buffer_mutable_dispatch\mutable_command_basic.h(82,16): warning C4805: '==': unsafe mix of type 'int' and type 'bool' in operation
```

Also fixes a misspelled variable name while we're at it.
2025-11-18 15:06:57 -08:00
Marcin Hajder
ec546b80c5 Added an in-order queue variant for the semaphores_import_export_fd test (#2542)
Fixes #2213 according to mentioned discussion
2025-11-18 08:53:42 -08:00
Marcin Hajder
6b59cae6e9 Added test to verify process of building a kernel with long name (#2559)
Closes #2422 according to issue description
2025-11-18 08:52:03 -08:00
Marcin Hajder
3d038fb7ea Added a test for semaphore payloads that are ignored (#2554)
Fixes #2384 according to issue description
2025-11-18 08:51:41 -08:00
paulfradgley
7e26e3b555 Replace error code for invalid size negative test 2025-11-18 15:26:52 +00:00
Ben Ashbaugh
9736cd0b67 switch the return type for is_extension_available to bool (#2581)
from a review comment:
https://github.com/KhronosGroup/OpenCL-CTS/pull/2579#pullrequestreview-3463737641

We should use `bool` as the return type for `is_extension_available`,
not `int`.
2025-11-17 08:21:08 -08:00
Ben Ashbaugh
e641de99a5 add test for a NULL local work size and a required work-group size (#2514)
see #2501 

This tests the following scenarios:

1. Execute a kernel with a required work-group size, passing `NULL` as
the local work size.
2. Query the suggested work-group size for a kernel with a required
work-group size.
2025-11-04 08:50:30 -08:00
gorazd-sumkovski-arm
9abcd0054c Add ThreadSanitizer option (#2560)
Add the `SANITIZER_THREAD` CMake option which will add the
`-fsanitize=thread` flag to the compiler and linker when enabled.
2025-11-04 08:44:31 -08:00
Marcin Hajder
941f7edb95 Added coverage of using multiple kernels created from the same source program with different builds (#2537)
Fixes #2164 according to issue description
2025-11-04 08:41:26 -08:00
Ahmed Hesham
ba991c0152 Add negative test for AHB (#2539)
Add a wrapper around AHB for proper resource deallocation and refactor
existing tests to use the wrapper.
Add a negative test for AHB to test for error codes when calling
clCreateImageWithProperties and clCreateBufferWithProperties.

---------

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>
2025-10-28 23:00:30 +05:30
Ahmed
c6e0f416e7 Specify memory scope and memory order for the atomic operations in generic_address_space generic_atomics_variant generic_atomics_invariant (#2550)
Use the explicit version of the atomic_load/store and atomic_fetch_add
with memory order relaxed and memory scope workgroup to allow devices
that only support the minimum CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES which
are (CL_DEVICE_ATOMIC_ORDER_RELAXED | CL_DEVICE_ATOMIC_SCOPE_WORK_GROUP)
to run the tests.

The test should only require the relaxed ordering and memory scope
workgroup anyway.

From the specificiation:

"The non-explicit atomic_store function requires support for OpenCL C
2.0, or OpenCL C 3.0 or newer and both the
__opencl_c_atomic_order_seq_cst and __opencl_c_atomic_scope_device
features"

"The non-explicit atomic_load function requires support for OpenCL C 2.0
or OpenCL C 3.0 or newer and both the __opencl_c_atomic_order_seq_cst
and __opencl_c_atomic_scope_device features."

"The non-explicit atomic_fetch_key functions require support for OpenCL
C 2.0, or OpenCL C 3.0 or newer and both the
__opencl_c_atomic_order_seq_cst and __opencl_c_atomic_scope_device
features."
2025-10-28 09:04:51 -07:00
Sergiu Bogdan Popescu
d63cc8ce5d Modified kernel code to correspond to the Image declared format (CL_UNSIGNED_INT8) (#2512)
**For mutable_dispatch_image_1d_arguments &
mutable_dispatch_image_2d_arguments:**
As the images are created using CL_UNSIGNED_INT8, the kernel does not
use correct instructions, as they are designed for signed variable. This
fix consists of modifying the kernel code to use unsigned instructions
and auxiliary variables .
2025-10-28 09:01:42 -07:00
Jose Lopez
580fde7501 Replace unique_ptr for vectors in atomics_indexed_cases (#2557)
Use vectors instead of unique_ptr for buffers data
2025-10-28 08:55:41 -07:00
Jose Lopez
16cd0afe4f Add case for clSetKernelExecInfo with empty set (#2551)
Adds a special case to ensure that calling `clSetKernelExecInfo` with
`CL_KERNEL_EXEC_INFO_SVM_PTRS` and an empty set of pointers is valid
2025-10-28 08:54:41 -07:00
Daniel Crawley
39f961b71f Match spv and api version for Vulkan test (#2536)
- Vulkan api version is 1_1, so target env for shaders should be
vulkan1.1
2025-10-28 08:53:54 -07:00
Ahmed
1a4862e84e Use a more genuine kernel for the command buffer device enqueue negative test (#2532)
The current one has no arguments and does not enqueue any work.
2025-10-28 08:50:08 -07:00
Sreelakshmi Haridas Maruthur
74ebc67294 Fix channel count for RGBx (#2493)
RGBx is defined as a 4 channel format where the 4th channel is ignored
(5.3.1.1)
2025-10-28 08:49:14 -07:00
Marcin Hajder
d0aa95be2f Added support for cl_ext_float_atomics in CBasicTestFetchSub with atomic_float (#2367)
Related to #2142, according to the work plan, extending
CBasicTestFetchSub with support for atomic_float.
2025-10-28 08:41:24 -07:00