Skip to content

Commit b23233f

Browse files
[SYCL][ABI-Break] Hide getPlugin symbol (#14616)
This function is not called anywhere from SYCL headers and therefore there is no reason to have it exported. It was made exported as part of ESIMD emulator plugin addition (#2963), but that plugin was since then deprecated and removed (#13295). 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.
1 parent 0360e6a commit b23233f

File tree

4 files changed

+5
-14
lines changed

4 files changed

+5
-14
lines changed

sycl/include/sycl/detail/pi.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ extern std::shared_ptr<plugin> GlobalPlugin;
194194
std::vector<PluginPtr> &initialize();
195195

196196
// Get the plugin serving given backend.
197-
template <backend BE> __SYCL_EXPORT const PluginPtr &getPlugin();
197+
template <backend BE> const PluginPtr &getPlugin();
198198

199199
// Utility Functions to get Function Name for a PI Api.
200200
template <PiApiKind PiApiOffset> struct PiFuncInfo {};

sycl/source/detail/pi.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,10 @@ template <backend BE> const PluginPtr &getPlugin() {
508508
"pi::getPlugin couldn't find plugin");
509509
}
510510

511-
template __SYCL_EXPORT const PluginPtr &getPlugin<backend::opencl>();
512-
template __SYCL_EXPORT const PluginPtr &
513-
getPlugin<backend::ext_oneapi_level_zero>();
514-
template __SYCL_EXPORT const PluginPtr &getPlugin<backend::ext_oneapi_cuda>();
515-
template __SYCL_EXPORT const PluginPtr &getPlugin<backend::ext_oneapi_hip>();
511+
template const PluginPtr &getPlugin<backend::opencl>();
512+
template const PluginPtr &getPlugin<backend::ext_oneapi_level_zero>();
513+
template const PluginPtr &getPlugin<backend::ext_oneapi_cuda>();
514+
template const PluginPtr &getPlugin<backend::ext_oneapi_hip>();
516515

517516
// Report error and no return (keeps compiler from printing warnings).
518517
// TODO: Probably change that to throw a catchable exception,

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3292,10 +3292,6 @@ _ZN4sycl3_V16detail28getValueFromDynamicParameterERNS0_3ext6oneapi12experimental
32923292
_ZN4sycl3_V16detail2pi25contextSetExtendedDeleterERKNS0_7contextEPFvPvES6_
32933293
_ZN4sycl3_V16detail2pi3dieEPKc
32943294
_ZN4sycl3_V16detail2pi9assertionEbPKc
3295-
_ZN4sycl3_V16detail2pi9getPluginILNS0_7backendE1EEERKSt10shared_ptrINS1_6pluginEEv
3296-
_ZN4sycl3_V16detail2pi9getPluginILNS0_7backendE2EEERKSt10shared_ptrINS1_6pluginEEv
3297-
_ZN4sycl3_V16detail2pi9getPluginILNS0_7backendE3EEERKSt10shared_ptrINS1_6pluginEEv
3298-
_ZN4sycl3_V16detail2pi9getPluginILNS0_7backendE6EEERKSt10shared_ptrINS1_6pluginEEv
32993295
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHost10getAccDataEv
33003296
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHost6getPtrEv
33013297
_ZN4sycl3_V16detail30UnsampledImageAccessorBaseHostC1ENS0_5rangeILi3EEENS0_6access4modeEPviiNS0_2idILi3EEENS0_18image_channel_typeENS0_19image_channel_orderERKNS0_13property_listE

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
??$create_sub_devices@$0BAII@@device@_V1@sycl@@QEBA?AV?$vector@Vdevice@_V1@sycl@@V?$allocator@Vdevice@_V1@sycl@@@std@@@std@@W4partition_affinity_domain@info@12@@Z
1515
??$create_sub_devices@$0BAIJ@@device@_V1@sycl@@QEBA?AV?$vector@Vdevice@_V1@sycl@@V?$allocator@Vdevice@_V1@sycl@@@std@@@std@@XZ
1616
??$ext_oneapi_get_info@Umax_num_work_group_sync@kernel_queue_specific@info@experimental@oneapi@ext@_V1@sycl@@@kernel@_V1@sycl@@QEBA_KAEBVqueue@12@@Z
17-
??$getPlugin@$00@pi@detail@_V1@sycl@@YAAEBV?$shared_ptr@Vplugin@detail@_V1@sycl@@@std@@XZ
18-
??$getPlugin@$01@pi@detail@_V1@sycl@@YAAEBV?$shared_ptr@Vplugin@detail@_V1@sycl@@@std@@XZ
19-
??$getPlugin@$02@pi@detail@_V1@sycl@@YAAEBV?$shared_ptr@Vplugin@detail@_V1@sycl@@@std@@XZ
20-
??$getPlugin@$05@pi@detail@_V1@sycl@@YAAEBV?$shared_ptr@Vplugin@detail@_V1@sycl@@@std@@XZ
2117
??$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
2218
??$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
2319
??$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

0 commit comments

Comments
 (0)