From 44b3fd5251a1a4429e3508707673c4a43e6001be Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Fri, 12 Sep 2025 09:55:54 -0700 Subject: [PATCH] [NFC][SYCL] Reduce dependencies of `sycl/detail/helpers.hpp` --- sycl/include/sycl/detail/helpers.hpp | 7 ------- sycl/include/sycl/handler.hpp | 4 ++++ sycl/source/detail/helpers.cpp | 5 ----- sycl/source/handler.cpp | 5 +++++ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/sycl/include/sycl/detail/helpers.hpp b/sycl/include/sycl/detail/helpers.hpp index 5bee5b080e1bb..473e51589e65e 100644 --- a/sycl/include/sycl/detail/helpers.hpp +++ b/sycl/include/sycl/detail/helpers.hpp @@ -18,11 +18,9 @@ #endif #include // for size_t -#include // for shared_ptr #include // for uint32_t #include // for enable_if_t, integral_constant #include // for forward, integer_sequence, mak... -#include // for vector namespace sycl { inline namespace _V1 { @@ -38,11 +36,6 @@ template class marray; enum class memory_order; namespace detail { -class buffer_impl; - -__SYCL_EXPORT void -markBufferAsInternal(const std::shared_ptr &BufImpl); - template T *declptr() { return static_cast(nullptr); } // Function to get or store id, item, nd_item, group for the host implementation diff --git a/sycl/include/sycl/handler.hpp b/sycl/include/sycl/handler.hpp index 44b46d4960910..e3d5c8cfe8dea 100644 --- a/sycl/include/sycl/handler.hpp +++ b/sycl/include/sycl/handler.hpp @@ -166,6 +166,10 @@ class graph_impl; class dynamic_parameter_impl; } // namespace ext::oneapi::experimental::detail namespace detail { +class buffer_impl; + +__SYCL_EXPORT void +markBufferAsInternal(const std::shared_ptr &BufImpl); class type_erased_cgfo_ty { // From SYCL 2020, command group function object: diff --git a/sycl/source/detail/helpers.cpp b/sycl/source/detail/helpers.cpp index fab0c3d78ad4f..0282ac28a0a79 100644 --- a/sycl/source/detail/helpers.cpp +++ b/sycl/source/detail/helpers.cpp @@ -34,11 +34,6 @@ __SYCL_EXPORT void waitEvents(std::vector DepEvents) { } #endif -__SYCL_EXPORT void -markBufferAsInternal(const std::shared_ptr &BufImpl) { - BufImpl->markAsInternal(); -} - const RTDeviceBinaryImage *retrieveKernelBinary(queue_impl &Queue, KernelNameStrRefT KernelName, CGExecKernel *KernelCG) { diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index f11aba30f025f..71aa92124f1c8 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -10,6 +10,7 @@ #include "ur_api.h" #include +#include #include #include #include @@ -49,6 +50,10 @@ namespace sycl { inline namespace _V1 { namespace detail { +__SYCL_EXPORT void +markBufferAsInternal(const std::shared_ptr &BufImpl) { + BufImpl->markAsInternal(); +} #ifdef __INTEL_PREVIEW_BREAKING_CHANGES // TODO: Check if two ABI exports below are still necessary.