Skip to content

Commit 00b4a92

Browse files
authored
[SYCL] Remove unused plugin-related infrastructure from scripts. (#15387)
Also delete commented out plugin stream reference in sycl-trace.
1 parent f011892 commit 00b4a92

File tree

5 files changed

+1
-100
lines changed

5 files changed

+1
-100
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ set(SYCL_EXT_ONEAPI_BACKEND_HIP ${LLVM_HAS_AMDGPU_TARGET})
196196
# Configure SYCL version macro
197197
set(sycl_inc_dir ${CMAKE_CURRENT_SOURCE_DIR}/include)
198198
set(sycl_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/source)
199-
set(sycl_plugin_dir ${CMAKE_CURRENT_SOURCE_DIR}/plugins)
200199
string(TIMESTAMP __SYCL_COMPILER_VERSION "%Y%m%d")
201200
configure_file("source/version.hpp.in" "${SYCL_INCLUDE_BUILD_DIR}/sycl/version.hpp")
202201
configure_file("source/feature_test.hpp.in" "${SYCL_INCLUDE_BUILD_DIR}/sycl/feature_test.hpp")
@@ -289,7 +288,7 @@ else()
289288
endif()
290289

291290
# This function allows building multiple libraries with the same options.
292-
# Currently used by sycl and plugins library.
291+
# Currently used by add_sycl_library and add_sycl_rt_library.
293292
# Currently handles linking with libcxx support and gcc workaround
294293
function( add_common_options LIB_NAME)
295294
if (SYCL_USE_LIBCXX)

sycl/cmake/modules/AddSYCL.cmake

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -33,67 +33,3 @@ function(add_sycl_library LIB_NAME TYPE)
3333
# TODO remove add_common_options
3434
add_common_options(${LIB_NAME})
3535
endfunction()
36-
37-
# current ur adapter dependency managing is a bit hacky, we should try to copy
38-
# this as closely as possible instead
39-
function(add_sycl_plugin PLUGIN_NAME)
40-
cmake_parse_arguments("ARG"
41-
""
42-
""
43-
"SOURCES;INCLUDE_DIRS;LIBRARIES;HEADER"
44-
${ARGN}
45-
)
46-
47-
add_sycl_library("pi_${PLUGIN_NAME}" SHARED
48-
LINKER_SCRIPT "${PROJECT_SOURCE_DIR}/plugins/ld-version-script.txt"
49-
SOURCES ${ARG_SOURCES}
50-
INCLUDE_DIRS
51-
${ARG_INCLUDE_DIRS}
52-
${sycl_inc_dir}
53-
LIBRARIES
54-
${ARG_LIBRARIES}
55-
OpenCL-Headers
56-
)
57-
58-
# All SYCL plugins use UR sources.
59-
# Disable errors from warnings and apply other workarounds while building the UR.
60-
if(WIN32)
61-
target_compile_options("pi_${PLUGIN_NAME}" PRIVATE /WX- /UUNICODE /DUSE_Z7=ON)
62-
else()
63-
target_compile_options("pi_${PLUGIN_NAME}" PRIVATE -Wno-error)
64-
endif()
65-
66-
# Install feature test header
67-
if (NOT "${ARG_HEADER}" STREQUAL "")
68-
get_filename_component(HEADER_NAME ${ARG_HEADER} NAME)
69-
configure_file(
70-
${ARG_HEADER}
71-
${SYCL_INCLUDE_BUILD_DIR}/sycl/detail/plugins/${PLUGIN_NAME}/${HEADER_NAME}
72-
COPYONLY)
73-
74-
install(FILES ${ARG_HEADER}
75-
DESTINATION ${SYCL_INCLUDE_DIR}/sycl/detail/plugins/${PLUGIN_NAME}
76-
COMPONENT pi_${PLUGIN_NAME})
77-
endif()
78-
79-
install(TARGETS pi_${PLUGIN_NAME}
80-
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT pi_${PLUGIN_NAME}
81-
RUNTIME DESTINATION "bin" COMPONENT pi_${PLUGIN_NAME})
82-
83-
set (manifest_file
84-
${CMAKE_CURRENT_BINARY_DIR}/install_manifest_pi_${PLUGIN_NAME}.txt)
85-
add_custom_command(OUTPUT ${manifest_file}
86-
COMMAND "${CMAKE_COMMAND}"
87-
"-DCMAKE_INSTALL_COMPONENT=pi_${PLUGIN_NAME}"
88-
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake"
89-
COMMENT "Deploying component pi_${PLUGIN_NAME}"
90-
USES_TERMINAL
91-
)
92-
add_custom_target(install-sycl-plugin-${PLUGIN_NAME}
93-
DEPENDS
94-
${manifest_file} pi_${PLUGIN_NAME}
95-
)
96-
97-
set_property(GLOBAL APPEND PROPERTY SYCL_TOOLCHAIN_INSTALL_COMPONENTS
98-
pi_${PLUGIN_NAME})
99-
endfunction()

sycl/test/include_deps/deps_known.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,10 @@ function deps() {
1010
#
1111
# However, sometimes first header is on the same line with
1212
# "null.o: /dev/null <header>", so add an explicit line break there.
13-
#
14-
# Also, <detail/plugins/.*/features.hpp> is dependent on what plugins were
15-
# enabled, so ignore them.
1613

1714
clang++ -fsycl -fsycl-device-only -include "$HEADER" -c -x c++ /dev/null -o /dev/null -MD -MF - \
1815
| sed 's@: /dev/null@: /dev/null\n@' \
1916
| grep 'include/sycl\|/dev/null\|:' \
20-
| grep -v 'detail/plugins/.*/features.hpp' \
2117
| sed 's@.*/include/sycl/@@' \
2218
| sed 's/ \\//'
2319
}

sycl/tools/abi_check.py

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,35 +61,6 @@ def parse_readobj_output(output):
6161
# See: https://github.com/bminor/glibc/commit/035c012e32c11e84d64905efaf55e74f704d3668
6262
ignore_symbols += ["__libc_csu_fini", "__libc_csu_init"]
6363

64-
# In some scenarios MSVC and clang-cl exhibit differences in regards to the exported symbols they generate.
65-
# Some of them happen in the SYCL RT library and we think clang-cl's behavior is more reasonable.
66-
#
67-
# Case 1:
68-
# ur.hpp:
69-
# template <backend BE> __SYCL_EXPORT const PluginPtr &getPlugin();
70-
#
71-
# ur.cpp:
72-
# template <backend BE> const PluginPtr &getPlugin() {
73-
# static const plugin *Plugin = nullptr;
74-
# ...
75-
# }
76-
# // explicit dllexport instantiations.
77-
#
78-
# clang-cl generates exported symbols for the static variables Plugin. These are never referenced
79-
# in the user's headers so cannot be used outside DLL and not exporting them should not affect any
80-
# usage scenario.
81-
#
82-
# In general, the compiler doesn't know if the definition is in the DLL or in the header and inline
83-
# dllexport/dllimport functions have to be supported, hence clang-cl's behavior.
84-
#
85-
# See also https://devblogs.microsoft.com/oldnewthing/20140109-00/?p=2123.
86-
ignore_symbols += [
87-
"?Plugin@?1???$getPlugin@$01@pi@detail@_V1@sycl@@YAAEBVplugin@234@XZ@4PEBV5234@EB",
88-
"?Plugin@?1???$getPlugin@$00@pi@detail@_V1@sycl@@YAAEBVplugin@234@XZ@4PEBV5234@EB",
89-
"?Plugin@?1???$getPlugin@$04@pi@detail@_V1@sycl@@YAAEBVplugin@234@XZ@4PEBV5234@EB",
90-
"?Plugin@?1???$getPlugin@$02@pi@detail@_V1@sycl@@YAAEBVplugin@234@XZ@4PEBV5234@EB",
91-
"?Plugin@?1???$getPlugin@$05@pi@detail@_V1@sycl@@YAAEBVplugin@234@XZ@4PEBV5234@EB",
92-
]
9364
parsed_symbols = [s for s in parsed_symbols if s not in ignore_symbols]
9465
return parsed_symbols
9566

sycl/tools/sycl-trace/main.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ int main(int argc, char **argv, char *env[]) {
2222
cl::desc("Available tracing modes:"),
2323
cl::values(
2424
// TODO graph dot
25-
// clEnumValN(PI, "plugin", "Trace Plugin Interface calls"),
2625
clEnumValN(UR, "ur.call", "Trace Unified Runtime calls"),
2726
clEnumValN(ZE, "level_zero", "Trace Level Zero calls"),
2827
clEnumValN(CU, "cuda", "Trace CUDA Driver API calls"),

0 commit comments

Comments
 (0)