Commit Graph

25 Commits

Author SHA1 Message Date
Ewan Crawford
044ec98f66 Command-buffer queue compatibility test update (#2230)
Update cl_khr_command_buffer tests to reflect changes from
https://github.com/KhronosGroup/OpenCL-Docs/pull/1292

* Moves negative test for
`CL_DEVICE_COMMAND_BUFFER_SUPPORTED_QUEUE_PROPERTIES_KHR` from
command-buffer creation to enqueue.
* Moves negative test for
`CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR` from
command-buffer creation to enqueue.
* Introduces a negative test for `CL_INVALID_DEVICE` on command-buffer
enqueue for new error condition in spec. Although it requires a context
to be contain more than 1 device, which I'm not sure if possible in
current test framework.
* Introduces a new test that created a command-buffer using a queue
without the profiling property set, then enqueues the command-buffer to
a queue with the profiling property set.
* Introduces a new test that creates a command-buffer with an in-order
queue, enqueued on an out-of-order queue.
* Introduces a new test that creates a command-buffer with an
out-of-order queue, enqueued on an in-order queue.
2025-02-11 08:47:15 -08:00
gorazd-sumkovski-arm
96e3d7e669 Command buffer test adjustments (#2141)
Signed-off-by: Gorazd Sumkovski <gorazd.sumkovski@arm.com>
Co-authored-by: Ewan Crawford <ewan.cr@gmail.com>
2024-11-26 09:26:04 -08:00
Kamil-Goras-Mobica
d379b58ab6 Added negative tests for clCommandCopy[Buffer, BufferRect, BufferToImage]KHR (#1941)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-06-11 08:42:29 -07:00
Kamil-Goras-Mobica
d53d7bc559 Added negative tests for clCommandFill[Buffer, Image]KHR (#1944)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-28 08:39:01 -07:00
Kamil-Goras-Mobica
d3e3bdabaa Negative tests clCommandSvmMem[cpy, Fill]KHR (#1956)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-22 09:18:36 +01:00
Kamil-Goras-Mobica
9500c30492 Negative tests for commandCopyImage[ToBuffer]KHR (#1943)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-21 08:40:08 -07:00
Kamil-Goras-Mobica
e6fec7417f Added negative tests for clCommandBarrierWithWaitListKHR (#1937)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-14 08:43:23 -07:00
Kamil-Goras-Mobica
5093ce5be5 Added negative test commandNDRangeKernel (#1936)
According to description
https://github.com/KhronosGroup/OpenCL-CTS/issues/1668
2024-05-14 08:42:46 -07:00
Kamil-Goras-Mobica
4c085dec4a Added negative tests for clEnqueueCommandBufferKHR (#1931)
* Added negative tests for clEnqueueCommandBufferKHR

* Added blocking the clEnqueueCommandBufferKHR call on a user event

* Added finalizing buffer before enqueuing
2024-04-21 23:45:33 -07:00
Kamil-Goras-Mobica
308fa6e78c Added negative tests for clRetainCommandBufferKHR, clReleaseCommandBu… (#1928)
* Added negative tests for clRetainCommandBufferKHR, clReleaseCommandBufferKHR, clFinalizeCommandBufferKHR

* Added blocking the clEnqueueCommandBufferKHR call on a user event

* Changed cl_event to clEventWrapper
2024-04-19 14:01:38 -07:00
Kamil-Goras-Mobica
7fa567c7a5 Corrections for negative tests for function CreateCommandBufferKHR (#1915) 2024-04-16 08:40:44 -07:00
Kamil-Goras-Mobica
d0300d176f Added negative tests for clGetCommandBufferInfoKHR (#1929)
* Added negative tests for clGetCommandBufferInfo

* Replaced param_value_size values from 0 to sizeof() - 1
2024-04-09 08:54:44 -07:00
Michal Babej
af2710355d add tests for clCommandSVMMemcpyKHR & clCommandSVMMemfillKHR (#1821)
* add tests for clCommandSVMMemcpyKHR & clCommandSVMMemfillKHR

* Fix typo SVMMemfill -> SVMMemFill

* fix clCommandSVMMemFillKHR calls to match extension

* add Khronos license + minor fixes

* review fixes
2023-10-10 09:22:50 -07:00
Ewan Crawford
a3262eb4b6 [Command-buffer] Test finalizing empty command-buffer (#1782)
This patch adds two test cases related to command-buffer finalization:

1) That it is an error to finalize and already finalized command-buffer.
See https://github.com/KhronosGroup/OpenCL-Docs/pull/817

2) That it is not an error to create, finalize, and execute an empty
command-buffer. Closes issue #1781
2023-08-29 09:15:39 -07:00
Ewan Crawford
75aca34e60 Test CL_COMMAND_BUFFER_CONTEXT_KHR (#1697)
Test coverage for spec PR https://github.com/KhronosGroup/OpenCL-Docs/pull/899
which introduces a new cl_khr_command_buffer query for the cl_context
2023-06-28 08:13:15 +01:00
Marcin Hajder
f0f887d07f printf test cases for cl_khr_command_buffer extenstion (#1592)
* Added printf test case for cl_khr_command_buffer extenstion according to point 1.6 from:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Corrections related to macos and windows build

* Added missing header

* Added corrections related to code review of draft PR:

https://github.com/KhronosGroup/OpenCL-CTS/pull/1592

refers to issue #1369, p.1.6:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* minor fix for previous commit

* printf capability condition moved to ::Skip method (#1369, p.1.6):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Applied minor corrections related to code review (#1369, p.1.6):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added correction to replace string literals with sequence of characters printf arguments (issue #1369, printf)

* Added clang formatting.

* Added header related to android build (issue #1369, printf)

* Fixed memory leak

* Fixed memory leak in test_printf

* Added cosmetic fix for last commit
2023-04-04 08:12:05 +01:00
Marcin Hajder
f537c40abc clGetCommandBufferInfoKHR test cases for cl_khr_command_buffer extension (#1611)
* Added initial commit for issue #1369, p.1.4

* Added support for clGetCommandBufferInfoKHR test cases (issue #1369, p.1.3)

* Added correction for CL_COMMAND_BUFFER_QUEUES_KHR query test (issue #1369, p.1.4)

* Added corrections related to changed orders of operations Skip/SetUp and code review (issue #1369, clGetCommandBufferInfoKHR)

* Added cosmetic correction related to printout messages (issue #1369, clGetCommandBufferInfoKHR)

* Corrected info_prop_array test to accept scenario without simultaneous use (issue #1369, p.1.4)

* Added protection test agains POCL unexpected values (issue #1369, p.1.4)

* Added corrections related to Ben's code review
2023-03-28 08:41:41 -07:00
Marcin Hajder
0b44338eda clSetKernelArg test cases for cl_khr_command_buffer extenstion (#1593)
* Initial commit for clSetKernelArg test case (issue #1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added simultaneous version of clSetKernelArg test, (#1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added/corrected comments (#1369, p.1.7)

* Corrected logic of conditions of command-buffer simultaneous use (#1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added missing comment for consistency with other command-buffer tests

* Cleanup related to code review (#1369, p.1.7):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added clang format correction

* Removed redundant code (issue #1369 clSetKernelArg)
2023-03-06 10:30:27 +00:00
Marcin Hajder
33285facbe Command buffer event sync (#1606)
* Added initial commit for event sync test cases (issue #1369, p.3.3)

* Added test cases for return event scenarios with and without out-of-order, work in progress (#1369, p.3.3)

* Added support for return event test cases for both regular and out-of-order command queue (#1369, p.3.3)

* Added user event test cases, cosmetic corrections (#1369, p.3.3)

* Added correction for windows build (#1369, p.3.3)

* Corrected proper testing of test fail/skip conditions (#1369, p.3.3)

* Added corrections related to PR review (#1369, p.3.3)

* Added correction related to change of order Skip/SetUp (issue #1369, event sync)

* Added clang format correction for previous commit

* Reordered initialization of attributes.
2023-03-03 08:20:46 +00:00
Marcin Hajder
531e5e82f9 Out-of-order command-queue test cases for cl_khr_command_buffer (#1596)
* Initial commit for out-of-order test cases (#1369, p.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added support for simultaneous test of out-of-order command buffers and queues (#1369, p.2.1):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Cosmetic fixes (#1369, p.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Corrected two bugs related to simultaneous test (#1369, p.2.1):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added additional event to synchronize symultaneous passes, cosmetic fixes (#1369, p.2.1):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Cosmetic fix due to consistency concerns (#1369, p.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Fix for prev commit

* Added corrections related to changed order of Skip/SetUp methods (issue #1369, 2.0 out-of-order)

* Reverted formating of unrelated header

* Reverted formating of unrelated header, correction

* Reordered initialization of attributes.
2023-03-02 09:16:32 +00:00
Marcin Hajder
296a7a574d Command buffer profiling (#1598)
* Added test cases for profiling command-buffers according to issue description #1369, p.3.2:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added cosmetic fixes (#1369, p.3.2)

* Corrected the path of initialization profiling event for simultaneous test (#1369, p.3.2):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* clang format fix

* Added correction related to macos build error (#1369, p.3.2)

* Applied corrections related to code review (#1369, p.3.2)

* Corrected query of queue properies (issue #1369, command buffer profiling)

* Reverted formating of unrelated header

* Added code review corrections for type consistency and fail condition (issue #1369, p.3.2)

* Reordered initialization of attributes.

* Reverted correct order of initialization.
2023-02-21 09:05:17 +00:00
Paweł Jastrzębski
fa2c1d2417 Add test for clGetEventInfo info queries. (#1647)
* Add test for clGetEventInfo info queries.

Test clGetEventInfo() info queries from event returned by command-buffer
enqueue for the single command-queue to command-buffer case:
* CL_EVENT_COMMAND_TYPE is CL_COMMAND_COMMAND_BUFFER_KHR
* CL_EVENT_COMMAND_QUEUE
* CL_EVENT_CONTEXT
* CL_EVENT_COMMAND_EXECUTION_STATUS
* CL_EVENT_REFERENCE_COUNT

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

* Fix return TEST_FAIL instead of -1.

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

---------

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-02-20 16:19:11 +00:00
Paweł Jastrzębski
560d6eafbd Added tests for 1.1 individual command entry-points. (#1594)
* Added tests for 1.1 individual command entry-points.

* Adding fixes pointed out in review: checks for CL_DEVICE_IMAGE_SUPPORT, remove redundant buffers, synchronisation issues, fixed clang-format, other minor issues.

* Fix compilation issues for Windows and macOS, fix clang-format.

* Fix compilation issue for Windows.

* Removed redundant blocking and event operations.

* Style fixes for test skip conditions.

* Fix clang format.

* Fixed function names, file names, comments and barrier test.

* Restored Individual command entry-points tests after merge with main.

* Fix clang format.

* Superficial fixes for review.
* Fix Skip() condition for barrier test
* Fix typos
* Fix new line

Signed-off-by: Paweł Jastrzębski <p.k.jastrzebski@gmail.com>
2023-02-20 08:36:34 +00:00
Marcin Hajder
afdd8b0058 Command buffer queue substitution (#1584)
* Added queue substitution CTS test based on issue: https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added cosmetic correction to properties_queue_substitution test, work in progress:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added support for simultaneous queue substitution test (1.3.3), more cosmetic corrections added:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added initial rearrangement of source files due to more test cases to be implemented.

* Corrected test with queue properties out-of-order:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added alternative temporary path for simultenaous pass (USE_COMMAND_BUF_KENEL_ARG):

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* applied git clang-format "origin/main"

* Added corrections for out-of-order property scenario, couple cosmetic fixes:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Replaced cl_command_queue with clCommandQueueWrapper for additional command queue with properties:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Removed unnecessary flag, additional cleanup:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added narrowing correction due to windows build fail:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Test simiplified in order to use only substitute queue on both simultaneous buffers:

https://github.com/KhronosGroup/OpenCL-CTS/issues/1369

* Added limitation to use only CL_QUEUE_PROFILING_ENABLE property, replaced cl_command_queue with related wrapper (#1369, p.1.4)

* Corrections related to order of operations due to code review (issue #1369, p.1.3)

* Cosmetic fix for prev commit

* Cosmetic fix for prev commit #2
2023-01-24 09:44:16 -08:00
Ewan Crawford
8f5a2f0ae8 Initial command-buffer extension tests (#1368)
* Initial command-buffer tests

Introduce some basic testing of the
[cl_khr_command_buffer](https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_Ext.html#cl_khr_command_buffer)
extension. This is intended as a starting point from which we can iteratively build up tests
for the extension collaboratively.

* Move tests into derived classes

* Move tests from methods into derived classes implementing
  a `Run()` interface.
* Fix memory leak when command_buffer isn't freed when a test
  is skipped.
* Print correct error code for
  `CL_DEVICE_COMMAND_BUFFER_CAPABILITIES_KHR`
* Pass `nullptr` for queue parameter to command recording entry-points

* Define command-buffer type wrapper

Other OpenCL object have a wrapper to reference count their use
and free the wrapped object. The command-buffer object can't use
the generic type wrappers which are templated on the appropriate
release/retain function, as the release/retain functions are
queried at runtime.

Instead, define our own command-buffer wrapper class where a base
object is passed on construction which contains function pointers
to the release/retain functions that can be used in the wrapper.

* Use create_single_kernel_helper_create_program

Use `create_single_kernel_helper_create_program` rather than
hardcoding `clCreateProgramWithSource` to allow for other types
of program input.

Also fix bug using wrong enum for passing properties on command-buffer
creation, should be `CL_COMMAND_BUFFER_FLAGS_KHR`

* Add out-of-order command-buffer test

Introduce a basic test for checking sync-point use
with out-of-order command-buffers.

This also includes better checking of required queue properties.
2022-08-30 09:54:50 -07:00