diff --git a/sycl/include/sycl/context.hpp b/sycl/include/sycl/context.hpp index 08fb09ca91daf..35d95aa39276c 100644 --- a/sycl/include/sycl/context.hpp +++ b/sycl/include/sycl/context.hpp @@ -180,21 +180,9 @@ class __SYCL_EXPORT context : public detail::OwnerLessBase { /// Queries this SYCL context for SYCL backend-specific information. /// /// The return type depends on information being queried. - template () -#endif -#endif - > -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - __SYCL_DEPRECATED( - "All current implementations of get_backend_info() are to be removed. " - "Use respective variants of get_info() instead.") -#endif + template typename detail::is_backend_info_desc::return_type - get_backend_info() const; + get_backend_info() const; context(const context &rhs) = default; diff --git a/sycl/include/sycl/detail/info_desc_helpers.hpp b/sycl/include/sycl/detail/info_desc_helpers.hpp index 988bc01883b24..92c3afe2143ff 100644 --- a/sycl/include/sycl/detail/info_desc_helpers.hpp +++ b/sycl/include/sycl/detail/info_desc_helpers.hpp @@ -123,28 +123,6 @@ template struct is_backend_info_desc : std::false_type {}; #undef __SYCL_PARAM_TRAITS_SPEC #undef __SYCL_PARAM_TRAITS_TEMPLATE_PARTIAL_SPEC -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \ - template <> \ - struct is_backend_info_desc : std::true_type { \ - using return_type = info::DescType::Desc::return_type; \ - }; -#include -#undef __SYCL_PARAM_TRAITS_SPEC - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template -constexpr int emit_get_backend_info_error() { - // Implementation of get_backend_info doesn't seem to be aligned with the - // spec and is likely going to be deprecated/removed. However, in pre-C++11 - // ABI mode if result in ABI mismatch and causes crashes, so emit - // compile-time error under those conditions. - constexpr bool False = !std::is_same_v; - static_assert(False, - "This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0"); - return 0; -} -#endif - } // namespace detail } // namespace _V1 } // namespace sycl diff --git a/sycl/include/sycl/device.hpp b/sycl/include/sycl/device.hpp index 8d2aa1b75b51b..00120c79022fe 100644 --- a/sycl/include/sycl/device.hpp +++ b/sycl/include/sycl/device.hpp @@ -218,21 +218,9 @@ class __SYCL_STANDALONE_DEBUG __SYCL_EXPORT device /// Queries this SYCL device for SYCL backend-specific information. /// /// The return type depends on information being queried. - template () -#endif -#endif - > -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - __SYCL_DEPRECATED( - "All current implementations of get_backend_info() are to be removed. " - "Use respective variants of get_info() instead.") -#endif + template typename detail::is_backend_info_desc::return_type - get_backend_info() const; + get_backend_info() const; /// Check SYCL extension support by device /// diff --git a/sycl/include/sycl/event.hpp b/sycl/include/sycl/event.hpp index 8dfedac6b3231..98e722e185bcc 100644 --- a/sycl/include/sycl/event.hpp +++ b/sycl/include/sycl/event.hpp @@ -111,21 +111,9 @@ class __SYCL_EXPORT event : public detail::OwnerLessBase { /// Queries this SYCL event for SYCL backend-specific information. /// /// \return depends on information being queried. - template () -#endif -#endif - > -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - __SYCL_DEPRECATED( - "All current implementations of get_backend_info() are to be removed. " - "Use respective variants of get_info() instead.") -#endif + template typename detail::is_backend_info_desc::return_type - get_backend_info() const; + get_backend_info() const; /// Queries this SYCL event for profiling information. /// diff --git a/sycl/include/sycl/info/sycl_backend_traits.def b/sycl/include/sycl/info/sycl_backend_traits.def deleted file mode 100644 index cd860e46495e0..0000000000000 --- a/sycl/include/sycl/info/sycl_backend_traits.def +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -__SYCL_PARAM_TRAITS_SPEC(platform, version, std::string, PI_PLATFORM_INFO_VERSION) -__SYCL_PARAM_TRAITS_SPEC(device, version, std::string, PI_DEVICE_INFO_VERSION) -__SYCL_PARAM_TRAITS_SPEC(device, backend_version, std::string, PI_DEVICE_INFO_BACKEND_VERSION) -#endif diff --git a/sycl/include/sycl/kernel.hpp b/sycl/include/sycl/kernel.hpp index 7d8c2888e50e1..bb44daf12b9c3 100644 --- a/sycl/include/sycl/kernel.hpp +++ b/sycl/include/sycl/kernel.hpp @@ -131,21 +131,9 @@ class __SYCL_EXPORT kernel : public detail::OwnerLessBase { /// Queries the kernel object for SYCL backend-specific information. /// /// The return type depends on information being queried. - template () -#endif -#endif - > -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - __SYCL_DEPRECATED( - "All current implementations of get_backend_info() are to be removed. " - "Use respective variants of get_info() instead.") -#endif + template typename detail::is_backend_info_desc::return_type - get_backend_info() const; + get_backend_info() const; /// Query device-specific information from the kernel object using the /// info::kernel_device_specific descriptor. diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index f63a68e9e6031..ccb1e795610cf 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -149,21 +149,9 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase { /// Queries this SYCL platform for SYCL backend-specific info. /// /// The return type depends on information being queried. - template () -#endif -#endif - > -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - __SYCL_DEPRECATED( - "All current implementations of get_backend_info() are to be removed. " - "Use respective variants of get_info() instead.") -#endif + template typename detail::is_backend_info_desc::return_type - get_backend_info() const; + get_backend_info() const; /// Returns all available SYCL platforms in the system. /// diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index 0b348ec7ff256..7938da1cea9f8 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -536,21 +536,9 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { /// Queries SYCL queue for SYCL backend-specific information. /// /// The return type depends on information being queried. - template () -#endif -#endif - > -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - __SYCL_DEPRECATED( - "All current implementations of get_backend_info() are to be removed. " - "Use respective variants of get_info() instead.") -#endif + template typename detail::is_backend_info_desc::return_type - get_backend_info() const; + get_backend_info() const; #ifndef __INTEL_PREVIEW_BREAKING_CHANGES private: diff --git a/sycl/source/context.cpp b/sycl/source/context.cpp index f395cc7884899..85670e4e51764 100644 --- a/sycl/source/context.cpp +++ b/sycl/source/context.cpp @@ -104,14 +104,6 @@ context::get_backend_info() const { return impl->get_backend_info(); } -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, Picode) \ - template __SYCL_EXPORT ReturnT \ - context::get_backend_info() const; - -#include - -#undef __SYCL_PARAM_TRAITS_SPEC - cl_context context::get() const { return impl->get(); } backend context::get_backend() const noexcept { return impl->getBackend(); } diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index 1a25249f3b905..59044782a43ce 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -212,57 +212,9 @@ context_impl::get_info() const { return CapabilityList; } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::platform::version::return_type -context_impl::get_backend_info() const { - if (getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::platform::version info descriptor can " - "only be queried with an OpenCL backend"); - } - return MDevices[0]->get_platform().get_info(); -} -#endif - device select_device(DSelectorInvocableType DeviceSelectorInvocable, std::vector &Devices); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::version::return_type -context_impl::get_backend_info() const { - if (getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::version info descriptor can only " - "be queried with an OpenCL backend"); - } - auto Devices = get_info(); - if (Devices.empty()) { - return "No available device"; - } - // Use default selector to pick a device. - return select_device(default_selector_v, Devices) - .get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::backend_version::return_type -context_impl::get_backend_info() const { - if (getBackend() != backend::ext_oneapi_level_zero) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::backend_version info descriptor " - "can only be queried with a Level Zero backend"); - } - return ""; - // Currently The Level Zero backend does not define the value of this - // information descriptor and implementations are encouraged to return the - // empty string as per specification. -} -#endif - device_impl * context_impl::findMatchingDeviceImpl(ur_device_handle_t &DeviceUR) const { for (device_impl *D : MDevices) diff --git a/sycl/source/detail/device_impl.cpp b/sycl/source/detail/device_impl.cpp index b45d4d27b1981..6a9736d3af32c 100644 --- a/sycl/source/detail/device_impl.cpp +++ b/sycl/source/detail/device_impl.cpp @@ -63,48 +63,6 @@ platform device_impl::get_platform() const { return createSyclObjFromImpl(MPlatform); } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::platform::version::return_type -device_impl::get_backend_info() const { - if (getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::platform::version info descriptor can " - "only be queried with an OpenCL backend"); - } - return get_platform().get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::version::return_type -device_impl::get_backend_info() const { - if (getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::version info descriptor can only " - "be queried with an OpenCL backend"); - } - return get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::backend_version::return_type -device_impl::get_backend_info() const { - if (getBackend() != backend::ext_oneapi_level_zero) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::backend_version info descriptor " - "can only be queried with a Level Zero backend"); - } - return ""; - // Currently The Level Zero backend does not define the value of this - // information descriptor and implementations are encouraged to return the - // empty string as per specification. -} -#endif - bool device_impl::has_extension(const std::string &ExtensionName) const { if (ExtensionName.empty()) return false; diff --git a/sycl/source/detail/event_impl.cpp b/sycl/source/detail/event_impl.cpp index 2e0363a661f33..7256393f30a7e 100644 --- a/sycl/source/detail/event_impl.cpp +++ b/sycl/source/detail/event_impl.cpp @@ -439,68 +439,6 @@ event_impl::get_info() { : info::event_command_status::complete; } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::platform::version::return_type -event_impl::get_backend_info() const { - if (!MContext) { - return "Context not initialized, no backend info available"; - } - if (MContext->getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::platform::version info descriptor can " - "only be queried with an OpenCL backend"); - } - if (std::shared_ptr Queue = MQueue.lock()) { - return Queue->getDeviceImpl() - .get_platform() - .get_info(); - } - // If the queue has been released, no platform will be associated - // so return empty string. - return ""; -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::version::return_type -event_impl::get_backend_info() const { - if (!MContext) { - return "Context not initialized, no backend info available"; - } - if (MContext->getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::version info descriptor can only " - "be queried with an OpenCL backend"); - } - if (std::shared_ptr Queue = MQueue.lock()) { - return Queue->getDeviceImpl().get_info(); - } - return ""; // If the queue has been released, no device will be associated so - // return empty string -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::backend_version::return_type -event_impl::get_backend_info() const { - if (!MContext) { - return "Context not initialized, no backend info available"; - } - if (MContext->getBackend() != backend::ext_oneapi_level_zero) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::backend_version info descriptor " - "can only be queried with a Level Zero backend"); - } - return ""; - // Currently The Level Zero backend does not define the value of this - // information descriptor and implementations are encouraged to return the - // empty string as per specification. -} -#endif - void HostProfilingInfo::start() { StartTime = getTimestamp(Device); } void HostProfilingInfo::end() { EndTime = getTimestamp(Device); } diff --git a/sycl/source/detail/kernel_impl.cpp b/sycl/source/detail/kernel_impl.cpp index dfed6881a3ef8..11031f792f347 100644 --- a/sycl/source/detail/kernel_impl.cpp +++ b/sycl/source/detail/kernel_impl.cpp @@ -163,58 +163,9 @@ void kernel_impl::enableUSMIndirectAccess() const { nullptr, &EnableAccess); } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::platform::version::return_type -kernel_impl::get_backend_info() const { - if (MContext->getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::platform::version info descriptor can " - "only be queried with an OpenCL backend"); - } - devices_range Devices = MKernelBundleImpl->get_devices(); - return Devices.front().get_platform().get_info(); -} -#endif - device select_device(DSelectorInvocableType DeviceSelectorInvocable, std::vector &Devices); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::version::return_type -kernel_impl::get_backend_info() const { - if (MContext->getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::version info descriptor can only " - "be queried with an OpenCL backend"); - } - auto Devices = MKernelBundleImpl->get_devices().to>(); - if (Devices.empty()) { - return "No available device"; - } - // Use default selector to pick a device. - return select_device(default_selector_v, Devices) - .get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::backend_version::return_type -kernel_impl::get_backend_info() const { - if (MContext->getBackend() != backend::ext_oneapi_level_zero) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::backend_version info descriptor " - "can only be queried with a Level Zero backend"); - } - return ""; - // Currently The Level Zero backend does not define the value of this - // information descriptor and implementations are encouraged to return the - // empty string as per specification. -} -#endif - } // namespace detail } // namespace _V1 } // namespace sycl diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index a3c14d03f2bd9..d88b8972aa5d1 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -554,57 +554,9 @@ ur_native_handle_t platform_impl::getNative() const { return Handle; } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::platform::version::return_type -platform_impl::get_backend_info() const { - if (getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::platform::version info descriptor can " - "only be queried with an OpenCL backend"); - } - return get_info(); -} -#endif - device select_device(DSelectorInvocableType DeviceSelectorInvocable, std::vector &Devices); -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::version::return_type -platform_impl::get_backend_info() const { - if (getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::version info descriptor can only " - "be queried with an OpenCL backend"); - } - auto Devices = get_devices(); - if (Devices.empty()) { - return "No available device"; - } - // Use default selector to pick a device. - return select_device(default_selector_v, Devices) - .get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::backend_version::return_type -platform_impl::get_backend_info() const { - if (getBackend() != backend::ext_oneapi_level_zero) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::backend_version info descriptor " - "can only be queried with a Level Zero backend"); - } - return ""; - // Currently The Level Zero backend does not define the value of this - // information descriptor and implementations are encouraged to return the - // empty string as per specification. -} -#endif - // All devices on the platform must have the given aspect. bool platform_impl::has(aspect Aspect) const { for (const auto &dev : get_devices()) { diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index 22a4bdb6f200c..4a15e767bde1a 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -76,48 +76,6 @@ template <> device queue_impl::get_info() const { return get_device(); } -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::platform::version::return_type -queue_impl::get_backend_info() const { - if (getContextImpl().getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::platform::version info descriptor can " - "only be queried with an OpenCL backend"); - } - return get_device().get_platform().get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::version::return_type -queue_impl::get_backend_info() const { - if (getContextImpl().getBackend() != backend::opencl) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::version info descriptor can only " - "be queried with an OpenCL backend"); - } - return get_device().get_info(); -} -#endif - -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -template <> -typename info::device::backend_version::return_type -queue_impl::get_backend_info() const { - if (getContextImpl().getBackend() != backend::ext_oneapi_level_zero) { - throw sycl::exception(errc::backend_mismatch, - "the info::device::backend_version info descriptor " - "can only be queried with a Level Zero backend"); - } - return ""; - // Currently The Level Zero backend does not define the value of this - // information descriptor and implementations are encouraged to return the - // empty string as per specification. -} -#endif - static event prepareSYCLEventAssociatedWithQueue(detail::queue_impl &QueueImpl) { auto EventImpl = detail::event_impl::create_device_event(QueueImpl); diff --git a/sycl/source/device.cpp b/sycl/source/device.cpp index 6796060dda3de..12e6ae35dce3a 100644 --- a/sycl/source/device.cpp +++ b/sycl/source/device.cpp @@ -202,14 +202,6 @@ device::get_backend_info() const { return impl->get_backend_info(); } -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, Picode) \ - template __SYCL_EXPORT ReturnT \ - device::get_backend_info() const; - -#include - -#undef __SYCL_PARAM_TRAITS_SPEC - backend device::get_backend() const noexcept { return impl->getBackend(); } ur_native_handle_t device::getNative() const { return impl->getNative(); } diff --git a/sycl/source/event.cpp b/sycl/source/event.cpp index 12fc03103f1d4..b6c118b8ba7d8 100644 --- a/sycl/source/event.cpp +++ b/sycl/source/event.cpp @@ -99,14 +99,6 @@ event::get_profiling_info() const { #undef __SYCL_PARAM_TRAITS_SPEC -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, Picode) \ - template __SYCL_EXPORT ReturnT \ - event::get_backend_info() const; - -#include - -#undef __SYCL_PARAM_TRAITS_SPEC - #define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, PiCode) \ template __SYCL_EXPORT ReturnT \ event::get_profiling_info() const; diff --git a/sycl/source/kernel.cpp b/sycl/source/kernel.cpp index bb742332bc96d..a091204972230 100644 --- a/sycl/source/kernel.cpp +++ b/sycl/source/kernel.cpp @@ -69,14 +69,6 @@ kernel::get_backend_info() const { return impl->get_backend_info(); } -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, Picode) \ - template __SYCL_EXPORT ReturnT \ - kernel::get_backend_info() const; - -#include - -#undef __SYCL_PARAM_TRAITS_SPEC - template typename detail::is_kernel_device_specific_info_desc::return_type kernel::get_info(const device &Dev) const { diff --git a/sycl/source/platform.cpp b/sycl/source/platform.cpp index c578dc1c103b0..ed6b3c1cf00aa 100644 --- a/sycl/source/platform.cpp +++ b/sycl/source/platform.cpp @@ -82,14 +82,6 @@ platform::get_backend_info() const { return impl->get_backend_info(); } -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, Picode) \ - template __SYCL_EXPORT ReturnT \ - platform::get_backend_info() const; - -#include - -#undef __SYCL_PARAM_TRAITS_SPEC - context platform::khr_get_default_context() const { return detail::createSyclObjFromImpl( impl->khr_get_default_context()); diff --git a/sycl/source/queue.cpp b/sycl/source/queue.cpp index f5858217d23e7..01566a31da403 100644 --- a/sycl/source/queue.cpp +++ b/sycl/source/queue.cpp @@ -392,14 +392,6 @@ queue::get_backend_info() const { return impl->get_backend_info(); } -#define __SYCL_PARAM_TRAITS_SPEC(DescType, Desc, ReturnT, Picode) \ - template __SYCL_EXPORT ReturnT \ - queue::get_backend_info() const; - -#include - -#undef __SYCL_PARAM_TRAITS_SPEC - bool queue::is_in_order() const { return has_property(); } diff --git a/sycl/test-e2e/Basic/backend_info.cpp b/sycl/test-e2e/Basic/backend_info.cpp deleted file mode 100644 index 0ff99779200ed..0000000000000 --- a/sycl/test-e2e/Basic/backend_info.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// UNSUPPORTED: preview-mode -// UNSUPPORTED-INTENDED: Functionality is removed under -// `-fpreview-breaking-changes` - -// XFAIL: native_cpu -// XFAIL-TRACKER: https://github.com/intel/llvm/issues/20127 - -// RUN: %{build} -o %t.out -Wno-deprecated-declarations -// RUN: %{run} %t.out -// - -// RUN: %{build} -DTEST_ERRORS -D_GLIBCXX_USE_CXX11_ABI=0 -fsyntax-only -Wno-deprecated-declarations -Wno-error=unused-command-line-argument -Xclang -verify -Xclang -verify-ignore-unexpected=note - -//==--- backend_info.cpp - SYCL backend info test---------------------------==// -// -// 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 -// -//===----------------------------------------------------------------------===// - -#include -#include -#include -#include - -using namespace sycl; - -int main() { -#if (defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI != 0) || \ - !defined(_GLIBCXX_USE_CXX11_ABI) || TEST_ERRORS - try { - // Test get_backend_info for sycl::platform - std::vector platform_list = platform::get_platforms(); - for (const auto &platform : platform_list) { - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::device::version, $1 = (no value)]}} - std::cout << " Backend device version: " - << platform.get_backend_info() - << std::endl; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::platform::version, $1 = (no value)]}} - std::cout << " Backend platform version: " - << platform.get_backend_info() - << std::endl; - } - - // Test get_backend_info for sycl::device - std::vector device_list = - device::get_devices(info::device_type::gpu); - for (const auto &device : device_list) { - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::device::version, $1 = (no value)]}} - std::cout << " Backend device version: " - << device.get_backend_info() - << std::endl; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::platform::version, $1 = (no value)]}} - std::cout << " Backend platform version: " - << device.get_backend_info() - << std::endl; - } - - // Test get_backend_info for sycl::queue - queue q; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::device::version, $1 = (no value)]}} - std::cout << " Backend device version: " - << q.get_backend_info() << std::endl; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::platform::version, $1 = (no value)]}} - std::cout << " Backend platform version: " - << q.get_backend_info() << std::endl; - - // Test get_backend_info for sycl::context - context Ctx = q.get_context(); - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::device::version, $1 = (no value)]}} - std::cout << " Backend device version: " - << Ctx.get_backend_info() << std::endl; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::platform::version, $1 = (no value)]}} - std::cout << " Backend platform version: " - << Ctx.get_backend_info() << std::endl; - - // Test get_backend_info for sycl::event - event e = q.single_task([=]() { return; }); - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::device::version, $1 = (no value)]}} - std::cout << " Backend device version: " - << e.get_backend_info() << std::endl; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::platform::version, $1 = (no value)]}} - std::cout << " Backend platform version: " - << e.get_backend_info() << std::endl; - - // Test get_backend_info for sycl::kernel - // Trivial kernel simply for testing - buffer buf(range<1>(1)); - auto KernelID = sycl::get_kernel_id(); - auto KB = get_kernel_bundle(q.get_context(), - {KernelID}); - kernel krn = KB.get_kernel(KernelID); - q.submit([&](handler &cgh) { - auto acc = buf.get_access(cgh); - cgh.single_task(krn, [=]() { acc[0] = acc[0] + 1; }); - }); - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::device::version, $1 = (no value)]}} - std::cout << " Backend device version: " - << krn.get_backend_info() << std::endl; - // expected-error@*:* {{static assertion failed due to requirement 'False': This interface is incompatible with _GLIBCXX_USE_CXX11_ABI=0}} - // expected-note@+2 {{while substituting deduced template arguments into function template 'get_backend_info' [with Param = info::platform::version, $1 = (no value)]}} - std::cout << " Backend platform version: " - << krn.get_backend_info() << std::endl; - } catch (exception e) { - // Check if the error code is the only allowed one: errc::backend_mismatch - assert(e.code() == sycl::errc::backend_mismatch && "wrong error code"); - // If so, check if there're truly non-OpenCL backend(s) or it's an - // unexpected error - std::vector platform_list = platform::get_platforms(); - bool has_non_opencl_backend = false; - for (const auto &platform : platform_list) { - if (platform.get_backend() != backend::opencl) { - has_non_opencl_backend = true; - break; - } - } - assert(has_non_opencl_backend && "unexpected error code"); - } - std::cout << " Backend info query tests passed" << std::endl; -#endif - return 0; -} diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index 5bd6c70baed67..ec52f5008c47a 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3728,9 +3728,6 @@ _ZNK4sycl3_V13ext8codeplay12experimental14fusion_wrapper17is_in_fusion_modeEv _ZNK4sycl3_V13ext8codeplay12experimental14fusion_wrapper9get_queueEv _ZNK4sycl3_V15event11get_backendEv _ZNK4sycl3_V15event15getNativeVectorEv -_ZNK4sycl3_V15event16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V15event16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V15event16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V15event18get_profiling_infoINS0_4info15event_profiling11command_endEEENS0_6detail28is_event_profiling_info_descIT_E11return_typeEv _ZNK4sycl3_V15event18get_profiling_infoINS0_4info15event_profiling13command_startEEENS0_6detail28is_event_profiling_info_descIT_E11return_typeEv _ZNK4sycl3_V15event18get_profiling_infoINS0_4info15event_profiling14command_submitEEENS0_6detail28is_event_profiling_info_descIT_E11return_typeEv @@ -3746,9 +3743,6 @@ _ZNK4sycl3_V15queue11get_backendEv _ZNK4sycl3_V15queue11get_contextEv _ZNK4sycl3_V15queue11is_in_orderEv _ZNK4sycl3_V15queue16ext_oneapi_emptyEv -_ZNK4sycl3_V15queue16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V15queue16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V15queue16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V15queue20ext_oneapi_get_graphEv _ZNK4sycl3_V15queue20ext_oneapi_get_stateEv _ZNK4sycl3_V15queue22submit_with_event_implERKNS0_6detail19type_erased_cgfo_tyERKNS2_2v114SubmissionInfoERKNS2_13code_locationEb @@ -4032,9 +4026,6 @@ _ZNK4sycl3_V16device13get_info_implINS0_4info6device8platformEEENS0_6detail11ABI _ZNK4sycl3_V16device13get_info_implINS0_4info6device9vendor_idEEENS0_6detail11ABINeutralTINS6_19is_device_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16device13has_extensionENS0_6detail11string_viewE _ZNK4sycl3_V16device14is_acceleratorEv -_ZNK4sycl3_V16device16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V16device16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V16device16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4230EEESt6vectorIS1_SaIS1_EEm _ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4231EEESt6vectorIS1_SaIS1_EERKS5_ImSaImEE _ZNK4sycl3_V16device18create_sub_devicesILNS0_4info18partition_propertyE4232EEESt6vectorIS1_SaIS1_EENS3_25partition_affinity_domainE @@ -4055,9 +4046,6 @@ _ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel13function_nameEEENS0_6detai _ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel15reference_countEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel7contextEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V16kernel13get_info_implINS0_4info6kernel8num_argsEEENS0_6detail11ABINeutralTINS6_19is_kernel_info_descIT_E11return_typeEE4typeEv -_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V16kernel16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V16kernel17get_kernel_bundleEv _ZNK4sycl3_V16kernel19ext_oneapi_get_infoINS0_3ext6oneapi12experimental4info21kernel_queue_specific14num_sub_groupsEEENS0_6detail34is_kernel_queue_specific_info_descIT_E11return_typeENS0_5queueERKNS0_5rangeILi1EEE _ZNK4sycl3_V16kernel19ext_oneapi_get_infoINS0_3ext6oneapi12experimental4info21kernel_queue_specific14num_sub_groupsEEENS0_6detail34is_kernel_queue_specific_info_descIT_E11return_typeENS0_5queueERKNS0_5rangeILi2EEE @@ -4099,9 +4087,6 @@ _ZNK4sycl3_V17context11getPropListEv _ZNK4sycl3_V17context11get_backendEv _ZNK4sycl3_V17context11get_devicesEv _ZNK4sycl3_V17context12get_platformEv -_ZNK4sycl3_V17context16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V17context16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V17context16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V17context34ext_oneapi_get_default_memory_poolERKNS0_6deviceENS0_3usm5allocE _ZNK4sycl3_V17context3getEv _ZNK4sycl3_V17context8get_infoINS0_4info7context15reference_countEEENS0_6detail20is_context_info_descIT_E11return_typeEv @@ -4137,9 +4122,6 @@ _ZNK4sycl3_V18platform13get_info_implINS0_4info8platform6vendorEEENS0_6detail11A _ZNK4sycl3_V18platform13get_info_implINS0_4info8platform7profileEEENS0_6detail11ABINeutralTINS6_21is_platform_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V18platform13get_info_implINS0_4info8platform7versionEEENS0_6detail11ABINeutralTINS6_21is_platform_info_descIT_E11return_typeEE4typeEv _ZNK4sycl3_V18platform13has_extensionENS0_6detail11string_viewE -_ZNK4sycl3_V18platform16get_backend_infoINS0_4info6device15backend_versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V18platform16get_backend_infoINS0_4info6device7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv -_ZNK4sycl3_V18platform16get_backend_infoINS0_4info8platform7versionEEENS0_6detail20is_backend_info_descIT_E11return_typeEv _ZNK4sycl3_V18platform23khr_get_default_contextEv _ZNK4sycl3_V18platform30ext_oneapi_get_default_contextEv _ZNK4sycl3_V18platform32ext_oneapi_get_composite_devicesEv diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index bd4600e29aad2..cb6c4138f09eb 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -26,24 +26,6 @@ ??$ext_oneapi_get_info@Unum_sub_groups@kernel_queue_specific@info@experimental@oneapi@ext@_V1@sycl@@@kernel@_V1@sycl@@QEBAIVqueue@12@AEBV?$range@$00@12@@Z ??$ext_oneapi_get_info@Unum_sub_groups@kernel_queue_specific@info@experimental@oneapi@ext@_V1@sycl@@@kernel@_V1@sycl@@QEBAIVqueue@12@AEBV?$range@$01@12@@Z ??$ext_oneapi_get_info@Unum_sub_groups@kernel_queue_specific@info@experimental@oneapi@ext@_V1@sycl@@@kernel@_V1@sycl@@QEBAIVqueue@12@AEBV?$range@$02@12@@Z -??$get_backend_info@Ubackend_version@device@info@_V1@sycl@@@context@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Ubackend_version@device@info@_V1@sycl@@@device@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Ubackend_version@device@info@_V1@sycl@@@event@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Ubackend_version@device@info@_V1@sycl@@@kernel@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Ubackend_version@device@info@_V1@sycl@@@platform@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Ubackend_version@device@info@_V1@sycl@@@queue@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@device@info@_V1@sycl@@@context@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@device@info@_V1@sycl@@@device@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@device@info@_V1@sycl@@@event@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@device@info@_V1@sycl@@@kernel@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@device@info@_V1@sycl@@@platform@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@device@info@_V1@sycl@@@queue@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@platform@info@_V1@sycl@@@context@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@platform@info@_V1@sycl@@@device@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@platform@info@_V1@sycl@@@event@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@platform@info@_V1@sycl@@@kernel@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@platform@info@_V1@sycl@@@platform@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ -??$get_backend_info@Uversion@platform@info@_V1@sycl@@@queue@_V1@sycl@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ ??$get_info@U?$max_work_groups@$00@device@info@experimental@oneapi@ext@_V1@sycl@@@device_impl@detail@_V1@sycl@@QEBA?AV?$id@$00@23@XZ ??$get_info@U?$max_work_groups@$01@device@info@experimental@oneapi@ext@_V1@sycl@@@device_impl@detail@_V1@sycl@@QEBA?AV?$id@$01@23@XZ ??$get_info@U?$max_work_groups@$02@device@info@experimental@oneapi@ext@_V1@sycl@@@device_impl@detail@_V1@sycl@@QEBA?AV?$id@$02@23@XZ diff --git a/sycl/test/include_deps/sycl_accessor.hpp.cpp b/sycl/test/include_deps/sycl_accessor.hpp.cpp index 37e3edd2fe52d..dd840412208fe 100644 --- a/sycl/test/include_deps/sycl_accessor.hpp.cpp +++ b/sycl/test/include_deps/sycl_accessor.hpp.cpp @@ -81,7 +81,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-EMPTY: diff --git a/sycl/test/include_deps/sycl_detail_core.hpp.cpp b/sycl/test/include_deps/sycl_detail_core.hpp.cpp index a0bc25739c465..09c3a9bbc9ba5 100644 --- a/sycl/test/include_deps/sycl_detail_core.hpp.cpp +++ b/sycl/test/include_deps/sycl_detail_core.hpp.cpp @@ -82,7 +82,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: queue.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_accessor.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_accessor.hpp.cpp index 89e2f957017b3..a1a38799db472 100644 --- a/sycl/test/include_deps/sycl_khr_includes_accessor.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_accessor.hpp.cpp @@ -84,7 +84,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-EMPTY: diff --git a/sycl/test/include_deps/sycl_khr_includes_context.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_context.hpp.cpp index 8ae714d144574..c8988bfcf3ee3 100644 --- a/sycl/test/include_deps/sycl_khr_includes_context.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_context.hpp.cpp @@ -52,7 +52,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp // CHECK-NEXT: __spirv/spirv_vars.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_device.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_device.hpp.cpp index bc4788036c650..2350e00e05679 100644 --- a/sycl/test/include_deps/sycl_khr_includes_device.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_device.hpp.cpp @@ -51,7 +51,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp // CHECK-NEXT: __spirv/spirv_vars.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_event.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_event.hpp.cpp index e26d3c6d844f2..f3666f1f6f5c5 100644 --- a/sycl/test/include_deps/sycl_khr_includes_event.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_event.hpp.cpp @@ -51,7 +51,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp // CHECK-NEXT: __spirv/spirv_vars.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_handler.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_handler.hpp.cpp index 862394bd4f656..dec08c7524a67 100644 --- a/sycl/test/include_deps/sycl_khr_includes_handler.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_handler.hpp.cpp @@ -85,7 +85,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: detail/cl.h diff --git a/sycl/test/include_deps/sycl_khr_includes_images.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_images.hpp.cpp index 8c84070f0dd68..f02b4c715939c 100644 --- a/sycl/test/include_deps/sycl_khr_includes_images.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_images.hpp.cpp @@ -85,7 +85,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: detail/image_accessor_util.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_interop_handle.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_interop_handle.hpp.cpp index a0cf91ea47638..6525fc0698526 100644 --- a/sycl/test/include_deps/sycl_khr_includes_interop_handle.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_interop_handle.hpp.cpp @@ -85,7 +85,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: ext/oneapi/experimental/graph.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_kernel_bundle.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_kernel_bundle.hpp.cpp index 7f606a58d8a68..2977c9bd8f455 100644 --- a/sycl/test/include_deps/sycl_khr_includes_kernel_bundle.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_kernel_bundle.hpp.cpp @@ -51,7 +51,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp // CHECK-NEXT: __spirv/spirv_vars.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_platform.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_platform.hpp.cpp index 73e641b6f2c3d..817134cc3ceee 100644 --- a/sycl/test/include_deps/sycl_khr_includes_platform.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_platform.hpp.cpp @@ -51,7 +51,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp // CHECK-NEXT: __spirv/spirv_vars.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_queue.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_queue.hpp.cpp index 9cd74ac24ca78..1cc7c7da796b2 100644 --- a/sycl/test/include_deps/sycl_khr_includes_queue.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_queue.hpp.cpp @@ -87,7 +87,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: detail/cg_types.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_reduction.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_reduction.hpp.cpp index 65e5d95389e72..18191112974a4 100644 --- a/sycl/test/include_deps/sycl_khr_includes_reduction.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_reduction.hpp.cpp @@ -87,7 +87,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: atomic.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_stream.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_stream.hpp.cpp index efaf1605c801f..5b8d20808d49f 100644 --- a/sycl/test/include_deps/sycl_khr_includes_stream.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_stream.hpp.cpp @@ -85,7 +85,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: usm/usm_enums.hpp // CHECK-NEXT: properties/buffer_properties.def // CHECK-NEXT: atomic.hpp diff --git a/sycl/test/include_deps/sycl_khr_includes_usm.hpp.cpp b/sycl/test/include_deps/sycl_khr_includes_usm.hpp.cpp index 5534c9b9fe6ee..840487dcb57d4 100644 --- a/sycl/test/include_deps/sycl_khr_includes_usm.hpp.cpp +++ b/sycl/test/include_deps/sycl_khr_includes_usm.hpp.cpp @@ -76,7 +76,6 @@ // CHECK-NEXT: info/ext_intel_kernel_info_traits.def // CHECK-NEXT: info/ext_oneapi_device_traits.def // CHECK-NEXT: info/ext_oneapi_kernel_queue_specific_traits.def -// CHECK-NEXT: info/sycl_backend_traits.def // CHECK-NEXT: detail/owner_less_base.hpp // CHECK-NEXT: detail/impl_utils.hpp // CHECK-NEXT: ext/oneapi/weak_object_base.hpp diff --git a/sycl/test/warnings/deprecated_get_backend_info.cpp b/sycl/test/warnings/deprecated_get_backend_info.cpp deleted file mode 100644 index 7bc24d835d3bb..0000000000000 --- a/sycl/test/warnings/deprecated_get_backend_info.cpp +++ /dev/null @@ -1,117 +0,0 @@ -// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -#include -#include -#include -#include - -using namespace sycl; - -class SingleTask; - -int main() { -#if (defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI != 0) || \ - !defined(_GLIBCXX_USE_CXX11_ABI) || TEST_ERRORS - try { - // Test get_backend_info for sycl::platform - std::vector platform_list = platform::get_platforms(); - for (const auto &platform : platform_list) { - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend device version: " - << platform.get_backend_info() - << std::endl; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend platform version: " - << platform.get_backend_info() - << std::endl; - } - - // Test get_backend_info for sycl::device - std::vector device_list = - device::get_devices(info::device_type::gpu); - for (const auto &device : device_list) { - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend device version: " - << device.get_backend_info() - << std::endl; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend platform version: " - << device.get_backend_info() - << std::endl; - } - - // Test get_backend_info for sycl::queue - queue q; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend device version: " - << q.get_backend_info() << std::endl; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend platform version: " - << q.get_backend_info() << std::endl; - - // Test get_backend_info for sycl::context - context Ctx = q.get_context(); - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend device version: " - << Ctx.get_backend_info() << std::endl; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend platform version: " - << Ctx.get_backend_info() << std::endl; - - // Test get_backend_info for sycl::event - event e = q.single_task([=]() { return; }); - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend device version: " - << e.get_backend_info() << std::endl; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend platform version: " - << e.get_backend_info() << std::endl; - - // Test get_backend_info for sycl::kernel - // Trivial kernel simply for testing - buffer buf(range<1>(1)); - auto KernelID = sycl::get_kernel_id(); - auto KB = get_kernel_bundle(q.get_context(), - {KernelID}); - kernel krn = KB.get_kernel(KernelID); - q.submit([&](handler &cgh) { - auto acc = buf.get_access(cgh); - cgh.single_task([=]() { acc[0] = acc[0] + 1; }); - }); - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend device version: " - << krn.get_backend_info() << std::endl; - // expected-warning@+3 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - // expected-warning@+2 {{'get_backend_info' is deprecated: All current implementations of get_backend_info() are to be removed. Use respective variants of get_info() instead.}} - std::cout << " Backend platform version: " - << krn.get_backend_info() << std::endl; - } catch (exception e) { - // Check if the error code is the only allowed one: errc::backend_mismatch - assert(e.code() == sycl::errc::backend_mismatch && "wrong error code"); - // If so, check if there're truly non-OpenCL backend(s) or it's an - // unexpected error - std::vector platform_list = platform::get_platforms(); - bool has_non_opencl_backend = false; - for (const auto &platform : platform_list) { - if (platform.get_backend() != backend::opencl) { - has_non_opencl_backend = true; - break; - } - } - assert(has_non_opencl_backend && "unexpected error code"); - } - std::cout << " Deprecation warning tests for get_backend_info() passed" - << std::endl; -#endif - return 0; -}