From d8590752fb10765974873be59847498ee87e096b Mon Sep 17 00:00:00 2001 From: "Hu, Peisen" Date: Thu, 4 Apr 2024 01:34:20 -0700 Subject: [PATCH 1/6] [SYCL] Prepare the deprecation of two device info descriptors Signed-off-by: Hu, Peisen --- sycl/include/sycl/detail/pi.h | 4 ++++ sycl/include/sycl/info/device_traits.def | 4 +++- sycl/plugins/unified_runtime/pi2ur.hpp | 4 ++++ sycl/source/detail/device_info.hpp | 4 ++++ sycl/source/detail/image_impl.cpp | 2 ++ sycl/test-e2e/Basic/info.cpp | 4 ++++ sycl/test-e2e/Regression/host_unified_memory.cpp | 7 ++----- 7 files changed, 23 insertions(+), 6 deletions(-) diff --git a/sycl/include/sycl/detail/pi.h b/sycl/include/sycl/detail/pi.h index f3e99c32eb3c9..1dc84abebfa0e 100644 --- a/sycl/include/sycl/detail/pi.h +++ b/sycl/include/sycl/detail/pi.h @@ -330,7 +330,9 @@ typedef enum { PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT = 0x1014, PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH = 0x1015, PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE = 0x1040, +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE = 0x1041, +#endif PI_DEVICE_INFO_MAX_SAMPLERS = 0x1018, PI_DEVICE_INFO_MAX_PARAMETER_SIZE = 0x1017, PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN = 0x1019, @@ -361,7 +363,9 @@ typedef enum { PI_DEVICE_INFO_DRIVER_VERSION = 0x102D, PI_DEVICE_INFO_PROFILE = 0x102E, PI_DEVICE_INFO_VERSION = 0x102F, +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_DEVICE_INFO_OPENCL_C_VERSION = 0x103D, +#endif PI_DEVICE_INFO_EXTENSIONS = 0x1030, PI_DEVICE_INFO_PRINTF_BUFFER_SIZE = 0x1049, PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC = 0x1048, diff --git a/sycl/include/sycl/info/device_traits.def b/sycl/include/sycl/info/device_traits.def index 170f6d42c6177..88077311487d9 100644 --- a/sycl/include/sycl/info/device_traits.def +++ b/sycl/include/sycl/info/device_traits.def @@ -190,11 +190,13 @@ __SYCL_PARAM_TRAITS_SPEC(device, usm_restricted_shared_allocations, bool, PI_USM_CROSS_SHARED_SUPPORT) __SYCL_PARAM_TRAITS_SPEC(device, usm_system_allocations, bool, PI_USM_SYSTEM_SHARED_SUPPORT) +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES +// To be dropped (no alternatives) __SYCL_PARAM_TRAITS_SPEC(device, image_max_array_size, size_t, PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE) -// To be dropped (no alternatives) __SYCL_PARAM_TRAITS_SPEC(device, opencl_c_version, std::string, PI_DEVICE_INFO_OPENCL_C_VERSION) +#endif // Extensions __SYCL_PARAM_TRAITS_SPEC(device, sub_group_independent_forward_progress, bool, PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS) diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index c4d48937ab7cb..38061c00b0eca 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -1075,8 +1075,10 @@ inline pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN) PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_PARTITION_TYPE, UR_DEVICE_INFO_PARTITION_TYPE) +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_OPENCL_C_VERSION, UR_EXT_DEVICE_INFO_OPENCL_C_VERSION) +#endif PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC) PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_PRINTF_BUFFER_SIZE, @@ -1195,8 +1197,10 @@ inline pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, UR_DEVICE_INFO_BUILD_ON_SUBDEVICE) PI_TO_UR_MAP_DEVICE_INFO(PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D, UR_DEVICE_INFO_MAX_WORK_GROUPS_3D) +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE) +#endif PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_DEVICE_ID, UR_DEVICE_INFO_DEVICE_ID) PI_TO_UR_MAP_DEVICE_INFO(PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY, UR_DEVICE_INFO_GLOBAL_MEM_FREE) diff --git a/sycl/source/detail/device_info.hpp b/sycl/source/detail/device_info.hpp index 39f47c05207ed..584225aa44119 100644 --- a/sycl/source/detail/device_info.hpp +++ b/sycl/source/detail/device_info.hpp @@ -1641,11 +1641,13 @@ inline size_t get_device_info_host() { return 0; } +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES template <> inline size_t get_device_info_host() { // current value is the required minimum return 2048; } +#endif template <> inline uint32_t get_device_info_host() { // current value is the required minimum @@ -1815,10 +1817,12 @@ template <> inline std::string get_device_info_host() { return "1.2"; } +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES template <> inline std::string get_device_info_host() { return "not applicable"; } +#endif template <> inline std::vector diff --git a/sycl/source/detail/image_impl.cpp b/sycl/source/detail/image_impl.cpp index 0b512ae1aedbe..97743167ac8a3 100644 --- a/sycl/source/detail/image_impl.cpp +++ b/sycl/source/detail/image_impl.cpp @@ -390,6 +390,7 @@ bool image_impl::checkImageDesc(const sycl::detail::pi::PiMemImageDesc &Desc, "info::device::image2d_max_depth", PI_ERROR_INVALID_VALUE); +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES if (checkAny(Desc.image_type, PI_MEM_TYPE_IMAGE1D_ARRAY, PI_MEM_TYPE_IMAGE2D_ARRAY) && !checkImageValueRange( @@ -398,6 +399,7 @@ bool image_impl::checkImageDesc(const sycl::detail::pi::PiMemImageDesc &Desc, "For a 1D and 2D image array, the array_size must be a " "Value >= 1 and <= info::device::image_max_array_size.", PI_ERROR_INVALID_VALUE); +#endif if ((nullptr == UserPtr) && (0 != Desc.image_row_pitch)) throw invalid_parameter_error( diff --git a/sycl/test-e2e/Basic/info.cpp b/sycl/test-e2e/Basic/info.cpp index b6e9546a62d84..cd76aba2df098 100644 --- a/sycl/test-e2e/Basic/info.cpp +++ b/sycl/test-e2e/Basic/info.cpp @@ -272,8 +272,10 @@ int main() { print_info(dev, "Image3D max depth"); print_info( dev, "Image max buffer size"); +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES print_info( dev, "Image max array size"); +#endif print_info(dev, "Max samplers"); print_info(dev, "Max parameter size"); @@ -327,8 +329,10 @@ int main() { print_info(dev, "Version"); print_info(dev, "Backend version"); +#ifndef __INTEL_PREVIEW_BREAKING_CHANGES print_info(dev, "OpenCL C version"); +#endif print_info>(dev, "Extensions"); print_info(dev, diff --git a/sycl/test-e2e/Regression/host_unified_memory.cpp b/sycl/test-e2e/Regression/host_unified_memory.cpp index a679111611d29..852495518be9e 100644 --- a/sycl/test-e2e/Regression/host_unified_memory.cpp +++ b/sycl/test-e2e/Regression/host_unified_memory.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -14,11 +15,7 @@ static buffer *inBufP = nullptr; int main(int argc, char *argv[]) { queue Q; auto BE = - (bool)(Q.get_device() - .template get_info() - .empty()) - ? "L0" - : "OpenCL"; + (bool)(Q.get_device().get_backend() != backend::opencl) ? "L0" : "OpenCL"; device dev = Q.get_device(); size_t max_compute_units = dev.get_info(); printf("Device: %s max_compute_units %zu, Backend: %s\n", From 9faeff161ddde6f568cbfb743f5a5e4dae202b5e Mon Sep 17 00:00:00 2001 From: "Hu, Peisen" Date: Thu, 4 Apr 2024 03:20:46 -0700 Subject: [PATCH 2/6] [SYCL] Revert unnecessary changes Signed-off-by: Hu, Peisen --- sycl/include/sycl/detail/pi.h | 4 ---- sycl/include/sycl/info/device_traits.def | 2 -- sycl/plugins/unified_runtime/pi2ur.hpp | 4 ---- sycl/source/detail/image_impl.cpp | 2 -- sycl/test-e2e/Basic/info.cpp | 4 ---- 5 files changed, 16 deletions(-) diff --git a/sycl/include/sycl/detail/pi.h b/sycl/include/sycl/detail/pi.h index 1dc84abebfa0e..f3e99c32eb3c9 100644 --- a/sycl/include/sycl/detail/pi.h +++ b/sycl/include/sycl/detail/pi.h @@ -330,9 +330,7 @@ typedef enum { PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT = 0x1014, PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH = 0x1015, PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE = 0x1040, -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE = 0x1041, -#endif PI_DEVICE_INFO_MAX_SAMPLERS = 0x1018, PI_DEVICE_INFO_MAX_PARAMETER_SIZE = 0x1017, PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN = 0x1019, @@ -363,9 +361,7 @@ typedef enum { PI_DEVICE_INFO_DRIVER_VERSION = 0x102D, PI_DEVICE_INFO_PROFILE = 0x102E, PI_DEVICE_INFO_VERSION = 0x102F, -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_DEVICE_INFO_OPENCL_C_VERSION = 0x103D, -#endif PI_DEVICE_INFO_EXTENSIONS = 0x1030, PI_DEVICE_INFO_PRINTF_BUFFER_SIZE = 0x1049, PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC = 0x1048, diff --git a/sycl/include/sycl/info/device_traits.def b/sycl/include/sycl/info/device_traits.def index 88077311487d9..95dc823935422 100644 --- a/sycl/include/sycl/info/device_traits.def +++ b/sycl/include/sycl/info/device_traits.def @@ -190,13 +190,11 @@ __SYCL_PARAM_TRAITS_SPEC(device, usm_restricted_shared_allocations, bool, PI_USM_CROSS_SHARED_SUPPORT) __SYCL_PARAM_TRAITS_SPEC(device, usm_system_allocations, bool, PI_USM_SYSTEM_SHARED_SUPPORT) -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES // To be dropped (no alternatives) __SYCL_PARAM_TRAITS_SPEC(device, image_max_array_size, size_t, PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE) __SYCL_PARAM_TRAITS_SPEC(device, opencl_c_version, std::string, PI_DEVICE_INFO_OPENCL_C_VERSION) -#endif // Extensions __SYCL_PARAM_TRAITS_SPEC(device, sub_group_independent_forward_progress, bool, PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS) diff --git a/sycl/plugins/unified_runtime/pi2ur.hpp b/sycl/plugins/unified_runtime/pi2ur.hpp index 38061c00b0eca..c4d48937ab7cb 100644 --- a/sycl/plugins/unified_runtime/pi2ur.hpp +++ b/sycl/plugins/unified_runtime/pi2ur.hpp @@ -1075,10 +1075,8 @@ inline pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, UR_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN) PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_PARTITION_TYPE, UR_DEVICE_INFO_PARTITION_TYPE) -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_OPENCL_C_VERSION, UR_EXT_DEVICE_INFO_OPENCL_C_VERSION) -#endif PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, UR_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC) PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_PRINTF_BUFFER_SIZE, @@ -1197,10 +1195,8 @@ inline pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, UR_DEVICE_INFO_BUILD_ON_SUBDEVICE) PI_TO_UR_MAP_DEVICE_INFO(PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D, UR_DEVICE_INFO_MAX_WORK_GROUPS_3D) -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE) -#endif PI_TO_UR_MAP_DEVICE_INFO(PI_DEVICE_INFO_DEVICE_ID, UR_DEVICE_INFO_DEVICE_ID) PI_TO_UR_MAP_DEVICE_INFO(PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY, UR_DEVICE_INFO_GLOBAL_MEM_FREE) diff --git a/sycl/source/detail/image_impl.cpp b/sycl/source/detail/image_impl.cpp index 97743167ac8a3..0b512ae1aedbe 100644 --- a/sycl/source/detail/image_impl.cpp +++ b/sycl/source/detail/image_impl.cpp @@ -390,7 +390,6 @@ bool image_impl::checkImageDesc(const sycl::detail::pi::PiMemImageDesc &Desc, "info::device::image2d_max_depth", PI_ERROR_INVALID_VALUE); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES if (checkAny(Desc.image_type, PI_MEM_TYPE_IMAGE1D_ARRAY, PI_MEM_TYPE_IMAGE2D_ARRAY) && !checkImageValueRange( @@ -399,7 +398,6 @@ bool image_impl::checkImageDesc(const sycl::detail::pi::PiMemImageDesc &Desc, "For a 1D and 2D image array, the array_size must be a " "Value >= 1 and <= info::device::image_max_array_size.", PI_ERROR_INVALID_VALUE); -#endif if ((nullptr == UserPtr) && (0 != Desc.image_row_pitch)) throw invalid_parameter_error( diff --git a/sycl/test-e2e/Basic/info.cpp b/sycl/test-e2e/Basic/info.cpp index cd76aba2df098..b6e9546a62d84 100644 --- a/sycl/test-e2e/Basic/info.cpp +++ b/sycl/test-e2e/Basic/info.cpp @@ -272,10 +272,8 @@ int main() { print_info(dev, "Image3D max depth"); print_info( dev, "Image max buffer size"); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES print_info( dev, "Image max array size"); -#endif print_info(dev, "Max samplers"); print_info(dev, "Max parameter size"); @@ -329,10 +327,8 @@ int main() { print_info(dev, "Version"); print_info(dev, "Backend version"); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES print_info(dev, "OpenCL C version"); -#endif print_info>(dev, "Extensions"); print_info(dev, From c2ebc4184279eaa730c7a73119cc20ce743044c8 Mon Sep 17 00:00:00 2001 From: "Hu, Peisen" Date: Thu, 4 Apr 2024 03:34:43 -0700 Subject: [PATCH 3/6] [SYCL] Set up deprecation warnings for info::device::image_max_array_size and info::device::image_max_array_size Signed-off-by: Hu, Peisen --- sycl/include/sycl/info/device_traits_deprecated.def | 2 ++ sycl/source/detail/device_info.hpp | 4 ---- sycl/test/warnings/sycl_2020_deprecations.cpp | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sycl/include/sycl/info/device_traits_deprecated.def b/sycl/include/sycl/info/device_traits_deprecated.def index b1ca176709cab..32a61a854bd5d 100644 --- a/sycl/include/sycl/info/device_traits_deprecated.def +++ b/sycl/include/sycl/info/device_traits_deprecated.def @@ -18,6 +18,8 @@ __SYCL_PARAM_TRAITS_DEPRECATED(preferred_interop_user_sync,"deprecated in SYCL 2 // Deprecated and not part of SYCL 2020 spec __SYCL_PARAM_TRAITS_DEPRECATED(usm_system_allocator,"use info::device::usm_system_allocations instead") +__SYCL_PARAM_TRAITS_DEPRECATED(image_max_array_size,"deprecated and not part of SYCL 2020 as support for image arrays has been removed in SYCL 2020") +__SYCL_PARAM_TRAITS_DEPRECATED(opencl_c_version,"deprecated and not part of SYCL 2020") //TODO:Remove when possible __SYCL_PARAM_TRAITS_DEPRECATED(ext_intel_pci_address,"use ext::intel::info::device::pci_address instead") diff --git a/sycl/source/detail/device_info.hpp b/sycl/source/detail/device_info.hpp index 584225aa44119..39f47c05207ed 100644 --- a/sycl/source/detail/device_info.hpp +++ b/sycl/source/detail/device_info.hpp @@ -1641,13 +1641,11 @@ inline size_t get_device_info_host() { return 0; } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES template <> inline size_t get_device_info_host() { // current value is the required minimum return 2048; } -#endif template <> inline uint32_t get_device_info_host() { // current value is the required minimum @@ -1817,12 +1815,10 @@ template <> inline std::string get_device_info_host() { return "1.2"; } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES template <> inline std::string get_device_info_host() { return "not applicable"; } -#endif template <> inline std::vector diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index 98fd788441a95..cdbd8fee9641a 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -170,6 +170,10 @@ int main() { using PIUS = sycl::info::device::preferred_interop_user_sync; // expected-warning@+1{{'usm_system_allocator' is deprecated: use info::device::usm_system_allocations instead}} using USA = sycl::info::device::usm_system_allocator; + // expected-warning@+1{{'image_max_array_size' is deprecated: deprecated and not part of SYCL 2020 as support for image arrays has been removed in SYCL 2020}} + using IMAS = sycl::info::device::image_max_array_size; + // expected-warning@+1{{'opencl_c_version' is deprecated: deprecated and not part of SYCL 2020}} + using OCV = sycl::info::device::opencl_c_version; // expected-warning@+1{{'extensions' is deprecated: deprecated in SYCL 2020, use device::get_info() with info::device::aspects instead}} using PE = sycl::info::platform::extensions; From 28773e92d04f2135d8abfe4836cc25915ce929fc Mon Sep 17 00:00:00 2001 From: "Hu, Peisen" Date: Thu, 4 Apr 2024 03:44:19 -0700 Subject: [PATCH 4/6] [SYCL] Remove deprecated usm_system_allocator info descriptor Signed-off-by: Hu, Peisen --- .../supported/sycl_ext_intel_mem_channel_property.asciidoc | 2 +- sycl/include/sycl/info/aspects_deprecated.def | 1 - sycl/include/sycl/info/device_traits_deprecated.def | 1 - sycl/test/warnings/sycl_2020_deprecations.cpp | 2 -- 4 files changed, 1 insertion(+), 5 deletions(-) diff --git a/sycl/doc/extensions/supported/sycl_ext_intel_mem_channel_property.asciidoc b/sycl/doc/extensions/supported/sycl_ext_intel_mem_channel_property.asciidoc index a69f4bf6b6879..af58846d51f68 100644 --- a/sycl/doc/extensions/supported/sycl_ext_intel_mem_channel_property.asciidoc +++ b/sycl/doc/extensions/supported/sycl_ext_intel_mem_channel_property.asciidoc @@ -96,7 +96,7 @@ enum class aspect { host, cpu, ... - usm_system_allocator, + usm_system_allocations, ext_intel_mem_channel }; diff --git a/sycl/include/sycl/info/aspects_deprecated.def b/sycl/include/sycl/info/aspects_deprecated.def index 55fb1c6b522b2..eb4aea6fda9d0 100644 --- a/sycl/include/sycl/info/aspects_deprecated.def +++ b/sycl/include/sycl/info/aspects_deprecated.def @@ -1,6 +1,5 @@ __SYCL_ASPECT_DEPRECATED(int64_base_atomics, 7, "use atomic64 instead") __SYCL_ASPECT_DEPRECATED(int64_extended_atomics, 8, "use atomic64 instead") // Special macro for aspects that don't have own token -__SYCL_ASPECT_DEPRECATED_ALIAS(usm_system_allocator, usm_system_allocations, "use usm_system_allocations instead") __SYCL_ASPECT_DEPRECATED(usm_restricted_shared_allocations, 16, "deprecated in SYCL 2020") __SYCL_ASPECT_DEPRECATED(host, 0, "removed in SYCL 2020, 'host' device has been removed") diff --git a/sycl/include/sycl/info/device_traits_deprecated.def b/sycl/include/sycl/info/device_traits_deprecated.def index 32a61a854bd5d..bf6dd64e971e5 100644 --- a/sycl/include/sycl/info/device_traits_deprecated.def +++ b/sycl/include/sycl/info/device_traits_deprecated.def @@ -17,7 +17,6 @@ __SYCL_PARAM_TRAITS_DEPRECATED(printf_buffer_size,"deprecated in SYCL 2020") __SYCL_PARAM_TRAITS_DEPRECATED(preferred_interop_user_sync,"deprecated in SYCL 2020") // Deprecated and not part of SYCL 2020 spec -__SYCL_PARAM_TRAITS_DEPRECATED(usm_system_allocator,"use info::device::usm_system_allocations instead") __SYCL_PARAM_TRAITS_DEPRECATED(image_max_array_size,"deprecated and not part of SYCL 2020 as support for image arrays has been removed in SYCL 2020") __SYCL_PARAM_TRAITS_DEPRECATED(opencl_c_version,"deprecated and not part of SYCL 2020") diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index cdbd8fee9641a..51e65612023a3 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -168,8 +168,6 @@ int main() { using PBS = sycl::info::device::printf_buffer_size; // expected-warning@+1{{'preferred_interop_user_sync' is deprecated: deprecated in SYCL 2020}} using PIUS = sycl::info::device::preferred_interop_user_sync; - // expected-warning@+1{{'usm_system_allocator' is deprecated: use info::device::usm_system_allocations instead}} - using USA = sycl::info::device::usm_system_allocator; // expected-warning@+1{{'image_max_array_size' is deprecated: deprecated and not part of SYCL 2020 as support for image arrays has been removed in SYCL 2020}} using IMAS = sycl::info::device::image_max_array_size; // expected-warning@+1{{'opencl_c_version' is deprecated: deprecated and not part of SYCL 2020}} From b497bea2a9dc69afa3c6158388ad72fb7e95e60e Mon Sep 17 00:00:00 2001 From: "Hu, Peisen" Date: Tue, 9 Apr 2024 05:02:37 -0700 Subject: [PATCH 5/6] [SYCL] Addressed comments Signed-off-by: Hu, Peisen --- sycl/include/sycl/info/device_traits.def | 4 ++-- sycl/include/sycl/info/device_traits_deprecated.def | 4 ++-- sycl/test-e2e/Regression/host_unified_memory.cpp | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sycl/include/sycl/info/device_traits.def b/sycl/include/sycl/info/device_traits.def index 95dc823935422..dc50c5e920502 100644 --- a/sycl/include/sycl/info/device_traits.def +++ b/sycl/include/sycl/info/device_traits.def @@ -190,11 +190,11 @@ __SYCL_PARAM_TRAITS_SPEC(device, usm_restricted_shared_allocations, bool, PI_USM_CROSS_SHARED_SUPPORT) __SYCL_PARAM_TRAITS_SPEC(device, usm_system_allocations, bool, PI_USM_SYSTEM_SHARED_SUPPORT) +__SYCL_PARAM_TRAITS_SPEC(device, opencl_c_version, std::string, + PI_DEVICE_INFO_OPENCL_C_VERSION) // To be dropped (no alternatives) __SYCL_PARAM_TRAITS_SPEC(device, image_max_array_size, size_t, PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE) -__SYCL_PARAM_TRAITS_SPEC(device, opencl_c_version, std::string, - PI_DEVICE_INFO_OPENCL_C_VERSION) // Extensions __SYCL_PARAM_TRAITS_SPEC(device, sub_group_independent_forward_progress, bool, PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS) diff --git a/sycl/include/sycl/info/device_traits_deprecated.def b/sycl/include/sycl/info/device_traits_deprecated.def index bf6dd64e971e5..b9caf07caa665 100644 --- a/sycl/include/sycl/info/device_traits_deprecated.def +++ b/sycl/include/sycl/info/device_traits_deprecated.def @@ -17,8 +17,8 @@ __SYCL_PARAM_TRAITS_DEPRECATED(printf_buffer_size,"deprecated in SYCL 2020") __SYCL_PARAM_TRAITS_DEPRECATED(preferred_interop_user_sync,"deprecated in SYCL 2020") // Deprecated and not part of SYCL 2020 spec -__SYCL_PARAM_TRAITS_DEPRECATED(image_max_array_size,"deprecated and not part of SYCL 2020 as support for image arrays has been removed in SYCL 2020") -__SYCL_PARAM_TRAITS_DEPRECATED(opencl_c_version,"deprecated and not part of SYCL 2020") +__SYCL_PARAM_TRAITS_DEPRECATED(image_max_array_size,"support for image arrays has been removed in SYCL 2020.") +__SYCL_PARAM_TRAITS_DEPRECATED(opencl_c_version,"use device::get_backend_info instead") //TODO:Remove when possible __SYCL_PARAM_TRAITS_DEPRECATED(ext_intel_pci_address,"use ext::intel::info::device::pci_address instead") diff --git a/sycl/test-e2e/Regression/host_unified_memory.cpp b/sycl/test-e2e/Regression/host_unified_memory.cpp index 852495518be9e..17aec715810df 100644 --- a/sycl/test-e2e/Regression/host_unified_memory.cpp +++ b/sycl/test-e2e/Regression/host_unified_memory.cpp @@ -14,8 +14,7 @@ static buffer *inBufP = nullptr; int main(int argc, char *argv[]) { queue Q; - auto BE = - (bool)(Q.get_device().get_backend() != backend::opencl) ? "L0" : "OpenCL"; + auto BE = (Q.get_device().get_backend() != backend::opencl) ? "L0" : "OpenCL"; device dev = Q.get_device(); size_t max_compute_units = dev.get_info(); printf("Device: %s max_compute_units %zu, Backend: %s\n", From d4d7d763f4a0ee83c3e6486293d74d65c0e55406 Mon Sep 17 00:00:00 2001 From: "Hu, Peisen" Date: Tue, 9 Apr 2024 06:10:28 -0700 Subject: [PATCH 6/6] [SYCL] Fix LIT test issue Signed-off-by: Hu, Peisen --- sycl/include/sycl/info/device_traits_deprecated.def | 2 +- sycl/test/warnings/sycl_2020_deprecations.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/include/sycl/info/device_traits_deprecated.def b/sycl/include/sycl/info/device_traits_deprecated.def index b9caf07caa665..c6bca52be336e 100644 --- a/sycl/include/sycl/info/device_traits_deprecated.def +++ b/sycl/include/sycl/info/device_traits_deprecated.def @@ -17,7 +17,7 @@ __SYCL_PARAM_TRAITS_DEPRECATED(printf_buffer_size,"deprecated in SYCL 2020") __SYCL_PARAM_TRAITS_DEPRECATED(preferred_interop_user_sync,"deprecated in SYCL 2020") // Deprecated and not part of SYCL 2020 spec -__SYCL_PARAM_TRAITS_DEPRECATED(image_max_array_size,"support for image arrays has been removed in SYCL 2020.") +__SYCL_PARAM_TRAITS_DEPRECATED(image_max_array_size,"support for image arrays has been removed in SYCL 2020") __SYCL_PARAM_TRAITS_DEPRECATED(opencl_c_version,"use device::get_backend_info instead") //TODO:Remove when possible diff --git a/sycl/test/warnings/sycl_2020_deprecations.cpp b/sycl/test/warnings/sycl_2020_deprecations.cpp index 51e65612023a3..4c7fd5a574303 100644 --- a/sycl/test/warnings/sycl_2020_deprecations.cpp +++ b/sycl/test/warnings/sycl_2020_deprecations.cpp @@ -168,9 +168,9 @@ int main() { using PBS = sycl::info::device::printf_buffer_size; // expected-warning@+1{{'preferred_interop_user_sync' is deprecated: deprecated in SYCL 2020}} using PIUS = sycl::info::device::preferred_interop_user_sync; - // expected-warning@+1{{'image_max_array_size' is deprecated: deprecated and not part of SYCL 2020 as support for image arrays has been removed in SYCL 2020}} + // expected-warning@+1{{'image_max_array_size' is deprecated: support for image arrays has been removed in SYCL 2020}} using IMAS = sycl::info::device::image_max_array_size; - // expected-warning@+1{{'opencl_c_version' is deprecated: deprecated and not part of SYCL 2020}} + // expected-warning@+1{{'opencl_c_version' is deprecated: use device::get_backend_info instead}} using OCV = sycl::info::device::opencl_c_version; // expected-warning@+1{{'extensions' is deprecated: deprecated in SYCL 2020, use device::get_info() with info::device::aspects instead}}