Skip to content

Commit

Permalink
Fix ordering bug in extensions/cl_khr_command_buffer/command_buffer_t…
Browse files Browse the repository at this point in the history
…est_barrier.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, PoCL would occassionally start executing
the out-of-order queue while the zeroing commands were still running.
  • Loading branch information
franz committed Nov 2, 2023
1 parent a378ef5 commit 982ffe4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ struct BarrierWithWaitListKHR : public BasicCommandBufferTest
0, data_size(), 0, nullptr, nullptr);
test_error(error, "clEnqueueFillBufferKHR failed");

error = clFinish(queue);
test_error(error, "clFinish");

error = clEnqueueCommandBufferKHR(
0, nullptr, out_of_order_command_buffer, 0, nullptr, &Ev);
event.reset(Ev);
Expand Down

0 comments on commit 982ffe4

Please sign in to comment.