-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a few fixes (thread safety & cl_khr_command_buffer UB) #1840
Conversation
dcff39e
to
4b4982e
Compare
Removed the first two commits from the PR; i did not realize there was already an open PR with those. |
0309e43
to
8f4b503
Compare
rebased on main. should be ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note, this needs another merge/rebase now, to pick up the latest header changes.
test_conformance/extensions/cl_khr_command_buffer/command_buffer_event_sync.cpp
Outdated
Show resolved
Hide resolved
…rrier.cpp BarrierWithWaitListKHR::Run in command_buffer_test_barrier.cpp contains a "check second enqueue" which tries to zero out the cl_mems before enqueueing the command buffer again. However, the zeroing commands are enqueued to the in-order queue, while the command buffer to the out-of-order queue. Since there is no implicit or explicit sync, this is undefined behaviour.
…ync.cpp RunCombufWaitForSecQueueCombuf() is launching two clEnqueueFillBuffer commands on two separate queues, however both had the same buffer argument, and there was no synchronization between the commands. * add an event dependency to the second FillBuffer to ensure correct execution * change the fill pattern of the first FillBuffer to a different pattern
replaced static variables with stack variables
Merging as discussed in the October 8th teleconference. |
some fixes we've been carrying in our CTS fork:
command_buffer_event_sync.cpp
: enqueue of two commands in two separate queues, with both using the same buffer argument, and no synchronization between the commands.command_buffer_test_barrier.cpp
: missing synchronization between zeroing command and command-buffer using two separate queuestest_thread_dimensions.cpp
thread-safe to avoid spurious errors.