diff --git a/libdevice/nativecpu_utils.cpp b/libdevice/nativecpu_utils.cpp index 65e6c4c1fd0d1..c3e8bb61657a7 100644 --- a/libdevice/nativecpu_utils.cpp +++ b/libdevice/nativecpu_utils.cpp @@ -17,7 +17,7 @@ #include "device.h" #include #include -#include +#include // including state definition from Native CPU UR adapter #include "nativecpu_state.hpp" diff --git a/sycl/include/sycl/aliases.hpp b/sycl/include/sycl/aliases.hpp index 1640c11db6078..fc359b7659802 100644 --- a/sycl/include/sycl/aliases.hpp +++ b/sycl/include/sycl/aliases.hpp @@ -9,7 +9,6 @@ #pragma once #include // for __SYCL2020_DEPRECATED -#include // for half #include // for uint8_t, int16_t, int32_t diff --git a/sycl/include/sycl/backend.hpp b/sycl/include/sycl/backend.hpp index 24750732b08ff..fc477128b57b4 100644 --- a/sycl/include/sycl/backend.hpp +++ b/sycl/include/sycl/backend.hpp @@ -15,7 +15,6 @@ #include // for buffer_allocator #include // for context, get_na... #include // for InteropFeatureS... -#include // for _cl_event #include // for __SYCL_DEPRECATED #include // for __SYCL_EXPORT #include // for createSyclObjFr... @@ -23,13 +22,10 @@ #include // for event, get_native #include // for make_error_code #include // for SYCL_BACKEND_OP... -#include // for buffer #include // for image, image_al... -#include // for kernel, get_native #include // for kernel_bundle #include // for bundle_state #include // for platform, get_n... -#include // for property_list #include // for queue, get_native #include // for ur_native_handle_t @@ -60,13 +56,12 @@ namespace sycl { inline namespace _V1 { +class property_list; + namespace detail { // TODO each backend can have its own custom errc enumeration // but the details for this are not fully specified yet enum class backend_errc : unsigned int {}; - -// Convert from UR backend to SYCL backend enum -backend convertUrBackend(ur_platform_backend_t UrBackend); } // namespace detail template class backend_traits { @@ -78,14 +73,6 @@ template class backend_traits { using return_type = typename detail::BackendReturn::type; }; -template -using backend_input_t = - typename backend_traits::template input_type; - -template -using backend_return_t = - typename backend_traits::template return_type; - namespace detail { template struct BufferInterop { diff --git a/sycl/include/sycl/builtins_esimd.hpp b/sycl/include/sycl/builtins_esimd.hpp index fa720a405f9be..49566ce118eba 100644 --- a/sycl/include/sycl/builtins_esimd.hpp +++ b/sycl/include/sycl/builtins_esimd.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include // TODO Decide whether to mark functions with this attribute. #define __NOEXC /*noexcept*/ diff --git a/sycl/include/sycl/builtins_utils_vec.hpp b/sycl/include/sycl/builtins_utils_vec.hpp index 178c696495c8e..9504b8d3aa295 100644 --- a/sycl/include/sycl/builtins_utils_vec.hpp +++ b/sycl/include/sycl/builtins_utils_vec.hpp @@ -13,8 +13,9 @@ #include #include +#include #include // for marray -#include // for vec +#include // for vec namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/detail/backend_traits.hpp b/sycl/include/sycl/detail/backend_traits.hpp index adbbab78642ff..87c00ce6d63d3 100644 --- a/sycl/include/sycl/detail/backend_traits.hpp +++ b/sycl/include/sycl/detail/backend_traits.hpp @@ -8,10 +8,9 @@ #pragma once -#include - namespace sycl { inline namespace _V1 { +enum class backend : char; namespace detail { template struct interop; diff --git a/sycl/include/sycl/detail/device_filter.hpp b/sycl/include/sycl/detail/device_filter.hpp index 5574bf69a3484..9ca26333ab15a 100644 --- a/sycl/include/sycl/detail/device_filter.hpp +++ b/sycl/include/sycl/detail/device_filter.hpp @@ -8,7 +8,6 @@ #pragma once -#include #include #include @@ -18,6 +17,7 @@ namespace sycl { inline namespace _V1 { +enum class backend : char; namespace detail { // --------------------------------------- diff --git a/sycl/include/sycl/detail/image_accessor_util.hpp b/sycl/include/sycl/detail/image_accessor_util.hpp index d87038a8c9ce3..9b1c519301bf6 100644 --- a/sycl/include/sycl/detail/image_accessor_util.hpp +++ b/sycl/include/sycl/detail/image_accessor_util.hpp @@ -23,7 +23,7 @@ #include // for image_channel_type #include // for range #include // for addressing_mode, coor... -#include // for vec, operator*, round... +#include // for vec, operator*, round... #include // for int32_t, uint16_t #include // for size_t diff --git a/sycl/include/sycl/detail/ur.hpp b/sycl/include/sycl/detail/ur.hpp index 70b6517b43748..1ed65046c0c1b 100644 --- a/sycl/include/sycl/detail/ur.hpp +++ b/sycl/include/sycl/detail/ur.hpp @@ -14,7 +14,6 @@ #pragma once -#include #include #include #include @@ -42,6 +41,7 @@ struct trace_event_data_t; namespace sycl { inline namespace _V1 { +enum class backend : char; class context; namespace detail { diff --git a/sycl/include/sycl/detail/util.hpp b/sycl/include/sycl/detail/util.hpp index d858aba279f41..56d4b12df2bc9 100644 --- a/sycl/include/sycl/detail/util.hpp +++ b/sycl/include/sycl/detail/util.hpp @@ -15,6 +15,9 @@ #include #include +#include +#include +#include #include namespace sycl { @@ -83,6 +86,40 @@ template <> struct ABINeutralT> { }; template using ABINeutralT_t = typename ABINeutralT::type; + +template auto convert_to_abi_neutral(ParamT &&Info) { + using ParamNoRef = std::remove_reference_t; + if constexpr (std::is_same_v) { + return detail::string{Info}; + } else if constexpr (std::is_same_v>) { + std::vector Res; + Res.reserve(Info.size()); + for (std::string &Str : Info) { + Res.push_back(detail::string{Str}); + } + return Res; + } else { + return std::forward(Info); + } +} + +template auto convert_from_abi_neutral(ParamT &&Info) { + using ParamNoRef = std::remove_reference_t; + if constexpr (std::is_same_v) { + return Info.c_str(); + } else if constexpr (std::is_same_v>) { + std::vector Res; + Res.reserve(Info.size()); + for (detail::string &Str : Info) { + Res.push_back(Str.c_str()); + } + return Res; + } else { + return std::forward(Info); + } +} + } // namespace detail } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index d49a1f1d1ff9a..57b193b4987b3 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -8,7 +8,6 @@ #pragma once -#include #include #include #include @@ -21,9 +20,12 @@ #include #include #include -#include #include +#ifdef __SYCL_INTERNAL_API +#include +#endif + #include #include #include @@ -35,7 +37,7 @@ namespace sycl { inline namespace _V1 { // Forward declarations -class device_selector; +class platform; template auto get_native(const SyclObjectT &Obj) -> backend_return_t; diff --git a/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp b/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp index 89636fda85019..2240379d5eed7 100644 --- a/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp +++ b/sycl/include/sycl/ext/intel/esimd/detail/memory_intrin.hpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include diff --git a/sycl/include/sycl/ext/intel/fpga_device_selector.hpp b/sycl/include/sycl/ext/intel/fpga_device_selector.hpp index f3d6b1bb00d70..91ec593fe6f6a 100644 --- a/sycl/include/sycl/ext/intel/fpga_device_selector.hpp +++ b/sycl/include/sycl/ext/intel/fpga_device_selector.hpp @@ -10,6 +10,7 @@ #include #include +#include #include #include diff --git a/sycl/include/sycl/ext/oneapi/backend/hip.hpp b/sycl/include/sycl/ext/oneapi/backend/hip.hpp index 0f59dd2f4116a..86f22d74e78d9 100644 --- a/sycl/include/sycl/ext/oneapi/backend/hip.hpp +++ b/sycl/include/sycl/ext/oneapi/backend/hip.hpp @@ -8,7 +8,7 @@ #pragma once -#include +#include #include namespace sycl { diff --git a/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp b/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp index 7ff2845f6bde4..14969a309e4da 100644 --- a/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp +++ b/sycl/include/sycl/ext/oneapi/backend/level_zero.hpp @@ -9,8 +9,7 @@ #pragma once #include // for async_han... -#include // for backend_i... -#include // for backend +#include // for backend #include // for buffer_al... #include // for buffer #include // for context diff --git a/sycl/include/sycl/ext/oneapi/dot_product.hpp b/sycl/include/sycl/ext/oneapi/dot_product.hpp index 4fda07052e25a..cec308ba26b55 100644 --- a/sycl/include/sycl/ext/oneapi/dot_product.hpp +++ b/sycl/include/sycl/ext/oneapi/dot_product.hpp @@ -11,7 +11,7 @@ #pragma once #include -#include +#include namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp b/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp index ed513ae3d2098..f82014fe3e209 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/bfloat16_math.hpp @@ -8,9 +8,10 @@ #pragma once -#include // for ceil, cos, exp, exp10, exp2 -#include // For simplify_if_swizzle, is_swizzle -#include // sycl::detail::memcpy +#include // for ceil, cos, exp, exp10, exp2 +#include // For simplify_if_swizzle, is_swizzle +#include // sycl::detail::memcpy +#include #include // for bfloat16, bfloat16ToBits #include // for marray diff --git a/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp b/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp index facc486ca2f84..d42df1fee26c8 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/builtins.hpp @@ -15,7 +15,7 @@ #include // for is_svgenfloath, is_sv... #include // detail::memcpy #include // for marray -#include // for vec +#include // for vec #include // for size_t #include // for printf diff --git a/sycl/include/sycl/ext/oneapi/experimental/cuda/builtins.hpp b/sycl/include/sycl/ext/oneapi/experimental/cuda/builtins.hpp index 067e238c2e36c..3609c282a5319 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/cuda/builtins.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/cuda/builtins.hpp @@ -10,7 +10,7 @@ #define SYCL_EXT_ONEAPI_CUDA_TEX_CACHE_READ 1 -#include +#include #if defined(_WIN32) || defined(_WIN64) #define ATTRIBUTE_EXT_VEC_TYPE(N) __declspec(ext_vector_type(N)) diff --git a/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp b/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp index af68ce0e10e0f..bbe619834dcdc 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp @@ -10,7 +10,7 @@ #include // for sub_group_mask #include // for marray -#include // for vec +#include // for vec #include // for size_t #include // for uint32_t diff --git a/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp b/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp index 441e32a085990..29c25d6a0860b 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace sycl { inline namespace _V1 { diff --git a/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp b/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp index 7a3bef52110db..a99e1f9970165 100644 --- a/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp +++ b/sycl/include/sycl/ext/oneapi/sub_group_mask.hpp @@ -14,7 +14,7 @@ #include // for SYCL_EXT_ONEAPI_SUB_GROUP_MASK #include // for id #include // for marray -#include // for vec +#include // for vec #include // for assert #include // for CHAR_BIT diff --git a/sycl/include/sycl/group_algorithm.hpp b/sycl/include/sycl/group_algorithm.hpp index e3192a481bdb1..9547039d45b69 100644 --- a/sycl/include/sycl/group_algorithm.hpp +++ b/sycl/include/sycl/group_algorithm.hpp @@ -20,7 +20,7 @@ #include // for known_identity_v #include // for nd_item #include // for range -#include // for vec +#include // for vec #ifdef __SYCL_DEVICE_ONLY__ #include diff --git a/sycl/include/sycl/image.hpp b/sycl/include/sycl/image.hpp index 45cfb884dae3f..4fcd2f5322990 100644 --- a/sycl/include/sycl/image.hpp +++ b/sycl/include/sycl/image.hpp @@ -28,7 +28,7 @@ #include // for property_list #include // for range, rangeTo... #include // for image_sampler -#include // for vec +#include // for vec #include // for ur_native_hand... #include // for size_t, nullptr_t diff --git a/sycl/include/sycl/interop_handle.hpp b/sycl/include/sycl/interop_handle.hpp index 81e4a9d559caa..2e7408cf5c0f9 100644 --- a/sycl/include/sycl/interop_handle.hpp +++ b/sycl/include/sycl/interop_handle.hpp @@ -11,16 +11,12 @@ #include // for target, mode, place... #include // for AccessorBaseHost #include // for backend, backend_re... -#include // for context +#include // for buffer #include // for __SYCL_EXPORT -#include // for context_impl #include // for getSyclObjImpl -#include // for device, device_impl #include -#include // for queue_impl #include // for accessor_property_list #include // for image -#include // for buffer #include // for ur_mem_handle_t, ur... #include // for shared_ptr diff --git a/sycl/include/sycl/kernel.hpp b/sycl/include/sycl/kernel.hpp index dac7f619d745e..654373c104c85 100644 --- a/sycl/include/sycl/kernel.hpp +++ b/sycl/include/sycl/kernel.hpp @@ -8,28 +8,26 @@ #pragma once -#include // for size_t -#include // for shared_ptr, hash, opera... #include // for backend, backend_return_t -#include // for context #include // for __SYCL2020_DEPRECATED #include // for __SYCL_EXPORT #include // for is_kernel_device_specif... #include // for OwnerLessBase -#include -#include #include -#include // for device #include // for bundle_state -#include // for range #include // for ur_native_handle_t -#include // for hash + +#include // for size_t +#include // for shared_ptr, hash, opera... +#include // for hash namespace sycl { inline namespace _V1 { // Forward declaration class context; class queue; +class device; +template class range; template class backend_traits; template class kernel_bundle; template diff --git a/sycl/include/sycl/known_identity.hpp b/sycl/include/sycl/known_identity.hpp index 3aecad3188e49..92c3db7959a44 100644 --- a/sycl/include/sycl/known_identity.hpp +++ b/sycl/include/sycl/known_identity.hpp @@ -13,7 +13,7 @@ #include // for bit_and, bit_or, bit_xor #include // for half #include // for marray -#include // for vec +#include // for vec #include // for byte, size_t #include // for logical_and, logical_or diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index 0d10080e00142..ec57731141b32 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -8,9 +8,7 @@ #pragma once -#include #include -#include #include #include #include @@ -55,38 +53,6 @@ class platform_impl; /// \param Val Indicates if extension should be enabled/disabled void __SYCL_EXPORT enable_ext_oneapi_default_context(bool Val); -template auto convert_to_abi_neutral(ParamT &&Info) { - using ParamNoRef = std::remove_reference_t; - if constexpr (std::is_same_v) { - return detail::string{Info}; - } else if constexpr (std::is_same_v>) { - std::vector Res; - Res.reserve(Info.size()); - for (std::string &Str : Info) { - Res.push_back(detail::string{Str}); - } - return Res; - } else { - return std::forward(Info); - } -} - -template auto convert_from_abi_neutral(ParamT &&Info) { - using ParamNoRef = std::remove_reference_t; - if constexpr (std::is_same_v) { - return Info.c_str(); - } else if constexpr (std::is_same_v>) { - std::vector Res; - Res.reserve(Info.size()); - for (detail::string &Str : Info) { - Res.push_back(Str.c_str()); - } - return Res; - } else { - return std::forward(Info); - } -} } // namespace detail namespace ext::oneapi { // Forward declaration diff --git a/sycl/include/sycl/stream.hpp b/sycl/include/sycl/stream.hpp index 9b8483679197f..ca2eb8b41c0c5 100644 --- a/sycl/include/sycl/stream.hpp +++ b/sycl/include/sycl/stream.hpp @@ -24,12 +24,11 @@ #include // for half, operator-, operator< #include // for handler #include // for item -#include -#include // for nd_item -#include // for nd_range -#include // for property_list -#include // for range -#include // for vec, SwizzleOp +#include // for nd_item +#include // for nd_range +#include // for property_list +#include // for range +#include // for vec, SwizzleOp #include // for size_t, byte #include // for hash, shared_ptr diff --git a/sycl/include/sycl/sycl.hpp b/sycl/include/sycl/sycl.hpp index 846c4fb175c38..73aa4421d0caa 100644 --- a/sycl/include/sycl/sycl.hpp +++ b/sycl/include/sycl/sycl.hpp @@ -19,15 +19,18 @@ #if SYCL_BACKEND_OPENCL #include #endif +#if SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO +#include +#endif #include #include #include +#include #include #include #include #include #include -#include #include #include #include @@ -54,14 +57,12 @@ #include #include #include -#include #include #include #include +#include #include -#if SYCL_EXT_ONEAPI_BACKEND_LEVEL_ZERO -#include -#endif + #include #include #include @@ -73,6 +74,7 @@ #include #include #include +#include #include #include #include @@ -94,6 +96,7 @@ #include #include #include +#include #include #include #include diff --git a/sycl/include/sycl/types.hpp b/sycl/include/sycl/types.hpp deleted file mode 100644 index ed5432a912af1..0000000000000 --- a/sycl/include/sycl/types.hpp +++ /dev/null @@ -1,27 +0,0 @@ -//==---------------- types.hpp --- SYCL types ------------------------------==// -// -// 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 decorated, address_space -#include // for half, cl_char, cl_int -#include // for ArrayCreator, RepeatV... -#include // for __SYCL2020_DEPRECATED -#include // for is_sigeninteger, is_s... -#include -#include // for is_floating_point -#include // for make_error_code, errc -#include // for StorageT, half, Vec16... -#include // for __SYCL_BINOP, __SYCL_... -#include // for multi_ptr - -#include - -#include - -#include // bfloat16 diff --git a/sycl/include/sycl/vector.hpp b/sycl/include/sycl/vector.hpp index 01e70f639e7b5..97d9704c3cc26 100644 --- a/sycl/include/sycl/vector.hpp +++ b/sycl/include/sycl/vector.hpp @@ -51,7 +51,8 @@ namespace sycl { -// TODO: Fix in the next ABI breaking windows. +// TODO: It should be within _V1 namespace, fix in the next ABI breaking +// windows. enum class rounding_mode { automatic = 0, rte = 1, rtz = 2, rtp = 3, rtn = 4 }; inline namespace _V1 { diff --git a/sycl/source/backend/level_zero.cpp b/sycl/source/backend/level_zero.cpp index e6b42c366243c..75a67745f6849 100644 --- a/sycl/source/backend/level_zero.cpp +++ b/sycl/source/backend/level_zero.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace sycl { inline namespace _V1 { diff --git a/sycl/source/backend/opencl.cpp b/sycl/source/backend/opencl.cpp index 56627a22dbb56..e0c669cb8c267 100644 --- a/sycl/source/backend/opencl.cpp +++ b/sycl/source/backend/opencl.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include diff --git a/sycl/source/detail/adapter.hpp b/sycl/source/detail/adapter.hpp index 700585a4d6a72..d78743ac6159e 100644 --- a/sycl/source/detail/adapter.hpp +++ b/sycl/source/detail/adapter.hpp @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -35,6 +34,7 @@ namespace sycl { inline namespace _V1 { +enum class backend : char; namespace detail { /// The adapter class provides a unified interface to the underlying low-level diff --git a/sycl/source/detail/allowlist.cpp b/sycl/source/detail/allowlist.cpp index a6113130aabda..96b9577aca975 100644 --- a/sycl/source/detail/allowlist.cpp +++ b/sycl/source/detail/allowlist.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include diff --git a/sycl/source/detail/buffer_impl.hpp b/sycl/source/detail/buffer_impl.hpp index f7a7e0999344d..be3a529f17718 100644 --- a/sycl/source/detail/buffer_impl.hpp +++ b/sycl/source/detail/buffer_impl.hpp @@ -17,7 +17,6 @@ #include // for iterator_to_const_type_t #include #include -#include #include #include diff --git a/sycl/source/detail/composite_device/composite_device.cpp b/sycl/source/detail/composite_device/composite_device.cpp index 6c57eb3015df1..f3eb568a6f4a0 100644 --- a/sycl/source/detail/composite_device/composite_device.cpp +++ b/sycl/source/detail/composite_device/composite_device.cpp @@ -6,9 +6,11 @@ // //===----------------------------------------------------------------------===// +#include #include #include +#include #include namespace sycl { diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp index 21ce89458835f..ab25564c59370 100644 --- a/sycl/source/detail/config.cpp +++ b/sycl/source/detail/config.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include +#include #include #include #include diff --git a/sycl/source/detail/config.hpp b/sycl/source/detail/config.hpp index 49bef4fbb6cf1..3c1f2f6822807 100644 --- a/sycl/source/detail/config.hpp +++ b/sycl/source/detail/config.hpp @@ -9,7 +9,6 @@ #pragma once #include -#include #include #include #include @@ -25,6 +24,7 @@ namespace sycl { inline namespace _V1 { +enum class backend : char; namespace detail { #ifdef DISABLE_CONFIG_FROM_ENV diff --git a/sycl/source/detail/image_accessor_util.cpp b/sycl/source/detail/image_accessor_util.cpp index 82d63d5b4fdc7..88ca0d1f58178 100644 --- a/sycl/source/detail/image_accessor_util.cpp +++ b/sycl/source/detail/image_accessor_util.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace sycl { diff --git a/sycl/source/detail/kernel_impl.hpp b/sycl/source/detail/kernel_impl.hpp index 1b71eb3e659ad..2dee6d9da151e 100644 --- a/sycl/source/detail/kernel_impl.hpp +++ b/sycl/source/detail/kernel_impl.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index a6ddbc9156043..cb9a9f0f1b97f 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sycl/source/detail/platform_impl.hpp b/sycl/source/detail/platform_impl.hpp index d50b3d1b5d8c9..e7e76334efaa6 100644 --- a/sycl/source/detail/platform_impl.hpp +++ b/sycl/source/detail/platform_impl.hpp @@ -10,8 +10,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/sycl/source/detail/sampler_impl.cpp b/sycl/source/detail/sampler_impl.cpp index 07582dee0dd31..81989a72c1146 100644 --- a/sycl/source/detail/sampler_impl.cpp +++ b/sycl/source/detail/sampler_impl.cpp @@ -9,6 +9,7 @@ #include #include #include +#include namespace sycl { inline namespace _V1 { diff --git a/sycl/source/detail/ur.hpp b/sycl/source/detail/ur.hpp index e0014866ebeb8..a599169ee3aec 100644 --- a/sycl/source/detail/ur.hpp +++ b/sycl/source/detail/ur.hpp @@ -14,7 +14,6 @@ #pragma once -#include #include #include @@ -22,6 +21,7 @@ namespace sycl { inline namespace _V1 { +enum class backend : char; namespace detail { class Adapter; using AdapterPtr = std::shared_ptr; @@ -36,6 +36,10 @@ initializeUr(ur_loader_config_handle_t LoaderConfig = nullptr); // Get the adapter serving given backend. template const AdapterPtr &getAdapter(); } // namespace ur + +// Convert from UR backend to SYCL backend enum +backend convertUrBackend(ur_platform_backend_t UrBackend); + } // namespace detail } // namespace _V1 } // namespace sycl diff --git a/sycl/source/detail/windows_ur.cpp b/sycl/source/detail/windows_ur.cpp index 6f8d1f7ae6bdf..bac1163d6d3bd 100644 --- a/sycl/source/detail/windows_ur.cpp +++ b/sycl/source/detail/windows_ur.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #include diff --git a/sycl/test-e2e/BFloat16/bfloat16_vec.cpp b/sycl/test-e2e/BFloat16/bfloat16_vec.cpp index 50364541f4272..6b95296c64c7b 100644 --- a/sycl/test-e2e/BFloat16/bfloat16_vec.cpp +++ b/sycl/test-e2e/BFloat16/bfloat16_vec.cpp @@ -15,6 +15,7 @@ // RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} #include +#include #include #include diff --git a/sycl/test-e2e/Basic/buffer/buffer.cpp b/sycl/test-e2e/Basic/buffer/buffer.cpp index 7c32c47cc570e..e0676207b4efe 100644 --- a/sycl/test-e2e/Basic/buffer/buffer.cpp +++ b/sycl/test-e2e/Basic/buffer/buffer.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include using namespace sycl; diff --git a/sycl/test-e2e/Basic/group_async_copy.cpp b/sycl/test-e2e/Basic/group_async_copy.cpp index 2eceadd3e9898..fc75189d147f2 100644 --- a/sycl/test-e2e/Basic/group_async_copy.cpp +++ b/sycl/test-e2e/Basic/group_async_copy.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include using namespace sycl; diff --git a/sycl/test-e2e/Basic/group_async_copy_legacy.cpp b/sycl/test-e2e/Basic/group_async_copy_legacy.cpp index ac5fac91e0cdb..9b2279fdcbb83 100644 --- a/sycl/test-e2e/Basic/group_async_copy_legacy.cpp +++ b/sycl/test-e2e/Basic/group_async_copy_legacy.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include using namespace sycl; diff --git a/sycl/test-e2e/Basic/half_type.cpp b/sycl/test-e2e/Basic/half_type.cpp index 4a1a43af90448..930e46b85040a 100644 --- a/sycl/test-e2e/Basic/half_type.cpp +++ b/sycl/test-e2e/Basic/half_type.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include using namespace sycl; diff --git a/sycl/test-e2e/Basic/parallel_for_indexers.cpp b/sycl/test-e2e/Basic/parallel_for_indexers.cpp index 3c41ac04fc8b1..59dbf3329e82d 100644 --- a/sycl/test-e2e/Basic/parallel_for_indexers.cpp +++ b/sycl/test-e2e/Basic/parallel_for_indexers.cpp @@ -2,7 +2,7 @@ // RUN: %{run} %t2.out #include -#include +#include #include #include diff --git a/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp b/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp index 0a1d7e81fd054..762dd1485353f 100644 --- a/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp +++ b/sycl/test-e2e/Basic/parallel_for_range_roundup.cpp @@ -24,7 +24,7 @@ // #include #include -#include +#include using namespace sycl; diff --git a/sycl/test-e2e/Basic/swizzle_op.cpp b/sycl/test-e2e/Basic/swizzle_op.cpp index 9e96c51f9483f..0d800faa5769b 100644 --- a/sycl/test-e2e/Basic/swizzle_op.cpp +++ b/sycl/test-e2e/Basic/swizzle_op.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include using namespace sycl; diff --git a/sycl/test-e2e/Basic/sycl_2020_images/common.hpp b/sycl/test-e2e/Basic/sycl_2020_images/common.hpp index b5b97a66d2f2f..4433d3d3216b0 100644 --- a/sycl/test-e2e/Basic/sycl_2020_images/common.hpp +++ b/sycl/test-e2e/Basic/sycl_2020_images/common.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include using namespace sycl; diff --git a/sycl/test-e2e/Basic/vector/bool.cpp b/sycl/test-e2e/Basic/vector/bool.cpp index 51934c41b070c..b440f65e3261e 100644 --- a/sycl/test-e2e/Basic/vector/bool.cpp +++ b/sycl/test-e2e/Basic/vector/bool.cpp @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// #include -#include +#include +#include constexpr int size = 2; diff --git a/sycl/test-e2e/Basic/vector/byte.cpp b/sycl/test-e2e/Basic/vector/byte.cpp index 10c8e097d34ed..6eadf6a177b7b 100644 --- a/sycl/test-e2e/Basic/vector/byte.cpp +++ b/sycl/test-e2e/Basic/vector/byte.cpp @@ -13,7 +13,8 @@ //===----------------------------------------------------------------------===// #include -#include +#include +#include #include // std::byte #include // std::ignore diff --git a/sycl/test-e2e/Basic/vector/int-convert.cpp b/sycl/test-e2e/Basic/vector/int-convert.cpp index 5af5911d3b7eb..ba5060292a164 100644 --- a/sycl/test-e2e/Basic/vector/int-convert.cpp +++ b/sycl/test-e2e/Basic/vector/int-convert.cpp @@ -11,7 +11,8 @@ // RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} #include -#include +#include +#include #include #include diff --git a/sycl/test-e2e/Basic/vector/load_store.cpp b/sycl/test-e2e/Basic/vector/load_store.cpp index 626fd0264fb71..df4af3976a1ed 100644 --- a/sycl/test-e2e/Basic/vector/load_store.cpp +++ b/sycl/test-e2e/Basic/vector/load_store.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include namespace syclex = sycl::ext::oneapi; diff --git a/sycl/test-e2e/Basic/vector/operators.cpp b/sycl/test-e2e/Basic/vector/operators.cpp index 99f1f251762e9..f45c6e8e49e79 100644 --- a/sycl/test-e2e/Basic/vector/operators.cpp +++ b/sycl/test-e2e/Basic/vector/operators.cpp @@ -11,7 +11,7 @@ #define SYCL_SIMPLE_SWIZZLES #include -#include +#include namespace s = sycl; template diff --git a/sycl/test-e2e/Basic/vector/scalar_access.cpp b/sycl/test-e2e/Basic/vector/scalar_access.cpp index 2c474c07e64cc..8b67b5fb8faeb 100644 --- a/sycl/test-e2e/Basic/vector/scalar_access.cpp +++ b/sycl/test-e2e/Basic/vector/scalar_access.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include typedef float float4_t __attribute__((ext_vector_type(4))); diff --git a/sycl/test-e2e/Basic/vector/vec_binary_scalar_order.hpp b/sycl/test-e2e/Basic/vector/vec_binary_scalar_order.hpp index c9f0876366305..3d825665a7690 100644 --- a/sycl/test-e2e/Basic/vector/vec_binary_scalar_order.hpp +++ b/sycl/test-e2e/Basic/vector/vec_binary_scalar_order.hpp @@ -3,7 +3,7 @@ #pragma once #include -#include +#include template using rel_t = std::conditional_t< diff --git a/sycl/test-e2e/Regression/get_spec_const_vec16.cpp b/sycl/test-e2e/Regression/get_spec_const_vec16.cpp index fc9437c2c79d9..e851d2fe1d1e5 100644 --- a/sycl/test-e2e/Regression/get_spec_const_vec16.cpp +++ b/sycl/test-e2e/Regression/get_spec_const_vec16.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include #include diff --git a/sycl/test-e2e/Regression/group.cpp b/sycl/test-e2e/Regression/group.cpp index d906c3500a095..5c1d256550c0c 100644 --- a/sycl/test-e2e/Regression/group.cpp +++ b/sycl/test-e2e/Regression/group.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include using namespace sycl; diff --git a/sycl/test-e2e/Regression/local-arg-align.cpp b/sycl/test-e2e/Regression/local-arg-align.cpp index b0e7336e14d33..4eca3aeff7f84 100644 --- a/sycl/test-e2e/Regression/local-arg-align.cpp +++ b/sycl/test-e2e/Regression/local-arg-align.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include using namespace sycl; diff --git a/sycl/test-e2e/Regression/swizzle_opassign.cpp b/sycl/test-e2e/Regression/swizzle_opassign.cpp index 1d52cdc397c36..f8ee858edd655 100644 --- a/sycl/test-e2e/Regression/swizzle_opassign.cpp +++ b/sycl/test-e2e/Regression/swizzle_opassign.cpp @@ -7,8 +7,8 @@ // and correctly mutate the elements in the corresponding vector. #include -#include #include +#include constexpr std::string_view OpNames[] = { "+=", "-=", "*=", "/=", "%=", "&=", "|=", diff --git a/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp b/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp index aca726b62cbb6..6184f0905f86a 100644 --- a/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp +++ b/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include template bool testAndOperator(const std::string &typeName) { diff --git a/sycl/test/CMakeLists.txt b/sycl/test/CMakeLists.txt index 144e2204361ef..b0b0629cffbd6 100644 --- a/sycl/test/CMakeLists.txt +++ b/sycl/test/CMakeLists.txt @@ -15,7 +15,6 @@ set(SYCL_THREADS_LIB ${CMAKE_THREAD_LIBS_INIT}) # TEST_INCLUDE_PATH is used for syntax-only verification of type information. list(APPEND test_includes ${SYCL_INCLUDE}) -list(APPEND test_includes ${SYCL_INCLUDE}/sycl) list(APPEND test_includes ${SYCL_SOURCE_DIR}/source) list(APPEND test_includes ${BOOST_UNORDERED_INCLUDE_DIRS}) if(SYCL_ENABLE_EXTENSION_JIT) diff --git a/sycl/test/abi/layout_vec.cpp b/sycl/test/abi/layout_vec.cpp index db3b724d1873c..ade053f068f30 100644 --- a/sycl/test/abi/layout_vec.cpp +++ b/sycl/test/abi/layout_vec.cpp @@ -6,7 +6,7 @@ // clang-format off -#include +#include SYCL_EXTERNAL void foo(sycl::vec) {} diff --git a/sycl/test/abi/symbol_size_alignment.cpp b/sycl/test/abi/symbol_size_alignment.cpp index 03ab7022045c6..63286da1b9786 100644 --- a/sycl/test/abi/symbol_size_alignment.cpp +++ b/sycl/test/abi/symbol_size_alignment.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include using namespace sycl; diff --git a/sycl/test/basic_tests/vectors/size_one_checks.cpp b/sycl/test/basic_tests/vectors/size_one_checks.cpp index bca51592f8eeb..c1dbb7bfa20e0 100644 --- a/sycl/test/basic_tests/vectors/size_one_checks.cpp +++ b/sycl/test/basic_tests/vectors/size_one_checks.cpp @@ -3,7 +3,7 @@ // RUN: %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %s -o %t_vec.out %} // RUN: %if preview-breaking-changes-supported %{ %t_vec.out %} -#include +#include int main() { sycl::vec v1{42}; diff --git a/sycl/test/check_device_code/vector/vector_bf16_builtins.cpp b/sycl/test/check_device_code/vector/vector_bf16_builtins.cpp index 517bcba4c3732..891c79a1a8f94 100644 --- a/sycl/test/check_device_code/vector/vector_bf16_builtins.cpp +++ b/sycl/test/check_device_code/vector/vector_bf16_builtins.cpp @@ -13,6 +13,7 @@ // This test checks the device code generated for vec math builtins. #include +#include #include using namespace sycl; diff --git a/sycl/test/check_device_code/vector/vector_convert_bfloat.cpp b/sycl/test/check_device_code/vector/vector_convert_bfloat.cpp index a4c9c185614a2..a60d239be2ba1 100644 --- a/sycl/test/check_device_code/vector/vector_convert_bfloat.cpp +++ b/sycl/test/check_device_code/vector/vector_convert_bfloat.cpp @@ -5,8 +5,9 @@ // REQUIRES: linux #include +#include #include -#include +#include using namespace sycl; using bfloat16 = sycl::ext::oneapi::bfloat16; diff --git a/sycl/test/include_deps/sycl_accessor.hpp.cpp b/sycl/test/include_deps/sycl_accessor.hpp.cpp index 6f961731eebfe..7f50f997fa228 100644 --- a/sycl/test/include_deps/sycl_accessor.hpp.cpp +++ b/sycl/test/include_deps/sycl_accessor.hpp.cpp @@ -17,14 +17,14 @@ // CHECK-NEXT: __spirv/spirv_vars.hpp // CHECK-NEXT: multi_ptr.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: detail/iostream_proxy.hpp // CHECK-NEXT: aspects.hpp // CHECK-NEXT: info/aspects.def // CHECK-NEXT: info/aspects_deprecated.def -// CHECK-NEXT: detail/type_traits.hpp -// CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp // CHECK-NEXT: buffer.hpp // CHECK-NEXT: backend_types.hpp // CHECK-NEXT: detail/array.hpp diff --git a/sycl/test/include_deps/sycl_detail_core.hpp.cpp b/sycl/test/include_deps/sycl_detail_core.hpp.cpp index 4abe5f39073c7..f0429712a0df2 100644 --- a/sycl/test/include_deps/sycl_detail_core.hpp.cpp +++ b/sycl/test/include_deps/sycl_detail_core.hpp.cpp @@ -18,14 +18,14 @@ // CHECK-NEXT: __spirv/spirv_vars.hpp // CHECK-NEXT: multi_ptr.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: detail/iostream_proxy.hpp // CHECK-NEXT: aspects.hpp // CHECK-NEXT: info/aspects.def // CHECK-NEXT: info/aspects_deprecated.def -// CHECK-NEXT: detail/type_traits.hpp -// CHECK-NEXT: detail/type_traits/vec_marray_traits.hpp // CHECK-NEXT: buffer.hpp // CHECK-NEXT: backend_types.hpp // CHECK-NEXT: detail/array.hpp