Skip to content

Commit 4bf35a6

Browse files
EwanCXewar313
andcommitted
Add CTS test
Taken from intel#17709 Co-authored-by: Mikołaj Komar <[email protected]>
1 parent 11aff75 commit 4bf35a6

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

sycl/source/detail/graph_impl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,9 @@ exec_graph_impl::enqueue(const std::shared_ptr<sycl::detail::queue_impl> &Queue,
985985
// and potential hangs. We have therefore to expliclty wait in the host
986986
// for previous submission to complete before resubmitting the
987987
// command-buffer for level-zero backend.
988-
// TODO : add a check to release this constraint and allow multiple
989-
// concurrent submissions if the exec_graph has been updated since the
990-
// last submission.
988+
// TODO https://github.com/intel/llvm/issues/17734
989+
// Remove this backend specific behavior and allow multiple concurrent
990+
// submissions of the UR command-buffer.
991991
for (std::vector<sycl::detail::EventImplPtr>::iterator It =
992992
MExecutionEvents.begin();
993993
It != MExecutionEvents.end();) {

unified-runtime/test/conformance/exp_command_buffer/fill.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,31 @@ TEST_P(urCommandBufferFillCommandsTest, Buffer) {
122122
verifyData(output, size);
123123
}
124124

125+
TEST_P(urCommandBufferFillCommandsTest, ExecuteTwice) {
126+
// TODO https://github.com/intel/llvm/issues/17734
127+
// Fail on Level-Zero due to blocking wait code in graph_impl.cpp specific
128+
// to the level-zero backend that needs moved into the Level-Zero v1 adapter.
129+
UUR_KNOWN_FAILURE_ON(uur::LevelZero{});
130+
ASSERT_SUCCESS(urCommandBufferAppendMemBufferFillExp(
131+
cmd_buf_handle, buffer, pattern.data(), pattern_size, 0, size, 0, nullptr,
132+
0, nullptr, &sync_point, nullptr, nullptr));
133+
134+
std::vector<uint8_t> output(size, 1);
135+
ASSERT_SUCCESS(urCommandBufferAppendMemBufferReadExp(
136+
cmd_buf_handle, buffer, 0, size, output.data(), 1, &sync_point, 0,
137+
nullptr, nullptr, nullptr, nullptr));
138+
139+
ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle));
140+
141+
ASSERT_SUCCESS(
142+
urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr));
143+
ASSERT_SUCCESS(
144+
urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr));
145+
ASSERT_SUCCESS(urQueueFinish(queue));
146+
147+
verifyData(output, size);
148+
}
149+
125150
TEST_P(urCommandBufferFillCommandsTest, USM) {
126151
ASSERT_SUCCESS(urCommandBufferAppendUSMFillExp(
127152
cmd_buf_handle, device_ptr, pattern.data(), pattern_size, size, 0,

0 commit comments

Comments
 (0)