From d37579554b0fdec93ad886c8bd47fdf34f6d036f Mon Sep 17 00:00:00 2001 From: "Zhang, Winston" Date: Wed, 23 Apr 2025 21:16:54 +0000 Subject: [PATCH 1/2] [UR][L0] Re-enable driver in-order list Signed-off-by: Zhang, Winston --- .../ext_oneapi_enqueue_functions.cpp | 2 +- .../Graph/RecordReplay/usm_copy_in_order.cpp | 13 ++++++------ .../source/adapters/level_zero/platform.cpp | 20 +------------------ 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/sycl/test-e2e/Graph/RecordReplay/ext_oneapi_enqueue_functions.cpp b/sycl/test-e2e/Graph/RecordReplay/ext_oneapi_enqueue_functions.cpp index 6c6fe20337dab..aa3c32beb65fe 100644 --- a/sycl/test-e2e/Graph/RecordReplay/ext_oneapi_enqueue_functions.cpp +++ b/sycl/test-e2e/Graph/RecordReplay/ext_oneapi_enqueue_functions.cpp @@ -52,7 +52,7 @@ int main() { for (size_t i = 0; i < Size; i++) { T Ref = Pattern * i; - assert(Output[i] == Ref); + assert(check_value(i, Ref, Output[i], "Output")); } return 0; diff --git a/sycl/test-e2e/Graph/RecordReplay/usm_copy_in_order.cpp b/sycl/test-e2e/Graph/RecordReplay/usm_copy_in_order.cpp index 10e4427fa8777..41cfac8914f8c 100644 --- a/sycl/test-e2e/Graph/RecordReplay/usm_copy_in_order.cpp +++ b/sycl/test-e2e/Graph/RecordReplay/usm_copy_in_order.cpp @@ -45,9 +45,9 @@ int main() { // Shouldn't be captured in graph as a dependency Queue.submit([&](handler &CGH) { CGH.parallel_for(N, [=](id<1> it) { - X[it] += 0.5f; - Y[it] += 0.5f; - Z[it] += 0.5f; + X[it] += 1.0f; + Y[it] += 1.0f; + Z[it] += 1.0f; }); }); @@ -63,14 +63,15 @@ int main() { // memcpy from 2.0 Y values to Z Queue.submit([&](handler &CGH) { CGH.memcpy(Z, Y, N * sizeof(int)); }); + std::vector Output(N); + Queue.memcpy(Output.data(), Z, N * sizeof(int)); + Graph.end_recording(); auto ExecGraph = Graph.finalize(); Queue.submit([&](handler &CGH) { CGH.ext_oneapi_graph(ExecGraph); }); - - std::vector Output(N); - Queue.memcpy(Output.data(), Z, N * sizeof(int)).wait(); + Queue.wait_and_throw(); const int Expected = 2; for (size_t i = 0; i < N; i++) { diff --git a/unified-runtime/source/adapters/level_zero/platform.cpp b/unified-runtime/source/adapters/level_zero/platform.cpp index 2cd7b63effcf8..b8955fe7ef857 100644 --- a/unified-runtime/source/adapters/level_zero/platform.cpp +++ b/unified-runtime/source/adapters/level_zero/platform.cpp @@ -547,25 +547,7 @@ ur_result_t ur_platform_handle_t_::initialize() { } bool ur_platform_handle_t_::allowDriverInOrderLists(bool OnlyIfRequested) { - // Use in-order lists implementation from L0 driver instead - // of adapter's implementation. - - // The following driver version is known to be passing and only this or newer - // drivers should be allowed by default for in order lists. -#define L0_DRIVER_INORDER_MINOR_VERSION 6 -#define L0_DRIVER_INORDER_PATCH_VERSION 32149 - - static const bool UseEnvVarDriverInOrderLists = [&] { - const char *UrRet = std::getenv("UR_L0_USE_DRIVER_INORDER_LISTS"); - return UrRet ? std::atoi(UrRet) != 0 : false; - }(); - static const bool UseDriverInOrderLists = [this] { - bool CompatibleDriver = this->isDriverVersionNewerOrSimilar( - 1, L0_DRIVER_INORDER_MINOR_VERSION, L0_DRIVER_INORDER_PATCH_VERSION); - return CompatibleDriver || UseEnvVarDriverInOrderLists; - }(); - - return OnlyIfRequested ? UseEnvVarDriverInOrderLists : UseDriverInOrderLists; + return true; } /// Checks the version of the level-zero driver. From 59376fb4257e2a2655a64d6b3ea8d06d852f2dbe Mon Sep 17 00:00:00 2001 From: "Zhang, Winston" Date: Wed, 23 Apr 2025 21:34:09 +0000 Subject: [PATCH 2/2] Temp enable for testing Signed-off-by: Zhang, Winston --- unified-runtime/source/adapters/level_zero/platform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified-runtime/source/adapters/level_zero/platform.cpp b/unified-runtime/source/adapters/level_zero/platform.cpp index b8955fe7ef857..18d655db2eba1 100644 --- a/unified-runtime/source/adapters/level_zero/platform.cpp +++ b/unified-runtime/source/adapters/level_zero/platform.cpp @@ -547,7 +547,7 @@ ur_result_t ur_platform_handle_t_::initialize() { } bool ur_platform_handle_t_::allowDriverInOrderLists(bool OnlyIfRequested) { - return true; + return OnlyIfRequested; } /// Checks the version of the level-zero driver.