From 17d02310d23a1a5e7cfdf3f11c0c926081154ad9 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Tue, 17 Jun 2025 11:54:34 +0200 Subject: [PATCH 1/9] [SYCL] Fix `sycl::atomic` regression This is a follow-up for intel/llvm#18839 which broke host compilation of `sycl::atomic`. The actual fix is just an addition of `#include ` to `sycl/atomic.hpp`. However, I didn't want `spirv_ops.hpp` appear again in `sycl/detail/core.hpp` and therefore I went further to make sure that `sycl/atomic.hpp` isn't used by `sycl/accessor.hpp` which prompted other changes in this PR. --- sycl/include/sycl/accessor.hpp | 14 ++-- sycl/include/sycl/atomic.hpp | 1 + sycl/test-e2e/Basic/accessor/accessor.cpp | 2 + .../Basic/compare_exchange_strong.cpp | 1 + .../parallel_for_disable_range_roundup.cpp | 4 +- .../Basic/parallel_for_range_roundup.cpp | 4 +- sycl/test-e2e/Regression/atomic_load.cpp | 2 + .../Regression/implicit_atomic_conversion.cpp | 1 + sycl/test-e2e/XPTI/buffer/accessors.cpp | 1 + sycl/test/include_deps/sycl_accessor.hpp.cpp | 35 +++++---- .../include_deps/sycl_detail_core.hpp.cpp | 35 +++++---- sycl/test/regression/atomic.cpp | 74 +++++++++++++++++++ 12 files changed, 130 insertions(+), 44 deletions(-) create mode 100644 sycl/test/regression/atomic.cpp diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 2917774314e1f..35a9f23742ecd 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -9,7 +9,6 @@ #pragma once #include // for target, mode -#include // for atomic #include // for range #include // for accessor_iterator #include // for code_location @@ -215,6 +214,9 @@ namespace sycl { inline namespace _V1 { class stream; +template +class atomic; + namespace ext::intel::esimd::detail { // Forward declare a "back-door" access class to support ESIMD. class AccessorPrivateProxy; @@ -1755,14 +1757,14 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor : } template - operator typename std::enable_if_t + atomic #else - atomic + atomic #endif - >() const { + >() const { const size_t LinearIndex = getLinearIndex(id()); return atomic(multi_ptr( getQualifiedPtr() + LinearIndex)); diff --git a/sycl/include/sycl/atomic.hpp b/sycl/include/sycl/atomic.hpp index 8cae0c047c0a1..c2bedd9989fcd 100644 --- a/sycl/include/sycl/atomic.hpp +++ b/sycl/include/sycl/atomic.hpp @@ -8,6 +8,7 @@ #pragma once +#include #include // for Scope, MemorySemanticsMask #include // for address_space, decorated #include // for __SYCL2020_DEPRECATED diff --git a/sycl/test-e2e/Basic/accessor/accessor.cpp b/sycl/test-e2e/Basic/accessor/accessor.cpp index 3ab25cd68405f..617f9a39585d6 100644 --- a/sycl/test-e2e/Basic/accessor/accessor.cpp +++ b/sycl/test-e2e/Basic/accessor/accessor.cpp @@ -15,6 +15,8 @@ //===----------------------------------------------------------------------===// #include #include + +#include #include struct IdxID1 { diff --git a/sycl/test-e2e/Basic/compare_exchange_strong.cpp b/sycl/test-e2e/Basic/compare_exchange_strong.cpp index c95b7797f0749..92e0a30f04d98 100644 --- a/sycl/test-e2e/Basic/compare_exchange_strong.cpp +++ b/sycl/test-e2e/Basic/compare_exchange_strong.cpp @@ -1,6 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out +#include #include using namespace sycl; diff --git a/sycl/test-e2e/Basic/parallel_for_disable_range_roundup.cpp b/sycl/test-e2e/Basic/parallel_for_disable_range_roundup.cpp index 509172de63f03..676188b39e9e0 100644 --- a/sycl/test-e2e/Basic/parallel_for_disable_range_roundup.cpp +++ b/sycl/test-e2e/Basic/parallel_for_disable_range_roundup.cpp @@ -6,8 +6,10 @@ // RUN: %{build} -sycl-std=2020 -o %t2.out // RUN: env SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %{run} %t2.out | FileCheck %s --check-prefix CHECK-ENABLED -#include +#include #include + +#include using namespace sycl; range<1> Range1 = {0}; diff --git a/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp b/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp index 0866e2dfe32f8..67123d393269d 100644 --- a/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp +++ b/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp @@ -25,10 +25,12 @@ // UNSUPPORTED: hip // UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17077 // -#include +#include #include #include +#include + using namespace sycl; constexpr size_t MagicY = 33, MagicZ = 64; diff --git a/sycl/test-e2e/Regression/atomic_load.cpp b/sycl/test-e2e/Regression/atomic_load.cpp index 8771db61db935..3f5c31b9ad0f6 100644 --- a/sycl/test-e2e/Regression/atomic_load.cpp +++ b/sycl/test-e2e/Regression/atomic_load.cpp @@ -1,6 +1,8 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out +#include #include + using namespace sycl; template class foo; diff --git a/sycl/test-e2e/Regression/implicit_atomic_conversion.cpp b/sycl/test-e2e/Regression/implicit_atomic_conversion.cpp index 8adfc00d37048..00ea968a5b53f 100644 --- a/sycl/test-e2e/Regression/implicit_atomic_conversion.cpp +++ b/sycl/test-e2e/Regression/implicit_atomic_conversion.cpp @@ -1,6 +1,7 @@ // RUN: %{build} -Wno-error=deprecated-declarations -o %t.out // RUN: %{run} %t.out +#include #include using namespace sycl; diff --git a/sycl/test-e2e/XPTI/buffer/accessors.cpp b/sycl/test-e2e/XPTI/buffer/accessors.cpp index ed04243675a73..2bac9a54b2403 100644 --- a/sycl/test-e2e/XPTI/buffer/accessors.cpp +++ b/sycl/test-e2e/XPTI/buffer/accessors.cpp @@ -9,6 +9,7 @@ #else +#include #include using namespace sycl::access; diff --git a/sycl/test/include_deps/sycl_accessor.hpp.cpp b/sycl/test/include_deps/sycl_accessor.hpp.cpp index 7749d8dd4a79f..fcd8fe3e5e904 100644 --- a/sycl/test/include_deps/sycl_accessor.hpp.cpp +++ b/sycl/test/include_deps/sycl_accessor.hpp.cpp @@ -7,32 +7,21 @@ // CHECK-NEXT: accessor.hpp // CHECK-NEXT: access/access.hpp // CHECK-NEXT: detail/defines_elementary.hpp -// CHECK-NEXT: atomic.hpp -// CHECK-NEXT: __spirv/spirv_types.hpp -// CHECK-NEXT: detail/defines.hpp -// CHECK-NEXT: detail/helpers.hpp -// CHECK-NEXT: detail/export.hpp -// CHECK-NEXT: memory_enums.hpp -// CHECK-NEXT: __spirv/spirv_vars.hpp -// CHECK-NEXT: multi_ptr.hpp -// CHECK-NEXT: aliases.hpp -// CHECK-NEXT: detail/address_space_cast.hpp -// CHECK-NEXT: detail/type_traits.hpp -// CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp -// CHECK-NEXT: half_type.hpp -// CHECK-NEXT: bit_cast.hpp -// CHECK-NEXT: detail/iostream_proxy.hpp -// CHECK-NEXT: aspects.hpp -// CHECK-NEXT: info/aspects.def -// CHECK-NEXT: info/aspects_deprecated.def // CHECK-NEXT: buffer.hpp // CHECK-NEXT: backend_types.hpp // CHECK-NEXT: detail/array.hpp // CHECK-NEXT: exception.hpp +// CHECK-NEXT: detail/export.hpp // CHECK-NEXT: detail/string.hpp // CHECK-NEXT: detail/common.hpp // CHECK-NEXT: stl_wrappers/cassert // CHECK-NEXT: stl_wrappers/assert.h +// CHECK-NEXT: __spirv/spirv_vars.hpp +// CHECK-NEXT: __spirv/spirv_types.hpp +// CHECK-NEXT: detail/defines.hpp +// CHECK-NEXT: detail/helpers.hpp +// CHECK-NEXT: memory_enums.hpp +// CHECK-NEXT: detail/iostream_proxy.hpp // CHECK-NEXT: detail/is_device_copyable.hpp // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp @@ -51,6 +40,16 @@ // CHECK-NEXT: ur_api.h // CHECK-NEXT: detail/accessor_iterator.hpp // CHECK-NEXT: detail/generic_type_traits.hpp +// CHECK-NEXT: aliases.hpp +// CHECK-NEXT: detail/type_traits.hpp +// CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp +// CHECK-NEXT: half_type.hpp +// CHECK-NEXT: bit_cast.hpp +// CHECK-NEXT: aspects.hpp +// CHECK-NEXT: info/aspects.def +// CHECK-NEXT: info/aspects_deprecated.def +// CHECK-NEXT: multi_ptr.hpp +// CHECK-NEXT: detail/address_space_cast.hpp // CHECK-NEXT: ext/oneapi/bfloat16.hpp // CHECK-NEXT: detail/handler_proxy.hpp // CHECK-NEXT: pointers.hpp diff --git a/sycl/test/include_deps/sycl_detail_core.hpp.cpp b/sycl/test/include_deps/sycl_detail_core.hpp.cpp index d33c354e88af9..113ded48b7526 100644 --- a/sycl/test/include_deps/sycl_detail_core.hpp.cpp +++ b/sycl/test/include_deps/sycl_detail_core.hpp.cpp @@ -8,32 +8,21 @@ // CHECK-NEXT: accessor.hpp // CHECK-NEXT: access/access.hpp // CHECK-NEXT: detail/defines_elementary.hpp -// CHECK-NEXT: atomic.hpp -// CHECK-NEXT: __spirv/spirv_types.hpp -// CHECK-NEXT: detail/defines.hpp -// CHECK-NEXT: detail/helpers.hpp -// CHECK-NEXT: detail/export.hpp -// CHECK-NEXT: memory_enums.hpp -// CHECK-NEXT: __spirv/spirv_vars.hpp -// CHECK-NEXT: multi_ptr.hpp -// CHECK-NEXT: aliases.hpp -// CHECK-NEXT: detail/address_space_cast.hpp -// CHECK-NEXT: detail/type_traits.hpp -// CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp -// CHECK-NEXT: half_type.hpp -// CHECK-NEXT: bit_cast.hpp -// CHECK-NEXT: detail/iostream_proxy.hpp -// CHECK-NEXT: aspects.hpp -// CHECK-NEXT: info/aspects.def -// CHECK-NEXT: info/aspects_deprecated.def // CHECK-NEXT: buffer.hpp // CHECK-NEXT: backend_types.hpp // CHECK-NEXT: detail/array.hpp // CHECK-NEXT: exception.hpp +// CHECK-NEXT: detail/export.hpp // CHECK-NEXT: detail/string.hpp // CHECK-NEXT: detail/common.hpp // CHECK-NEXT: stl_wrappers/cassert // CHECK-NEXT: stl_wrappers/assert.h +// CHECK-NEXT: __spirv/spirv_vars.hpp +// CHECK-NEXT: __spirv/spirv_types.hpp +// CHECK-NEXT: detail/defines.hpp +// CHECK-NEXT: detail/helpers.hpp +// CHECK-NEXT: memory_enums.hpp +// CHECK-NEXT: detail/iostream_proxy.hpp // CHECK-NEXT: detail/is_device_copyable.hpp // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp @@ -52,6 +41,16 @@ // CHECK-NEXT: ur_api.h // CHECK-NEXT: detail/accessor_iterator.hpp // CHECK-NEXT: detail/generic_type_traits.hpp +// CHECK-NEXT: aliases.hpp +// CHECK-NEXT: detail/type_traits.hpp +// CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp +// CHECK-NEXT: half_type.hpp +// CHECK-NEXT: bit_cast.hpp +// CHECK-NEXT: aspects.hpp +// CHECK-NEXT: info/aspects.def +// CHECK-NEXT: info/aspects_deprecated.def +// CHECK-NEXT: multi_ptr.hpp +// CHECK-NEXT: detail/address_space_cast.hpp // CHECK-NEXT: ext/oneapi/bfloat16.hpp // CHECK-NEXT: detail/handler_proxy.hpp // CHECK-NEXT: pointers.hpp diff --git a/sycl/test/regression/atomic.cpp b/sycl/test/regression/atomic.cpp new file mode 100644 index 0000000000000..428e093cad0e8 --- /dev/null +++ b/sycl/test/regression/atomic.cpp @@ -0,0 +1,74 @@ +// RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations -Xclang -verify %s +// expected-no-diagnostics + +#include +#include + +SYCL_EXTERNAL void +store(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + a.store(value); +} + +SYCL_EXTERNAL int +load(sycl::multi_ptr mptr) { + sycl::atomic a(mptr); + return a.load(); +} + +SYCL_EXTERNAL int +exchange(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.exchange(value); +} + +SYCL_EXTERNAL int +fetch_add(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_add(value); +} + +SYCL_EXTERNAL int +fetch_sub(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_sub(value); +} + +SYCL_EXTERNAL int +fetch_and(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_and(value); +} + +SYCL_EXTERNAL int +fetch_or(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_or(value); +} + +SYCL_EXTERNAL int +fetch_xor(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_xor(value); +} + +SYCL_EXTERNAL int +fetch_min(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_min(value); +} + +SYCL_EXTERNAL int +fetch_max(sycl::multi_ptr mptr, + int value) { + sycl::atomic a(mptr); + return a.fetch_max(value); +} From b981d1d3215b771b0811337d1beceaa5520d6003 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Tue, 17 Jun 2025 12:42:47 +0200 Subject: [PATCH 2/9] Clang-format --- sycl/include/sycl/accessor.hpp | 2 +- sycl/test/regression/atomic.cpp | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 35a9f23742ecd..9d66b0f81b5cb 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -1758,7 +1758,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor : template operator typename std::enable_if_t< - Dims == 0 &&AccessMode == access::mode::atomic, + Dims == 0 && AccessMode == access::mode::atomic, #ifdef __ENABLE_USM_ADDR_SPACE__ atomic #else diff --git a/sycl/test/regression/atomic.cpp b/sycl/test/regression/atomic.cpp index 428e093cad0e8..987fd7a0fbb2a 100644 --- a/sycl/test/regression/atomic.cpp +++ b/sycl/test/regression/atomic.cpp @@ -1,8 +1,8 @@ // RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations -Xclang -verify %s // expected-no-diagnostics -#include #include +#include SYCL_EXTERNAL void store(sycl::multi_ptr mptr, @@ -19,56 +19,56 @@ load(sycl::multi_ptr mptr) { SYCL_EXTERNAL int exchange(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.exchange(value); } SYCL_EXTERNAL int fetch_add(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_add(value); } SYCL_EXTERNAL int fetch_sub(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_sub(value); } SYCL_EXTERNAL int fetch_and(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_and(value); } SYCL_EXTERNAL int fetch_or(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_or(value); } SYCL_EXTERNAL int fetch_xor(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_xor(value); } SYCL_EXTERNAL int fetch_min(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_min(value); } SYCL_EXTERNAL int fetch_max(sycl::multi_ptr mptr, - int value) { + int value) { sycl::atomic a(mptr); return a.fetch_max(value); } From f379dc85270119226dc5643e993cbc83689af00a Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Tue, 17 Jun 2025 18:14:18 +0200 Subject: [PATCH 3/9] More clang-format --- sycl/include/sycl/accessor.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 9d66b0f81b5cb..3e9bfd250b11d 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -214,8 +214,7 @@ namespace sycl { inline namespace _V1 { class stream; -template -class atomic; +template class atomic; namespace ext::intel::esimd::detail { // Forward declare a "back-door" access class to support ESIMD. From fdf49b0d9c117185f508e3a1c8ea5e989642f3a3 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Wed, 18 Jun 2025 14:07:22 +0200 Subject: [PATCH 4/9] Test --- sycl/include/sycl/accessor.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 3e9bfd250b11d..91f8a05ae05c7 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -32,6 +32,7 @@ #include // for buffer, buffer... #include // for property_list #include // for range +#include #include // for size_t #include // for hash From cdb89eaf9a827628c01b2e7b1fb6ce500c016431 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Wed, 18 Jun 2025 14:44:43 +0200 Subject: [PATCH 5/9] test --- sycl/include/sycl/accessor.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 91f8a05ae05c7..747956eee3336 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -8,7 +8,8 @@ #pragma once -#include // for target, mode +#include // for target, mode +#include #include // for range #include // for accessor_iterator #include // for code_location @@ -32,7 +33,6 @@ #include // for buffer, buffer... #include // for property_list #include // for range -#include #include // for size_t #include // for hash From 2172e20e523d0b536bdb9955bd2ee5054963b01b Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Mon, 23 Jun 2025 15:17:45 +0200 Subject: [PATCH 6/9] one more attempt --- sycl/include/sycl/accessor.hpp | 2 +- sycl/include/sycl/detail/assumme_int.hpp | 21 +++++++++++++++++++++ sycl/include/sycl/detail/defines.hpp | 12 ------------ sycl/include/sycl/id.hpp | 2 +- sycl/include/sycl/item.hpp | 2 +- sycl/include/sycl/nd_item.hpp | 1 + 6 files changed, 25 insertions(+), 15 deletions(-) create mode 100644 sycl/include/sycl/detail/assumme_int.hpp diff --git a/sycl/include/sycl/accessor.hpp b/sycl/include/sycl/accessor.hpp index 747956eee3336..66df8d9f97a05 100644 --- a/sycl/include/sycl/accessor.hpp +++ b/sycl/include/sycl/accessor.hpp @@ -9,7 +9,7 @@ #pragma once #include // for target, mode -#include +#include #include // for range #include // for accessor_iterator #include // for code_location diff --git a/sycl/include/sycl/detail/assumme_int.hpp b/sycl/include/sycl/detail/assumme_int.hpp new file mode 100644 index 0000000000000..f653c1cdcf104 --- /dev/null +++ b/sycl/include/sycl/detail/assumme_int.hpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#pragma once + +#include // for __SYCL_ID_QUERIES_FIT_... + +#if __SYCL_ID_QUERIES_FIT_IN_INT__ && __has_builtin(__builtin_assume) +#include +#define __SYCL_ASSUME_INT(x) __builtin_assume((x) <= INT_MAX) +#else +#define __SYCL_ASSUME_INT(x) +#if __SYCL_ID_QUERIES_FIT_IN_INT__ && !__has_builtin(__builtin_assume) +#warning "No assumptions will be emitted due to no __builtin_assume available" +#endif +#endif diff --git a/sycl/include/sycl/detail/defines.hpp b/sycl/include/sycl/detail/defines.hpp index 3502465df101d..9348e9217902c 100644 --- a/sycl/include/sycl/detail/defines.hpp +++ b/sycl/include/sycl/detail/defines.hpp @@ -8,18 +8,6 @@ #pragma once -#include // for __SYCL_ID_QUERIES_FIT_... - -#if __SYCL_ID_QUERIES_FIT_IN_INT__ && __has_builtin(__builtin_assume) -#include -#define __SYCL_ASSUME_INT(x) __builtin_assume((x) <= INT_MAX) -#else -#define __SYCL_ASSUME_INT(x) -#if __SYCL_ID_QUERIES_FIT_IN_INT__ && !__has_builtin(__builtin_assume) -#warning "No assumptions will be emitted due to no __builtin_assume available" -#endif -#endif - // FIXME Check for __SYCL_DEVICE_ONLY__ can be removed if implementation of // __has_attribute is fixed to consider LangOpts when generating attributes in // tablegen. diff --git a/sycl/include/sycl/id.hpp b/sycl/include/sycl/id.hpp index bc17ff460e0eb..2f502efec73c0 100644 --- a/sycl/include/sycl/id.hpp +++ b/sycl/include/sycl/id.hpp @@ -10,7 +10,7 @@ #include // for array #include // for InitializedVal -#include // for __SYCL_ASSUME_INT +#include // for __SYCL_ASSUME_INT #include // for __SYCL_DEPRECATED, __SYCL_A... #include // for make_error_code, errc, exce... #include // for range diff --git a/sycl/include/sycl/item.hpp b/sycl/include/sycl/item.hpp index 12aed3dc072f1..0d2005a020300 100644 --- a/sycl/include/sycl/item.hpp +++ b/sycl/include/sycl/item.hpp @@ -8,7 +8,7 @@ #pragma once -#include // for __SYCL_ASSUME_INT +#include // for __SYCL_ASSUME_INT #include // for __SYCL_ALWAYS_INLINE, __SYC... #include // for Builder #include // for id, range, ItemBase diff --git a/sycl/include/sycl/nd_item.hpp b/sycl/include/sycl/nd_item.hpp index 76ec89f2bba70..b67085caabb2e 100644 --- a/sycl/include/sycl/nd_item.hpp +++ b/sycl/include/sycl/nd_item.hpp @@ -8,6 +8,7 @@ #pragma once +#include // for __SYCL_ASSUME_INT #include // for Scope #include // for initLocalInvocationId #include // for mode, fence_space From cebb14113a22749ad66a9f77c14d0b618c280afd Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Mon, 23 Jun 2025 15:57:10 +0200 Subject: [PATCH 7/9] fix build --- sycl/include/sycl/detail/{assumme_int.hpp => assume_int.hpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sycl/include/sycl/detail/{assumme_int.hpp => assume_int.hpp} (100%) diff --git a/sycl/include/sycl/detail/assumme_int.hpp b/sycl/include/sycl/detail/assume_int.hpp similarity index 100% rename from sycl/include/sycl/detail/assumme_int.hpp rename to sycl/include/sycl/detail/assume_int.hpp From e8bc226b59ba91878a247fe4a98b4c9ff3334fbb Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Tue, 24 Jun 2025 16:23:58 +0200 Subject: [PATCH 8/9] Fix --- sycl/include/sycl/detail/defines.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sycl/include/sycl/detail/defines.hpp b/sycl/include/sycl/detail/defines.hpp index 9348e9217902c..99063bfe2623a 100644 --- a/sycl/include/sycl/detail/defines.hpp +++ b/sycl/include/sycl/detail/defines.hpp @@ -8,6 +8,8 @@ #pragma once +#include + // FIXME Check for __SYCL_DEVICE_ONLY__ can be removed if implementation of // __has_attribute is fixed to consider LangOpts when generating attributes in // tablegen. From d34b75b4ad1df7b543b4902e5b64993e9c311264 Mon Sep 17 00:00:00 2001 From: Alexey Sachkov Date: Tue, 24 Jun 2025 17:53:59 +0200 Subject: [PATCH 9/9] one more attempt --- sycl/test-e2e/DeviceLib/exp/exp-std-complex-edge-cases.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/test-e2e/DeviceLib/exp/exp-std-complex-edge-cases.hpp b/sycl/test-e2e/DeviceLib/exp/exp-std-complex-edge-cases.hpp index c0c4d4cc85e91..65e5f2c227877 100644 --- a/sycl/test-e2e/DeviceLib/exp/exp-std-complex-edge-cases.hpp +++ b/sycl/test-e2e/DeviceLib/exp/exp-std-complex-edge-cases.hpp @@ -1,9 +1,10 @@ // This test checks edge cases handling for std::exp(std::complex) used // in SYCL kernels. +#include + #include -#include #include #include