From 84888a43be4f43136f7d3d722a25718fad07061c Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Tue, 23 Sep 2025 12:42:18 -0700 Subject: [PATCH] [NFC][SYCL] Minor includes cleanup Trying to reduce compile-time for ```c+++ namespace oneapi = sycl::ext::oneapi; extern "C" SYCL_EXT_ONEAPI_FUNCTION_PROPERTY((oneapi::experimental::nd_range_kernel<1>)) void iota(float start, float *ptr) { size_t id = oneapi::this_work_item::get_nd_item<1>().get_global_linear_id(); ptr[id] = start + static_cast(id); } ``` --- sycl/include/sycl/detail/common.hpp | 5 ----- sycl/include/sycl/ext/oneapi/properties/properties.hpp | 8 +------- .../include/sycl/ext/oneapi/properties/property_utils.hpp | 3 --- .../include/sycl/ext/oneapi/properties/property_value.hpp | 2 -- sycl/source/detail/adapter_impl.hpp | 4 ++++ sycl/unittests/helpers/ScopedEnvVar.hpp | 1 + 6 files changed, 6 insertions(+), 17 deletions(-) diff --git a/sycl/include/sycl/detail/common.hpp b/sycl/include/sycl/detail/common.hpp index 91a87cc56dd36..a0476e21657a7 100644 --- a/sycl/include/sycl/detail/common.hpp +++ b/sycl/include/sycl/detail/common.hpp @@ -20,7 +20,6 @@ #include // for assert #include // for size_t #include -#include // for allocator, operator+ #include // for enable_if_t #include // for index_sequence, make_i... @@ -200,10 +199,6 @@ class __SYCL_EXPORT tls_code_loc_t { #define __SYCL_ASSERT(x) assert(x) #endif // #ifdef __SYCL_DEVICE_ONLY__ -#define __SYCL_UR_ERROR_REPORT(backend) \ - std::string(sycl::detail::get_backend_name_no_vendor(backend)) + \ - " backend failed with error: " - namespace sycl { inline namespace _V1 { namespace detail { diff --git a/sycl/include/sycl/ext/oneapi/properties/properties.hpp b/sycl/include/sycl/ext/oneapi/properties/properties.hpp index c7770e228bde8..f96d11fbeabe3 100644 --- a/sycl/include/sycl/ext/oneapi/properties/properties.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/properties.hpp @@ -9,13 +9,7 @@ #pragma once #include -#include // for IsRuntimePr... -#include // for Sorted, Mer... -#include // for property_value - -#include // for tuple, tupl... -#include // for enable_if_t -#include // for tuple +#include namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp b/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp index 42e4b315073f8..27d8a09e400c9 100644 --- a/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/property_utils.hpp @@ -11,11 +11,8 @@ #include #include -#include // for tuple_element #include // for size_t -#include // for tuple #include // for false_type, true_... -#include // for tuple namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/properties/property_value.hpp b/sycl/include/sycl/ext/oneapi/properties/property_value.hpp index 813e4ecf964ea..fd0b718daa3f0 100644 --- a/sycl/include/sycl/ext/oneapi/properties/property_value.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/property_value.hpp @@ -10,8 +10,6 @@ #include -#include // for enable_if_t - namespace sycl { inline namespace _V1 { namespace ext::oneapi::experimental { diff --git a/sycl/source/detail/adapter_impl.hpp b/sycl/source/detail/adapter_impl.hpp index 48efa30a3cbf0..f2f6b0c3fac16 100644 --- a/sycl/source/detail/adapter_impl.hpp +++ b/sycl/source/detail/adapter_impl.hpp @@ -24,6 +24,10 @@ #include #include +#define __SYCL_UR_ERROR_REPORT(backend) \ + std::string(sycl::detail::get_backend_name_no_vendor(backend)) + \ + " backend failed with error: " + #define __SYCL_CHECK_UR_CODE_NO_EXC(expr, backend) \ { \ auto code = expr; \ diff --git a/sycl/unittests/helpers/ScopedEnvVar.hpp b/sycl/unittests/helpers/ScopedEnvVar.hpp index a9b3352d93342..b23aadd98c391 100644 --- a/sycl/unittests/helpers/ScopedEnvVar.hpp +++ b/sycl/unittests/helpers/ScopedEnvVar.hpp @@ -13,6 +13,7 @@ #include #include #include +#include namespace sycl { inline namespace _V1 {