Skip to content

Commit 156429e

Browse files
authored
[UR][L0] Fix issue with memadvise/prefetch in command buffers (#19140)
- Fix prefetch and memadvise not correctly waiting on events from copy cmd lists in L0 V1 - Re-enable test for L0 V1 adapter Closes #18544
1 parent 3740e5a commit 156429e

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

unified-runtime/source/adapters/level_zero/command_buffer.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,6 @@ ur_result_t createSyncPointAndGetZeEvents(
312312
if (CommandBuffer->IsInOrderCmdList) {
313313
UR_CALL(createSyncPointBetweenCopyAndCompute(CommandBuffer, ZeCommandList,
314314
ZeEventList));
315-
if (!ZeEventList.empty()) {
316-
NumSyncPointsInWaitList = ZeEventList.size();
317-
}
318315
return UR_RESULT_SUCCESS;
319316
}
320317

@@ -1330,9 +1327,9 @@ ur_result_t urCommandBufferAppendUSMPrefetchExp(
13301327
CommandBuffer->ZeComputeCommandList, NumSyncPointsInWaitList,
13311328
SyncPointWaitList, true, RetSyncPoint, ZeEventList, ZeLaunchEvent));
13321329

1333-
if (NumSyncPointsInWaitList) {
1330+
if (!ZeEventList.empty()) {
13341331
ZE2UR_CALL(zeCommandListAppendWaitOnEvents,
1335-
(CommandBuffer->ZeComputeCommandList, NumSyncPointsInWaitList,
1332+
(CommandBuffer->ZeComputeCommandList, ZeEventList.size(),
13361333
ZeEventList.data()));
13371334
}
13381335

@@ -1394,9 +1391,9 @@ ur_result_t urCommandBufferAppendUSMAdviseExp(
13941391
NumSyncPointsInWaitList, SyncPointWaitList, true, RetSyncPoint,
13951392
ZeEventList, ZeLaunchEvent));
13961393

1397-
if (NumSyncPointsInWaitList) {
1394+
if (!ZeEventList.empty()) {
13981395
ZE2UR_CALL(zeCommandListAppendWaitOnEvents,
1399-
(CommandBuffer->ZeComputeCommandList, NumSyncPointsInWaitList,
1396+
(CommandBuffer->ZeComputeCommandList, ZeEventList.size(),
14001397
ZeEventList.data()));
14011398
}
14021399

unified-runtime/test/conformance/exp_command_buffer/in-order.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ struct urInOrderCommandBufferExpTest
1616
virtual void SetUp() override {
1717
UUR_RETURN_ON_FATAL_FAILURE(urCommandBufferExpExecutionTest::SetUp());
1818

19-
// Level-Zero bug https://github.com/intel/llvm/issues/18544
20-
// Re-enable these tests once fixed
21-
UUR_KNOWN_FAILURE_ON(uur::LevelZero{});
22-
2319
ur_exp_command_buffer_desc_t desc{
2420
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC, // stype
2521
nullptr, // pnext

0 commit comments

Comments
 (0)