Skip to content

Commit c34d189

Browse files
authored
[Offload] Remove support for old "BUILD_PLUGIN" options. (#91644)
Summary: Since the move to the statically linked plugins, we added a new way to directly control which plugins will be added. Delete these old ones as they will cause the build to fail and suggest the new format.
1 parent 31fb0ae commit c34d189

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

offload/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,19 @@ if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS)
151151
message(FATAL_ERROR "Missing definition for LIBOMPTARGET_LLVM_INCLUDE_DIRS")
152152
endif()
153153

154+
if(DEFINED LIBOMPTARGET_BUILD_CUDA_PLUGIN OR
155+
DEFINED LIBOMPTARGET_BUILD_AMDGPU_PLUGIN)
156+
message(WARNING "Option removed, use 'LIBOMPTARGET_PLUGINS_TO_BUILD' instead")
157+
endif()
158+
154159
set(LIBOMPTARGET_ALL_PLUGIN_TARGETS amdgpu cuda host)
155160
set(LIBOMPTARGET_PLUGINS_TO_BUILD "all" CACHE STRING
156161
"Semicolon-separated list of plugins to use: cuda, amdgpu, host or \"all\".")
157162

158163
if(LIBOMPTARGET_PLUGINS_TO_BUILD STREQUAL "all")
159164
set(LIBOMPTARGET_PLUGINS_TO_BUILD ${LIBOMPTARGET_ALL_PLUGIN_TARGETS})
160165
endif()
166+
message("Building with support for ${LIBOMPTARGET_PLUGINS_TO_BUILD} plugins")
161167

162168
set(LIBOMPTARGET_ENUM_PLUGIN_TARGETS "")
163169
foreach(plugin IN LISTS LIBOMPTARGET_PLUGINS_TO_BUILD)

offload/plugins-nextgen/amdgpu/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@
1212
##===----------------------------------------------------------------------===##
1313

1414
################################################################################
15-
set(LIBOMPTARGET_BUILD_AMDGPU_PLUGIN TRUE CACHE BOOL
16-
"Whether to build AMDGPU plugin")
17-
if (NOT LIBOMPTARGET_BUILD_AMDGPU_PLUGIN)
18-
libomptarget_say("Not building AMDGPU NextGen offloading plugin: LIBOMPTARGET_BUILD_AMDGPU_PLUGIN is false")
19-
return()
20-
endif()
21-
2215
# as of rocm-3.7, hsa is installed with cmake packages and kmt is found via hsa
2316
find_package(hsa-runtime64 QUIET 1.2.0 HINTS ${CMAKE_INSTALL_PREFIX} PATHS /opt/rocm)
2417

offload/plugins-nextgen/cuda/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@
99
# Build a plugin for a CUDA machine if available.
1010
#
1111
##===----------------------------------------------------------------------===##
12-
set(LIBOMPTARGET_BUILD_CUDA_PLUGIN TRUE CACHE BOOL
13-
"Whether to build CUDA plugin")
14-
if (NOT LIBOMPTARGET_BUILD_CUDA_PLUGIN)
15-
libomptarget_say("Not building CUDA NextGen offloading plugin: LIBOMPTARGET_BUILD_CUDA_PLUGIN is false")
16-
return()
17-
endif()
18-
1912
if (NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE_SYSTEM_NAME MATCHES "Linux"))
2013
libomptarget_say("Not building CUDA NextGen offloading plugin: only support CUDA in Linux x86_64, ppc64le, or aarch64 hosts.")
2114
return()

0 commit comments

Comments
 (0)