From 5f3083add2c29b3fe6ac1ce779449ed8dac0e621 Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Tue, 2 Jul 2024 12:02:05 -0700 Subject: [PATCH 1/4] [SYCL] Fix deferred buffer destruction regression caused by host device removal Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/sycl_mem_obj_t.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sycl/source/detail/sycl_mem_obj_t.cpp b/sycl/source/detail/sycl_mem_obj_t.cpp index 009f910be440c..5ec002501692e 100644 --- a/sycl/source/detail/sycl_mem_obj_t.cpp +++ b/sycl/source/detail/sycl_mem_obj_t.cpp @@ -205,13 +205,17 @@ void SYCLMemObjT::detachMemoryObject( // For L0 context could be created with two ownership strategies - keep and // transfer. If user keeps ownership - we could not enable deferred buffer // release due to resource release conflict. + // MRecord->MCurContext == nullptr means that last submission to buffer is on + // host (host task), this execution doesn't depend on device context and fully + // controlled by RT. In this case deferred buffer destruction is allowed. bool InteropObjectsUsed = !MOwnNativeHandle || (MInteropContext && !MInteropContext->isOwnedByRuntime()); - if (MRecord && MRecord->MCurContext && - MRecord->MCurContext->isOwnedByRuntime() && !InteropObjectsUsed && - (!MHostPtrProvided || MIsInternal)) { + if (MRecord && + (!MRecord->MCurContext || + (MRecord->MCurContext && MRecord->MCurContext->isOwnedByRuntime())) && + !InteropObjectsUsed && (!MHostPtrProvided || MIsInternal)) { bool okToDefer = GlobalHandler::instance().isOkToDefer(); if (okToDefer) Scheduler::getInstance().deferMemObjRelease(Self); From 8ea2121e5b55008063970fbd60a98b53d38fde9b Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Tue, 2 Jul 2024 12:03:56 -0700 Subject: [PATCH 2/4] Revert "[SYCL][E2E] Disable test: blocking_pipes_and_stream.cpp (#14392)" This reverts commit 74085d3530e93860cd06d652292eef8280f68bc5. --- sycl/test-e2e/Basic/stream/blocking_pipes_and_stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/test-e2e/Basic/stream/blocking_pipes_and_stream.cpp b/sycl/test-e2e/Basic/stream/blocking_pipes_and_stream.cpp index 12e2c062999d3..d61f1f69234a3 100644 --- a/sycl/test-e2e/Basic/stream/blocking_pipes_and_stream.cpp +++ b/sycl/test-e2e/Basic/stream/blocking_pipes_and_stream.cpp @@ -1,4 +1,4 @@ -// REQUIRES: accelerator, TEMPORARY_DISABLED +// REQUIRES: accelerator // RUN: %{build} -o %t.out // RUN: %{run} %t.out | FileCheck %s From ffb3a332bbdaae891234a20a21a86e6f9d2aed1a Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Wed, 3 Jul 2024 03:56:40 -0700 Subject: [PATCH 3/4] Revert "[SYCL][E2E] Disable three hanging tests on Gen12 Win (#14398)" This reverts commit cb1c55a31c703ca0b97e436a29e1878eacc1bd01. --- sycl/test-e2e/BFloat16/bfloat16_vec.cpp | 3 --- sycl/test-e2e/Basic/stream/stream.cpp | 3 --- sycl/test-e2e/Complex/sycl_complex_stream_test.cpp | 3 --- 3 files changed, 9 deletions(-) diff --git a/sycl/test-e2e/BFloat16/bfloat16_vec.cpp b/sycl/test-e2e/BFloat16/bfloat16_vec.cpp index bca68c2e6d290..549dc13ed76c6 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_vec.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_vec.cpp @@ -10,9 +10,6 @@ // TODO enable opaque pointers support on CPU. // UNSUPPORTED: cpu || accelerator -// https://github.com/intel/llvm/issues/14397 -// UNSUPPORTED: windows && gpu-intel-gen12 - // RUN: %{build} -o %t.out // RUN: %{run} %t.out // RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %} diff --git a/sycl/test-e2e/Basic/stream/stream.cpp b/sycl/test-e2e/Basic/stream/stream.cpp index 04680d969841e..fe3429cffad2b 100644 --- a/sycl/test-e2e/Basic/stream/stream.cpp +++ b/sycl/test-e2e/Basic/stream/stream.cpp @@ -9,9 +9,6 @@ // //===----------------------------------------------------------------------===// -// https://github.com/intel/llvm/issues/14397 -// UNSUPPORTED: windows && gpu-intel-gen12 - #include #include diff --git a/sycl/test-e2e/Complex/sycl_complex_stream_test.cpp b/sycl/test-e2e/Complex/sycl_complex_stream_test.cpp index 1140ef603d336..d8d645f6ac7dc 100644 --- a/sycl/test-e2e/Complex/sycl_complex_stream_test.cpp +++ b/sycl/test-e2e/Complex/sycl_complex_stream_test.cpp @@ -1,8 +1,5 @@ // DEFINE: %{mathflags} = %if cl_options %{/clang:-fno-finite-math-only%} %else %{-fno-finite-math-only%} -// https://github.com/intel/llvm/issues/14397 -// UNSUPPORTED: windows && gpu-intel-gen12 - // RUN: %{build} -fsycl-device-code-split=per_kernel %{mathflags} -o %t.out // RUN: %{run} %t.out From d1c90edee41ddb339dcf3bddfdc082ee7a7eada7 Mon Sep 17 00:00:00 2001 From: "Tikhomirova, Kseniya" Date: Wed, 3 Jul 2024 05:28:58 -0700 Subject: [PATCH 4/4] fix comment Signed-off-by: Tikhomirova, Kseniya --- sycl/source/detail/sycl_mem_obj_t.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sycl/source/detail/sycl_mem_obj_t.cpp b/sycl/source/detail/sycl_mem_obj_t.cpp index 5ec002501692e..374f6f1247097 100644 --- a/sycl/source/detail/sycl_mem_obj_t.cpp +++ b/sycl/source/detail/sycl_mem_obj_t.cpp @@ -213,8 +213,7 @@ void SYCLMemObjT::detachMemoryObject( (MInteropContext && !MInteropContext->isOwnedByRuntime()); if (MRecord && - (!MRecord->MCurContext || - (MRecord->MCurContext && MRecord->MCurContext->isOwnedByRuntime())) && + (!MRecord->MCurContext || MRecord->MCurContext->isOwnedByRuntime()) && !InteropObjectsUsed && (!MHostPtrProvided || MIsInternal)) { bool okToDefer = GlobalHandler::instance().isOkToDefer(); if (okToDefer)