Skip to content

Command buffer queue substitution#1584

Merged
bashbaug merged 17 commits intoKhronosGroup:mainfrom
shajder:command_buffer_queue_substitution
Jan 24, 2023
Merged

Command buffer queue substitution#1584
bashbaug merged 17 commits intoKhronosGroup:mainfrom
shajder:command_buffer_queue_substitution

Conversation

@shajder
Copy link
Copy Markdown
Contributor

@shajder shajder commented Nov 28, 2022

Introduce series of queue substitution tests for cl_khr_command_buffer extension according to point 1.3 of issue description.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 28, 2022

CLA assistant check
All committers have signed the CLA.

@EwanC EwanC mentioned this pull request Nov 29, 2022
44 tasks
@shajder shajder marked this pull request as ready for review November 29, 2022 15:06
EwanC
EwanC previously approved these changes Nov 30, 2022
@EwanC
Copy link
Copy Markdown
Contributor

EwanC commented Nov 30, 2022

@aharon-abramson Could you try this out on your implementation

@aharon-abramson
Copy link
Copy Markdown
Contributor

aharon-abramson commented Nov 30, 2022 via email

Copy link
Copy Markdown
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I tried these new tests with my command buffer emulation layer and they all passed, pretty cool!

queue_substitution...
queue_substitution passed
properties_queue_substitution...
Queue property CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE supported. Testing ...
Queue property CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE supported. Testing ...
properties_queue_substitution passed
simultaneous_queue_substitution...
simultaneous_queue_substitution passed
PASSED sub-test.
PASSED 9 of 9 tests.

test_conformance/extensions/cl_khr_command_buffer/basic_command_buffer.cpp
EwanC
EwanC previously approved these changes Dec 15, 2022
bashbaug
bashbaug previously approved these changes Dec 15, 2022
error = clSetKernelArg(kernel, 2, sizeof(off_mem), &off_mem);
test_error(error, "clSetKernelArg failed");

if (simultaneous_use_support)
Copy link
Copy Markdown
Contributor

@aharon-abramson aharon-abramson Jan 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's problematic that you try to create a command buffer before checking CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR in the Skip() method. It should be the other way around.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a good point to me. If queue will not meet the minimum properties specified by CL_DEVICE_COMMAND_BUFFER_REQUIRED_QUEUE_PROPERTIES_KHR then clCreateCommandBufferKHR will likely fail (CL_INCOMPATIBLE_COMMAND_QUEUE_KHR) instead of skipping the test.

My proposition is to move all clGetDeviceInfo queries to BasicCommandBufferTest::Skip method and change the order of Skip and SetUp calls in MakeAndRunTest function. I verified that approach with previous and new tests introduced in this PR - it needs some additional refactoring (and reviewing all remaining cl_khr_command_buffer related PRs) but it looks promising.

Please let me know if you have other propositions on your mind, thanks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this approach looks good to me.

@shajder shajder dismissed stale reviews from bashbaug and EwanC via 90dd8c8 January 5, 2023 12:44
Copy link
Copy Markdown
Contributor

@EwanC EwanC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One very minor comment, but the change so that BasicCommandBufferTest::Skip happens before BasicCommandBufferTest::SetUp makes sense to me.

@aharon-abramson
Copy link
Copy Markdown
Contributor

Looks OK to me

@bashbaug
Copy link
Copy Markdown
Contributor

Merging as discussed in the January 24th teleconference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants