CTS updates for reworked simultaneous use#2477
Conversation
There was a problem hiding this comment.
This file is worth paying attention to in review, it adds new tests that cover cases that could have been considered simultaneous-use in the previous definition, but now are not.
There was a problem hiding this comment.
This file is worth paying attention to in review, it tests updating a command-buffer which may still be executing as there are no blocking waits between enqueues.
This is a very small subset of the changes in #2477 to get things building again, since the command-buffer pending state is no longer in the spec or headers.
f4fdf56 to
85b364a
Compare
test_conformance/extensions/cl_khr_command_buffer/command_buffer_pipelined_enqueue.cpp
Show resolved
Hide resolved
Actions test plan from KhronosGroup#2473 to update CTS tests to reflect changes from cl_khr_command_buffer PR KhronosGroup/OpenCL-Docs#1411 * Adds new test in`command_buffer_pipelined_enqueue.cpp` for multiple enqueues without blocking in-between, but serialized execution. * Removed test for `CL_COMMAND_BUFFER_STATE_PENDING_KHR` state query. * Remove negative test for `clEnqueueCommandBuffer` pending state error. * Simplify `cl_khr_command_buffer` tests that stress simultaneous-use by testing multiple serialized enqueues of the same command-buffer, which doesn't now require the device imultaneous-use capability * Remove simultaneous-use command-buffer creation in base class to off, and require tests do it themselves if they require it. * Rewrite mutable dispatch simultaneous test to test updating both pipelined enqueues, and updating the new definition of simultaneous-use
85b364a to
3359c9b
Compare
bashbaug
left a comment
There was a problem hiding this comment.
I've run these tests with the command buffer emulation layer and I'm not seeing any unexpected failures, although it would be most interesting for somebody to run these tests on an implementation that does not support simultaneous use.
test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.cpp
Outdated
Show resolved
Hide resolved
test_conformance/extensions/cl_khr_command_buffer/command_buffer_profiling.cpp
Outdated
Show resolved
Hide resolved
|
That PR is working using kpet/clvk#807 (which does not support simultaneous use). |
Tests the scenario outlined in KhronosGroup#2520 (comment) to verify the functionality added in OpenCL-Docs PR KhronosGroup/OpenCL-Docs#1382. Note that this bumps the required cl_khr_command_buffer_mutable_dispatch minor version by 2 because KhronosGroup#2477 is not yet merged which test the intermediate version. This also assumes the proposed OpenCL-Docs change in KhronosGroup/OpenCL-Docs#1471 is merged, as the PR does a negative test for command-buffer enqueue while the command-buffer is in the finalized state. Closes KhronosGroup#2520
| test_error(error, "clEnqueueCommandBufferKHR failed"); | ||
|
|
||
| std::vector<cl_int> output_data(num_elements); | ||
| error = clEnqueueReadBuffer(out_of_order_queue, out_mem, CL_TRUE, 0, |
There was a problem hiding this comment.
Hello Ewan, sorry for not catching this earlier, but I believe there needs to be a barrier before the clEnqueueReadBuffer, as there is no guarantee it will wait until all work is done (out of order queue).
There was a problem hiding this comment.
Nice spot, I've pushed a commit adding a barrier in for that missing synchronization.
Needs synchronization between final command-buffer enqueue and buffer read
bashbaug
left a comment
There was a problem hiding this comment.
Merging as discussed in the October 14th teleconference.
Tests the scenario outlined in KhronosGroup#2520 (comment) to verify the functionality added in OpenCL-Docs PR KhronosGroup/OpenCL-Docs#1382. Note that this bumps the required cl_khr_command_buffer_mutable_dispatch minor version by 2 because KhronosGroup#2477 is not yet merged which test the intermediate version. This also assumes the proposed OpenCL-Docs change in KhronosGroup/OpenCL-Docs#1471 is merged, as the PR does a negative test for command-buffer enqueue while the command-buffer is in the finalized state. Closes KhronosGroup#2520
Actions test plan from #2473 to update CTS tests to reflect changes from cl_khr_command_buffer PR KhronosGroup/OpenCL-Docs#1411
command_buffer_pipelined_enqueue.cppfor multiple enqueues without blocking in-between, but serialized execution.CL_COMMAND_BUFFER_STATE_PENDING_KHRstate query.clEnqueueCommandBufferpending state error.cl_khr_command_buffertests that stress simultaneous-use by testing multiple serialized enqueues of the same command-buffer, which doesn't now require the device imultaneous-use capability