26 Commits

Author SHA1 Message Date
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
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
Karol Herbst
678ad78233 Remove semaphores_simple_2 and external_semaphores_simple_2 tests (#2447)
While the cl_khr_semaphore extension spec does state that are no
implicit dependencies between already enqueued commands and the
clEnqueueSignalSemaphoresKHR, it's nothing special as this is already
true for any other event that's not a barrier or marker.

Also, the CTS can't reliably assume implementations to reorder events
even in an out of order queue as this is highly implementation defined
behavior and implementations may or may not choose to reorder events in
a specific order.

I don't see a reason why this should be tested for semaphores, but not
for any other commands, especially as it imposes a restriction on how to
implement out of order queues that wasn't enforced before.

Closes: https://github.com/KhronosGroup/OpenCL-CTS/issues/2439
2025-08-05 09:10:00 -07:00
Kévin Petit
9fc0d23b4c Define SubDevicesScopeGuarded in the harness and remove duplicate copies (#2379)
Signed-off-by: Kévin Petit <kpet@free.fr>
2025-04-21 11:16:17 +01:00
Ahmed Hesham
90524879e4 Migrate extensions suites to the new test registration framework (#2334)
This covers:
* cl_ext_cxx_for_opencl
* cl_khr_command_buffer
* cl_khr_command_buffer/cl_khr_command_buffer_mutable_dispatch
* cl_khr_dx9_media_sharing
* cl_khr_external_semaphore
* cl_khr_kernel_clock
* cl_khr_semaphore

Contributes to #2181.

---------

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2025-04-16 11:14:34 +01:00
Marcin Hajder
4e00778b93 Modernization of semaphores_negative_create_invalid_device related to creating sub-devices (#2307)
Due to the improvements developed during work on #2237 with @bashbaug
2025-04-01 08:47:59 -07:00
Marcin Hajder
88953edf6c Modernization of semaphores_negative_create_multi_device_property related to creating sub-devices (#2306)
Due to the improvements developed during work on #2237 with @bashbaug
2025-04-01 08:47:27 -07:00
Michael Rizkalla
5167d7202b Fix signalling and waiting on semaphore from two queues (#2271)
`semaphores_ooo_ops_cross_queue` uses two OOO command queues to run the
test. In one queue, a semaphore is signalled and the semahpore is waited
on in the other queue.

The CL specification requires the application to synchronize the queues
if objects are shared.

Signed-off-by: Michael Rizkalla <michael.rizkalla@arm.com>
2025-03-04 16:51:18 -08:00
Marcin Hajder
4c70fecad7 Moved sub-test external_semaphores_import_export_fd to test_external_semaphore executable (#2110)
Fixes #1989 according to task description. Moreover, fixes #1876 as
well.
2025-01-07 10:06:20 -08:00
Sven van Haastregt
9bb8a89bbd semaphore: fix Wformat warning (#2194)
`i` is an `int`, so shouldn't use the `%zu` specifier for printing.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-12-17 23:41:36 +05:30
Marcin Hajder
a9be3cc0e8 Added semaphore test to cover out-of-order operations synchronized with barrier (#2068)
Fixes #1979 according to task description.
2024-11-19 08:41:22 -08:00
Sven van Haastregt
8369028c92 cl_khr_semaphore: fix -Wformat warnings (#2124)
Add a `format` parameter to the macro, to be able to specify how to
print the expected and actual parameter values.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-10-29 09:43:30 -07:00
Sven van Haastregt
6337d9be46 semaphore: fix mistyped "platform" in log messages (#2128)
Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
2024-10-28 17:03:12 -07:00
Ben Ashbaugh
c071db7637 fixes a narrowing warning (treated as an error) affecting some platforms (#2117)
Looks like https://github.com/KhronosGroup/OpenCL-CTS/pull/2063 has a
"narrowing" warning that is now treated as an error and is hence causing
CI builds to fail.

Applies the same fix as
https://github.com/KhronosGroup/OpenCL-CTS/pull/2107 to fix this
warning.
2024-10-16 09:18:59 +02:00
Marcin Hajder
2998463eb4 Added missing test cases for CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR queries (#2063)
According to comments from issue #1875

---------

Co-authored-by: Nikhil Joshi <nikhilj@nvidia.com>
2024-10-15 08:44:23 -07:00
Ahmed Hesham
1527c4e425 Fix warning now treated as error (#2107)
Following the re-enablement of narrowing warnings, this fixes a
compilation error when running the `ubuntu 22.04 arm` GitHub action.

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
2024-10-08 13:11:46 -07:00
ellnor01
617e7cb233 Re-enabling narrowing errors (#1144)
Fixes narrowing conversion build errors in test_common

Removing disable of narrowing errors in main CMakeLists.txt
and moving it down to specific test_conformance suite's 
CMakeLists.txt where there are many more build errors revealed
from this fix. 

Fixes a few simple issues under test_conformance in the process.

Contributes #787

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>

---------

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
2024-10-08 09:54:32 -07:00
Marcin Hajder
8c647c1cf4 Added new tests to verify negative results of clEnqueueSignalSemaphoresKHR (#2006)
According to work plan from issue
https://github.com/KhronosGroup/OpenCL-CTS/issues/1691
2024-09-24 08:41:45 -07:00
Marcin Hajder
eb7a30ae42 Modernization of tests from test_semaphores.cpp to align with new SemaphoreTestBase infrastructure (#2029) 2024-09-03 22:53:22 +05:30
Marcin Hajder
d1434ae5aa Added new cl_khr_semaphore tests to verify clCreateSemaphoreWithPropertiesKHR negative results (#1962)
According to work plan from #1691, new clSemaphoreWrapper introduced to
avoid duplication of code
2024-08-06 22:48:45 +05:30
Marcin Hajder
7b0f4ee861 Added new cl_khr_semaphore tests to verify clReleaseSemaphoreKHR/clRetainSemaphoreKHR negative results (#1976)
According to work plan from issue #1691

Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
2024-07-16 20:38:28 +05:30
Marcin Hajder
c1af7c3301 Added new tests to verify negative results of clGetSemaphoreInfoKHR (#1981)
According to work plan from issue #1691
2024-07-09 08:46:37 -07:00
Marcin Hajder
340b7c956a Added new cl_khr_semaphore tests to verify clEnqueueWaitSemaphoresKHR negative results (#1965)
According to work plan from
https://github.com/KhronosGroup/OpenCL-CTS/issues/1691

After consultations with @bashbaug I skipped this case:

`CL_INVALID_VALUE if any of the semaphore objects specified by
sema_objects requires a semaphore payload and sema_payload_list is NULL`
2024-07-02 08:43:52 -07:00
Marcin Hajder
806dd2fb61 Added new query for cl_khr_semaphore test to verify device handle list (#1942)
This PR addresses the first part of #1691 issue and #1875 issue.
2024-06-04 23:10:37 +05:30
Sreelakshmi Haridas Maruthur
9692380505 Semaphore test: Use blocking semaphores (#1675)
Semaphore spec has been updated to reflect the fact that semaphores
will be in the appropriate - pending signal or pending wait - state
when returning from clEnqueueSignalSemaphore or
clEnqueueWaitSemaphore commands: KhronosGroup/OpenCL-Docs#882

Deleted the following tests to match the updated spec:

semaphores_order_1 - Test calls EnqueueWaitSemaphore before calling
EnqueueSignalSemaphore and expects this wait to succeed.
This behavior is not compatible with the recent
spec updates to semaphores.

semaphores_order_2 & semaphores_order_3 - Calling
clEnqueueSignalSemaphoresKHR with a dependency on a user event may
cause the implementation to block until the user event is complete.
This is unsafe usage of clEnqueueSignalSemaphoresKHR and may
lead to deadlock.

semaphores_invalid_command - This test checks for specific behavior
when waiting on a semaphore in an invalid state.
According to the spec, this is undefined behavior,
and therefore cannot be tested directly.

Co-authored-by: Joshua Kelly <joshkell@qti.qualcomm.com>
2023-05-30 08:49:31 -07:00
Paweł Jastrzębski
e882a3dc5e Move semaphore tests from api to extensions (#1646)
* Move semaphore tests from api to extensions

Moved cl_khr_semaphore tests from core api tests to a separate
extension test as suggested in
https://github.com/KhronosGroup/OpenCL-CTS/issues/1588 .

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Fix clang-format

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

* Remove unneeded comment.

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-03-07 09:00:16 -08:00