Skip to content

Commit 1891dc3

Browse files
[SYCL][ABI-Break] Drop pi::die (#14626)
It is not used from SYCL headers, there is no reason for it to be exported and moreover it has only a single use since `pi::assertion` was removed. This is patch is essentially a by-product of #14145 and it is done to simplify that change, i.e. PI plugins removal should not be ABI-breaking by itself, we just need to cleanup some of our exported symbols. --------- Co-authored-by: Steffen Larsen <steffen.larsen@intel.com>
1 parent c5ed6e2 commit 1891dc3

File tree

4 files changed

+1
-16
lines changed

4 files changed

+1
-16
lines changed

sycl/include/sycl/detail/pi.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ bool trace(TraceLevel level);
9898
#error "Unsupported OS"
9999
#endif
100100

101-
// Report error and no return (keeps compiler happy about no return statements).
102-
[[noreturn]] __SYCL_EXPORT void die(const char *Message);
103-
104101
using PiPlugin = ::pi_plugin;
105102
using PiResult = ::pi_result;
106103
using PiPlatform = ::pi_platform;

sycl/source/detail/pi.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,7 @@ std::string platformInfoToString(pi_platform_info info) {
212212
case PI_EXT_PLATFORM_INFO_BACKEND:
213213
return "PI_EXT_PLATFORM_INFO_BACKEND";
214214
}
215-
die("Unknown pi_platform_info value passed to "
216-
"sycl::detail::pi::platformInfoToString");
215+
return "unknown PI_PLATFORM_INFO enum value";
217216
}
218217

219218
std::string memFlagToString(pi_mem_flags Flag) {
@@ -513,15 +512,6 @@ template const PluginPtr &getPlugin<backend::ext_oneapi_level_zero>();
513512
template const PluginPtr &getPlugin<backend::ext_oneapi_cuda>();
514513
template const PluginPtr &getPlugin<backend::ext_oneapi_hip>();
515514

516-
// Report error and no return (keeps compiler from printing warnings).
517-
// TODO: Probably change that to throw a catchable exception,
518-
// but for now it is useful to see every failure.
519-
//
520-
[[noreturn]] void die(const char *Message) {
521-
std::cerr << "pi_die: " << Message << std::endl;
522-
std::terminate();
523-
}
524-
525515
// Reads an integer value from ELF data.
526516
template <typename ResT>
527517
static ResT readELFValue(const unsigned char *Data, size_t NumBytes,

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3287,7 +3287,6 @@ _ZN4sycl3_V16detail28SampledImageAccessorBaseHostC2ENS0_5rangeILi3EEEPviiNS0_2id
32873287
_ZN4sycl3_V16detail28getPixelCoordNearestFiltModeENS0_3vecIfLi4EEENS0_15addressing_modeENS0_5rangeILi3EEE
32883288
_ZN4sycl3_V16detail28getValueFromDynamicParameterERNS0_3ext6oneapi12experimental6detail22dynamic_parameter_baseE
32893289
_ZN4sycl3_V16detail2pi25contextSetExtendedDeleterERKNS0_7contextEPFvPvES6_
3290-
_ZN4sycl3_V16detail2pi3dieEPKc
32913290
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHost10getAccDataEv
32923291
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHost6getPtrEv
32933292
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHostC1ENS0_5rangeILi3EEENS0_6access4modeEPviiNS0_2idILi3EEENS0_18image_channel_typeENS0_19image_channel_orderERKNS0_13property_listE

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3749,7 +3749,6 @@
37493749
?destroy_image_handle@experimental@oneapi@ext@_V1@sycl@@YAXAEAUunsampled_image_handle@12345@AEBVdevice@45@AEBVcontext@45@@Z
37503750
?destroy_image_handle@experimental@oneapi@ext@_V1@sycl@@YAXAEAUunsampled_image_handle@12345@AEBVqueue@45@@Z
37513751
?device_has@queue@_V1@sycl@@AEBA_NW4aspect@23@@Z
3752-
?die@pi@detail@_V1@sycl@@YAXPEBD@Z
37533752
?empty@kernel_bundle_plain@detail@_V1@sycl@@QEBA_NXZ
37543753
?enable_ext_oneapi_default_context@detail@_V1@sycl@@YAX_N@Z
37553754
?end@HostProfilingInfo@detail@_V1@sycl@@QEAAXXZ

0 commit comments

Comments
 (0)