From fcdebf84002a26577a6e9ebc626765f6eba71d11 Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Tue, 18 Nov 2025 10:47:16 -0800 Subject: [PATCH] [SYCL] Remove some exception class ABI entry points --- sycl/include/sycl/exception.hpp | 40 +++---------------------- sycl/source/detail/ur.hpp | 5 ---- sycl/source/exception.cpp | 15 ---------- sycl/test/abi/sycl_symbols_linux.dump | 9 ------ sycl/test/abi/sycl_symbols_windows.dump | 3 -- 5 files changed, 4 insertions(+), 68 deletions(-) diff --git a/sycl/include/sycl/exception.hpp b/sycl/include/sycl/exception.hpp index 971d682ea9443..06f6ca1db34ae 100644 --- a/sycl/include/sycl/exception.hpp +++ b/sycl/include/sycl/exception.hpp @@ -51,14 +51,6 @@ __SYCL_EXPORT std::error_code make_error_code(sycl::errc E) noexcept; __SYCL_EXPORT const std::error_category &sycl_category() noexcept; namespace detail { -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -__SYCL_EXPORT const char *stringifyErrorCode(int32_t error); - -inline std::string codeToString(int32_t code) { - return std::to_string(code) + " (" + std::string(stringifyErrorCode(code)) + - ")"; -} -#endif class __SYCL_EXPORT SYCLCategory : public std::error_category { public: @@ -82,34 +74,21 @@ class __SYCL_EXPORT exception : public virtual std::exception { virtual ~exception(); exception(std::error_code Ec, const char *Msg) -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - : exception(Ec, nullptr, Msg) {} -#endif - ; + : exception(Ec, nullptr, Msg) {}; exception(std::error_code Ec, const std::string &Msg) : exception(Ec, nullptr, Msg.c_str()) {} - exception(std::error_code Ec) -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - : exception(Ec, nullptr, "") {} -#endif - ; + exception(std::error_code Ec) : exception(Ec, nullptr, "") {}; exception(int EV, const std::error_category &ECat, const std::string &WhatArg) : exception(std::error_code(EV, ECat), nullptr, WhatArg.c_str()) {} exception(int EV, const std::error_category &ECat, const char *WhatArg) -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - : exception(std::error_code(EV, ECat), nullptr, WhatArg) {} -#endif - ; + : exception(std::error_code(EV, ECat), nullptr, WhatArg) {}; exception(int EV, const std::error_category &ECat) -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES - : exception(std::error_code(EV, ECat), nullptr, "") {} -#endif - ; + : exception(std::error_code(EV, ECat), nullptr, "") {}; // context.hpp depends on exception.hpp but we can't define these ctors in // exception.hpp while context is still an incomplete type. @@ -140,17 +119,6 @@ class __SYCL_EXPORT exception : public virtual std::exception { std::error_code MErrC = make_error_code(sycl::errc::invalid); protected: -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES - // base constructors used by SYCL 1.2.1 exception subclasses - exception(std::error_code Ec, const char *Msg, const int32_t PIErr) - : exception(Ec, std::string(Msg), PIErr) {} - - exception(std::error_code Ec, const std::string &Msg, const int32_t URErr) - : exception(Ec, nullptr, Msg + " " + detail::codeToString(URErr)) { - MErr = URErr; - } -#endif - // base constructor for all SYCL 2020 constructors // exception(context *, std::error_code, const std::string); exception(std::error_code Ec, std::shared_ptr SharedPtrCtx, diff --git a/sycl/source/detail/ur.hpp b/sycl/source/detail/ur.hpp index 3c2e2612d0616..23d8cc73d097d 100644 --- a/sycl/source/detail/ur.hpp +++ b/sycl/source/detail/ur.hpp @@ -28,17 +28,12 @@ enum class backend : char; namespace detail { class adapter_impl; -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -__SYCL_EXPORT -#endif const char *stringifyErrorCode(int32_t error); -#ifdef __INTEL_PREVIEW_BREAKING_CHANGES inline std::string codeToString(int32_t code) { return std::to_string(code) + " (" + std::string(stringifyErrorCode(code)) + ")"; } -#endif namespace ur { void *getURLoaderLibrary(); diff --git a/sycl/source/exception.cpp b/sycl/source/exception.cpp index d16f924818403..017aae96e9f9c 100644 --- a/sycl/source/exception.cpp +++ b/sycl/source/exception.cpp @@ -17,21 +17,6 @@ namespace sycl { inline namespace _V1 { -#ifndef __INTEL_PREVIEW_BREAKING_CHANGES -exception::exception(std::error_code EC, const char *Msg) - : exception(EC, nullptr, Msg) {} - -// new SYCL 2020 constructors -exception::exception(std::error_code EC) : exception(EC, nullptr, "") {} - -exception::exception(int EV, const std::error_category &ECat, - const char *WhatArg) - : exception({EV, ECat}, nullptr, std::string(WhatArg)) {} - -exception::exception(int EV, const std::error_category &ECat) - : exception({EV, ECat}, nullptr, "") {} -#endif - // protected base constructor for all SYCL 2020 constructors exception::exception(std::error_code EC, std::shared_ptr SharedPtrCtx, const char *WhatArg) diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index e42759431d374..bf14781307de9 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3321,7 +3321,6 @@ _ZN4sycl3_V16detail17reduComputeWGSizeEmmRm _ZN4sycl3_V16detail18get_kernel_id_implENS1_11string_viewE _ZN4sycl3_V16detail18make_kernel_bundleEmRKNS0_7contextENS0_12bundle_stateENS0_7backendE _ZN4sycl3_V16detail18make_kernel_bundleEmRKNS0_7contextEbNS0_12bundle_stateENS0_7backendE -_ZN4sycl3_V16detail18stringifyErrorCodeEi _ZN4sycl3_V16detail19getDeviceKernelInfoERKNS1_27compile_time_kernel_info_v123CompileTimeKernelInfoTyE _ZN4sycl3_V16detail19kernel_bundle_plain21ext_oneapi_get_kernelENS1_11string_viewE _ZN4sycl3_V16detail19kernel_bundle_plain21ext_oneapi_has_kernelENS1_11string_viewE @@ -3673,16 +3672,8 @@ _ZN4sycl3_V18platformC2EP15_cl_platform_id _ZN4sycl3_V18platformC2ERKNS0_15device_selectorE _ZN4sycl3_V18platformC2ERKNS0_6deviceE _ZN4sycl3_V18platformC2Ev -_ZN4sycl3_V19exceptionC1ESt10error_code -_ZN4sycl3_V19exceptionC1ESt10error_codePKc _ZN4sycl3_V19exceptionC1ESt10error_codeSt10shared_ptrINS0_7contextEEPKc -_ZN4sycl3_V19exceptionC1EiRKNSt3_V214error_categoryE -_ZN4sycl3_V19exceptionC1EiRKNSt3_V214error_categoryEPKc -_ZN4sycl3_V19exceptionC2ESt10error_code -_ZN4sycl3_V19exceptionC2ESt10error_codePKc _ZN4sycl3_V19exceptionC2ESt10error_codeSt10shared_ptrINS0_7contextEEPKc -_ZN4sycl3_V19exceptionC2EiRKNSt3_V214error_categoryE -_ZN4sycl3_V19exceptionC2EiRKNSt3_V214error_categoryEPKc _ZN4sycl3_V19exceptionD0Ev _ZN4sycl3_V19exceptionD1Ev _ZN4sycl3_V19exceptionD2Ev diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index 1db98f1b5cf9d..d6bd8c4fc6201 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -388,8 +388,6 @@ ??0event@_V1@sycl@@QEAA@AEBV012@@Z ??0event@_V1@sycl@@QEAA@PEAU_cl_event@@AEBVcontext@12@@Z ??0event@_V1@sycl@@QEAA@XZ -??0exception@_V1@sycl@@IEAA@Verror_code@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@H@Z -??0exception@_V1@sycl@@IEAA@Verror_code@std@@PEBDH@Z ??0exception@_V1@sycl@@IEAA@Verror_code@std@@V?$shared_ptr@Vcontext@_V1@sycl@@@4@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@@Z ??0exception@_V1@sycl@@IEAA@Verror_code@std@@V?$shared_ptr@Vcontext@_V1@sycl@@@4@PEBD@Z ??0exception@_V1@sycl@@QEAA@AEBV012@@Z @@ -4475,7 +4473,6 @@ ?start_fusion@fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEAAXXZ ?storeRawArg@handler@_V1@sycl@@AEAAPEAXAEBVraw_kernel_arg@experimental@oneapi@ext@23@@Z ?storeRawArg@handler@_V1@sycl@@AEAAPEAXPEBX_K@Z -?stringifyErrorCode@detail@_V1@sycl@@YAPEBDH@Z ?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBUcode_location@detail@23@@Z ?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBUcode_location@detail@23@_N@Z ?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@V123@AEBUcode_location@detail@23@@Z