Skip to content

Commit

Permalink
[SYCL][TEST] Test to check ABI neutrality of SYCL RT (#14492)
Browse files Browse the repository at this point in the history
Co-authored-by: Artur Gainullin <[email protected]>
  • Loading branch information
bso-intel and againull authored Jul 12, 2024
1 parent 88a1402 commit 36543a1
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions sycl/test/abi/sycl_abi_neutrality_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// REQUIRES: linux
// UNSUPPORTED: libcxx
// RUN: sort %S/sycl_symbols_linux.dump | FileCheck %s --implicit-check-not=cxx11

// The purpose of this test is to check that all symbols that are visible from
// SYCL library are ABI neutral (see
// https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html). It
// means that SYCL library must not export symbols in "__cxx11" namespace or
// with "cxx11" tag because such symbols correspond to the new ABI entries
// (_GLIBCXX_USE_CXX11_ABI=1, default) and won't work with a program that uses
// the old ABI (_GLIBCXX_USE_CXX11_ABI=0). All APIs exported from SYCL RT must
// avoid using classes like std::string and std::list impacted by the dual ABI
// issue and have to use their ABI-neutral counterparts provided by SYCL RT (e.g
// sycl::detail::string, etc.).

// New exclusions are NOT ALLOWED to this file. All remaining cases that need
// to be fixed are listed below.
// CHECK:_ZN4sycl3_V13ext5intel12experimental15online_compilerILNS3_15source_languageE0EE7compileIJSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISE_EEEEES8_IhSaIhEERKSE_DpRKT_
// CHECK:_ZN4sycl3_V13ext5intel12experimental15online_compilerILNS3_15source_languageE1EE7compileIJSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISE_EEEEES8_IhSaIhEERKSE_DpRKT_
// CHECK:_ZN4sycl3_V13ext5intel12experimental9pipe_base13get_pipe_nameB5cxx11EPKv
// CHECK:_ZN4sycl3_V13ext6oneapi12experimental6detail17build_from_sourceERNS0_13kernel_bundleILNS0_12bundle_stateE3EEERKSt6vectorINS0_6deviceESaISA_EERKS9_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISK_EEPSK_SO_
// CHECK:_ZN4sycl3_V13ext6oneapi12experimental6detail30make_kernel_bundle_from_sourceERKNS0_7contextENS3_15source_languageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt4pairISE_SE_ESaISJ_EE
// CHECK:_ZN4sycl3_V13ext6oneapi12experimental6detail30make_kernel_bundle_from_sourceERKNS0_7contextENS3_15source_languageERKSt6vectorISt4byteSaISA_EES9_ISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESL_ESaISM_EE
// CHECK:_ZN4sycl3_V13ext6oneapi15filter_selectorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V13ext6oneapi15filter_selectorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16ONEAPI15filter_selectorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16ONEAPI15filter_selectorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16detail19kernel_bundle_plain21ext_oneapi_get_kernelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16detail19kernel_bundle_plain21ext_oneapi_has_kernelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16detail6OSUtil10getDirNameB5cxx11EPKc
// CHECK:_ZN4sycl3_V16detail6OSUtil16getCurrentDSODirB5cxx11Ev
// CHECK:_ZN4sycl3_V16device32ext_oneapi_supports_cl_c_featureERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16opencl13has_extensionERKNS0_6deviceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZN4sycl3_V16opencl13has_extensionERKNS0_8platformERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZNK4sycl3_V13ext6oneapi12experimental6detail24modifiable_command_graph11print_graphENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb
// CHECK:_ZNK4sycl3_V16device13has_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
// CHECK:_ZNK4sycl3_V16device21ext_oneapi_cl_profileB5cxx11Ev
// CHECK:_ZNK4sycl3_V16device32ext_oneapi_supports_cl_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_3ext6oneapi12experimental10cl_versionE
// CHECK:_ZNK4sycl3_V18platform13has_extensionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

0 comments on commit 36543a1

Please sign in to comment.