From bdce5b0ccb6f7d7ce5d4e6b578a9bad4f142b11e Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Wed, 26 Nov 2025 12:14:29 -0800 Subject: [PATCH] [SYCL][ABI-break] Make MGraph a member of interop_handle --- sycl/include/sycl/interop_handle.hpp | 17 ++--------------- sycl/source/detail/queue_impl.hpp | 13 ------------- sycl/source/detail/scheduler/commands.cpp | 13 ------------- sycl/source/interop_handle.cpp | 12 ------------ .../Graph/NativeCommand/cuda_explicit_usm.cpp | 2 -- .../cuda_multiple_native_commands.cpp | 2 -- .../NativeCommand/cuda_record_async_malloc.cpp | 2 -- .../Graph/NativeCommand/cuda_record_buffer.cpp | 2 -- .../Graph/NativeCommand/cuda_record_usm.cpp | 2 -- .../Graph/NativeCommand/hip_explicit_usm.cpp | 2 -- .../Graph/NativeCommand/hip_record_buffer.cpp | 2 -- .../Graph/NativeCommand/hip_record_usm.cpp | 2 -- sycl/test-e2e/Graph/NativeCommand/invalid.cpp | 2 -- .../Graph/NativeCommand/level-zero_usm.cpp | 2 -- .../NativeCommand/level-zero_usm_D2H_copy.cpp | 2 -- .../Graph/NativeCommand/opencl_buffer.cpp | 2 -- 16 files changed, 2 insertions(+), 77 deletions(-) diff --git a/sycl/include/sycl/interop_handle.hpp b/sycl/include/sycl/interop_handle.hpp index c865648048a5f..b797284ce5de5 100644 --- a/sycl/include/sycl/interop_handle.hpp +++ b/sycl/include/sycl/interop_handle.hpp @@ -215,18 +215,9 @@ class interop_handle { const std::shared_ptr &Queue, const std::shared_ptr &Device, const std::shared_ptr &Context, -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - [[maybe_unused]] -#endif ur_exp_command_buffer_handle_t Graph = nullptr) - : MQueue(Queue), MDevice(Device), MContext(Context), -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - // CMPLRLLVM-66082 - MGraph should become a member of this class on the - // next ABI breaking window. - MGraph(Graph), -#endif - MMemObjs(std::move(MemObjs)) { - } + : MQueue(Queue), MDevice(Device), MContext(Context), MGraph(Graph), + MMemObjs(std::move(MemObjs)) {} template backend_return_t> @@ -254,11 +245,7 @@ class interop_handle { std::shared_ptr MQueue; std::shared_ptr MDevice; std::shared_ptr MContext; -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - // CMPLRLLVM-66082 - MGraph should become a member of this class on the - // next ABI breaking window. ur_exp_command_buffer_handle_t MGraph; -#endif std::vector MMemObjs; }; diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 30bdf5a7bb8ab..f25efdeecd292 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -689,19 +689,6 @@ class queue_impl : public std::enable_shared_from_this { return ResEvent; } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - // CMPLRLLVM-66082 - // These methods are for accessing a member that should live in the - // sycl::interop_handle class and will be moved on next ABI breaking window. - ur_exp_command_buffer_handle_t getInteropGraph() const { - return MInteropGraph; - } - - void setInteropGraph(ur_exp_command_buffer_handle_t Graph) { - MInteropGraph = Graph; - } -#endif - /// Returns the async_handler associated with the queue. const async_handler &getAsynchHandler() const noexcept { return MAsyncHandler; diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index b2422958ed1d5..f36b1e269e009 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -3169,25 +3169,12 @@ ur_result_t ExecCGCommand::enqueueImpCommandBuffer() { CommandBufferNativeCommandData CustomOpData{ std::move(IH), HostTask->MHostTask->MInteropTask}; -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - // CMPLRLLVM-66082 - // The native command-buffer should be a member of the sycl::interop_handle - // class, but it is in an ABI breaking change to add it. So member lives in - // the queue as a intermediate workaround. - MQueue->setInteropGraph(InteropCommandBuffer); -#endif - Adapter.call( MCommandBuffer, CommandBufferInteropFreeFunc, &CustomOpData, ChildCommandBuffer, MSyncPointDeps.size(), MSyncPointDeps.empty() ? nullptr : MSyncPointDeps.data(), &OutSyncPoint); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - // See CMPLRLLVM-66082 - MQueue->setInteropGraph(nullptr); -#endif - if (ChildCommandBuffer) { ur_result_t Res = Adapter diff --git a/sycl/source/interop_handle.cpp b/sycl/source/interop_handle.cpp index 91cd9526e8498..1796bf5f3a089 100644 --- a/sycl/source/interop_handle.cpp +++ b/sycl/source/interop_handle.cpp @@ -24,13 +24,7 @@ backend interop_handle::get_backend() const noexcept { } bool interop_handle::ext_codeplay_has_graph() const noexcept { -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - // CMPLRLLVM-66082 - MGraph should become a member of this class on the - // next ABI breaking window. return MGraph != nullptr; -#else - return MQueue->getInteropGraph() != nullptr; -#endif } ur_native_handle_t @@ -66,13 +60,7 @@ interop_handle::getNativeQueue(int32_t &NativeHandleDesc) const { } ur_native_handle_t interop_handle::getNativeGraph() const { -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - // CMPLRLLVM-66082 - MGraph should become a member of this class on the - // next ABI breaking window. auto Graph = MGraph; -#else - auto Graph = MQueue->getInteropGraph(); -#endif if (!Graph) { throw exception( diff --git a/sycl/test-e2e/Graph/NativeCommand/cuda_explicit_usm.cpp b/sycl/test-e2e/Graph/NativeCommand/cuda_explicit_usm.cpp index e93e0a80fb7f3..9d0122e0eeac6 100644 --- a/sycl/test-e2e/Graph/NativeCommand/cuda_explicit_usm.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/cuda_explicit_usm.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %cuda_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-nvidia, cuda_dev_kit #include diff --git a/sycl/test-e2e/Graph/NativeCommand/cuda_multiple_native_commands.cpp b/sycl/test-e2e/Graph/NativeCommand/cuda_multiple_native_commands.cpp index 7706b45c98578..91da127bb5bdf 100644 --- a/sycl/test-e2e/Graph/NativeCommand/cuda_multiple_native_commands.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/cuda_multiple_native_commands.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %cuda_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-nvidia, cuda_dev_kit // REQUIRES: aspect-usm_shared_allocations diff --git a/sycl/test-e2e/Graph/NativeCommand/cuda_record_async_malloc.cpp b/sycl/test-e2e/Graph/NativeCommand/cuda_record_async_malloc.cpp index ed96eb9eb2e68..5e92b877f8197 100644 --- a/sycl/test-e2e/Graph/NativeCommand/cuda_record_async_malloc.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/cuda_record_async_malloc.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %cuda_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-nvidia, cuda_dev_kit #include diff --git a/sycl/test-e2e/Graph/NativeCommand/cuda_record_buffer.cpp b/sycl/test-e2e/Graph/NativeCommand/cuda_record_buffer.cpp index 5243f41a447c8..215b5442501df 100644 --- a/sycl/test-e2e/Graph/NativeCommand/cuda_record_buffer.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/cuda_record_buffer.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %cuda_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-nvidia, cuda_dev_kit #include diff --git a/sycl/test-e2e/Graph/NativeCommand/cuda_record_usm.cpp b/sycl/test-e2e/Graph/NativeCommand/cuda_record_usm.cpp index c51635e05c676..a7193be4ee3cf 100644 --- a/sycl/test-e2e/Graph/NativeCommand/cuda_record_usm.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/cuda_record_usm.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out %cuda_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %cuda_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-nvidia, cuda_dev_kit #include diff --git a/sycl/test-e2e/Graph/NativeCommand/hip_explicit_usm.cpp b/sycl/test-e2e/Graph/NativeCommand/hip_explicit_usm.cpp index ed29417c41675..3cee7d8e60c7f 100644 --- a/sycl/test-e2e/Graph/NativeCommand/hip_explicit_usm.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/hip_explicit_usm.cpp @@ -1,7 +1,5 @@ // RUN: %{run-aux} %{build} -Wno-error=deprecated-pragma -o %t.out %hip_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{run-aux} %{build} -Wno-error=deprecated-pragma -fpreview-breaking-changes -o %t2.out %hip_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-amd #define __HIP_PLATFORM_AMD__ diff --git a/sycl/test-e2e/Graph/NativeCommand/hip_record_buffer.cpp b/sycl/test-e2e/Graph/NativeCommand/hip_record_buffer.cpp index 47cfeb366e901..290c173ce040e 100644 --- a/sycl/test-e2e/Graph/NativeCommand/hip_record_buffer.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/hip_record_buffer.cpp @@ -1,7 +1,5 @@ // RUN: %{run-aux} %{build} -Wno-error=deprecated-pragma -o %t.out %hip_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{run-aux} %{build} -Wno-error=deprecated-pragma -fpreview-breaking-changes -o %t2.out %hip_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-amd #define __HIP_PLATFORM_AMD__ diff --git a/sycl/test-e2e/Graph/NativeCommand/hip_record_usm.cpp b/sycl/test-e2e/Graph/NativeCommand/hip_record_usm.cpp index a24ec6fd105ff..598bff1fe7f61 100644 --- a/sycl/test-e2e/Graph/NativeCommand/hip_record_usm.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/hip_record_usm.cpp @@ -1,7 +1,5 @@ // RUN: %{run-aux} %{build} -Wno-error=deprecated-pragma -o %t.out %hip_options // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{run-aux} %{build} -Wno-error=deprecated-pragma -fpreview-breaking-changes -o %t2.out %hip_options %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-amd #define __HIP_PLATFORM_AMD__ diff --git a/sycl/test-e2e/Graph/NativeCommand/invalid.cpp b/sycl/test-e2e/Graph/NativeCommand/invalid.cpp index a1eddf5e7954f..88d83b5797b4c 100644 --- a/sycl/test-e2e/Graph/NativeCommand/invalid.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/invalid.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: target-nvidia // Test that interop_handle::ext_codeplay_get_native_graph() throws if no diff --git a/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp b/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp index a941f2688286f..2660359f130a0 100644 --- a/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/level-zero_usm.cpp @@ -1,7 +1,5 @@ // RUN: %{build} %level_zero_options -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} %level_zero_options -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: level_zero, level_zero_dev_kit // UNSUPPORTED: level_zero_v2_adapter diff --git a/sycl/test-e2e/Graph/NativeCommand/level-zero_usm_D2H_copy.cpp b/sycl/test-e2e/Graph/NativeCommand/level-zero_usm_D2H_copy.cpp index e87a262efa4d3..43be6bc804484 100644 --- a/sycl/test-e2e/Graph/NativeCommand/level-zero_usm_D2H_copy.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/level-zero_usm_D2H_copy.cpp @@ -1,7 +1,5 @@ // RUN: %{build} %level_zero_options -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} %level_zero_options -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: level_zero, level_zero_dev_kit // Tests that the optimization to use the L0 Copy Engine for memory commands diff --git a/sycl/test-e2e/Graph/NativeCommand/opencl_buffer.cpp b/sycl/test-e2e/Graph/NativeCommand/opencl_buffer.cpp index 96e1a25a1082c..385d144d16966 100644 --- a/sycl/test-e2e/Graph/NativeCommand/opencl_buffer.cpp +++ b/sycl/test-e2e/Graph/NativeCommand/opencl_buffer.cpp @@ -1,7 +1,5 @@ // RUN: %{build} -o %t.out %threads_lib %opencl_lib // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %threads_lib %opencl_lib %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} // REQUIRES: opencl, opencl_icd #include