diff --git a/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp b/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp index a941f2688286f..bf504002f427e 100644 --- a/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp @@ -4,9 +4,6 @@ // RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: level_zero, level_zero_dev_kit -// UNSUPPORTED: level_zero_v2_adapter -// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17847 - #include #include #include @@ -26,7 +23,7 @@ int main() { return 1; } - queue Queue; + queue Queue{{property::queue::in_order{}}}; const size_t Size = 128; int *PtrX = malloc_device(Size, Queue); diff --git a/unified-runtime/source/adapters/level_zero/command_buffer.cpp b/unified-runtime/source/adapters/level_zero/command_buffer.cpp index 687c905417d8b..f97f1573516c7 100644 --- a/unified-runtime/source/adapters/level_zero/command_buffer.cpp +++ b/unified-runtime/source/adapters/level_zero/command_buffer.cpp @@ -1897,17 +1897,21 @@ ur_result_t urCommandBufferAppendNativeCommandExp( numSyncPointsInWaitList, pSyncPointWaitList, true, pSyncPoint, ZeEventList, ZeLaunchEvent)); - // Barrier on all commands before user defined commands. - ZE2UR_CALL(zeCommandListAppendBarrier, - (ZeCommandList, nullptr, ZeEventList.size(), - getPointerFromVector(ZeEventList))); + if (!hCommandBuffer->IsInOrderCmdList) { + // Barrier on all commands before user defined commands. + ZE2UR_CALL(zeCommandListAppendBarrier, + (ZeCommandList, nullptr, ZeEventList.size(), + getPointerFromVector(ZeEventList))); + } // Call user-defined function immediately pfnNativeCommand(pData); - // Barrier on all commands after user defined commands. - ZE2UR_CALL(zeCommandListAppendBarrier, - (ZeCommandList, ZeLaunchEvent, 0, nullptr)); + if (!hCommandBuffer->IsInOrderCmdList) { + // Barrier on all commands after user defined commands. + ZE2UR_CALL(zeCommandListAppendBarrier, + (ZeCommandList, ZeLaunchEvent, 0, nullptr)); + } return UR_RESULT_SUCCESS; }