Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion offload/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ set(LIBOMPTARGET_LLVM_LIBRARY_INTDIR "${LIBOMPTARGET_INTDIR}" CACHE STRING
"Path to folder where intermediate libraries will be output")

# Build offloading plugins and device RTLs if they are available.
add_subdirectory(plugins-nextgen)
add_subdirectory(DeviceRTL)
add_subdirectory(plugins-nextgen)
add_subdirectory(tools)

# Build target agnostic offloading library.
Expand Down
3 changes: 3 additions & 0 deletions offload/DeviceRTL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ elseif(LIBOMPTARGET_DEVICE_ARCHITECTURES STREQUAL "auto" OR
"${LIBOMPTARGET_NVPTX_DETECTED_ARCH_LIST};${LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST}")
endif()
list(REMOVE_DUPLICATES LIBOMPTARGET_DEVICE_ARCHITECTURES)
# for tests
set(LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES ${LIBOMPTARGET_DEVICE_ARCHITECTURES}
PARENT_SCOPE)

set(include_files
${include_directory}/Allocator.h
Expand Down
5 changes: 4 additions & 1 deletion offload/plugins-nextgen/amdgpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ endif()
# Configure testing for the AMDGPU plugin. We will build tests if we could a
# functional AMD GPU on the system, or if manually specifies by the user.
option(LIBOMPTARGET_FORCE_AMDGPU_TESTS "Build AMDGPU libomptarget tests" OFF)
if (LIBOMPTARGET_FOUND_AMDGPU_GPU OR LIBOMPTARGET_FORCE_AMDGPU_TESTS)
if ((LIBOMPTARGET_FOUND_AMDGPU_GPU
AND "${LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST}"
IN_LIST LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES)
OR LIBOMPTARGET_FORCE_AMDGPU_TESTS)
# Report to the parent scope that we are building a plugin for amdgpu
set(LIBOMPTARGET_SYSTEM_TARGETS
"${LIBOMPTARGET_SYSTEM_TARGETS} amdgcn-amd-amdhsa" PARENT_SCOPE)
Expand Down
5 changes: 4 additions & 1 deletion offload/plugins-nextgen/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ endif()
# Configure testing for the CUDA plugin. We will build tests if we could a
# functional NVIDIA GPU on the system, or if manually specifies by the user.
option(LIBOMPTARGET_FORCE_NVIDIA_TESTS "Build NVIDIA libomptarget tests" OFF)
if (LIBOMPTARGET_FOUND_NVIDIA_GPU OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
if ((LIBOMPTARGET_FOUND_NVIDIA_GPU
AND "${LIBOMPTARGET_DEP_CUDA_ARCH}"
IN_LIST LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES)
OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
message(STATUS "Enable tests using CUDA plugin")
set(LIBOMPTARGET_SYSTEM_TARGETS
"${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-LTO" PARENT_SCOPE)
Expand Down
Loading