File tree Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Expand file tree Collapse file tree 4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -370,8 +370,8 @@ set(LIBOMPTARGET_LLVM_LIBRARY_INTDIR "${LIBOMPTARGET_INTDIR}" CACHE STRING
370370 "Path to folder where intermediate libraries will be output" )
371371
372372# Build offloading plugins and device RTLs if they are available.
373- add_subdirectory (plugins-nextgen)
374373add_subdirectory (DeviceRTL)
374+ add_subdirectory (plugins-nextgen)
375375add_subdirectory (tools)
376376
377377# Build target agnostic offloading library.
Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ endif()
2020# Configure testing for the AMDGPU plugin. We will build tests if we could a
2121# functional AMD GPU on the system, or if manually specifies by the user.
2222option (LIBOMPTARGET_FORCE_AMDGPU_TESTS "Build AMDGPU libomptarget tests" OFF )
23- if (LIBOMPTARGET_FOUND_AMDGPU_GPU OR LIBOMPTARGET_FORCE_AMDGPU_TESTS)
23+ if ((LIBOMPTARGET_FOUND_AMDGPU_GPU
24+ AND "${LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST} "
25+ IN_LIST LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES)
26+ OR LIBOMPTARGET_FORCE_AMDGPU_TESTS)
2427 # Report to the parent scope that we are building a plugin for amdgpu
2528 set (LIBOMPTARGET_SYSTEM_TARGETS
2629 "${LIBOMPTARGET_SYSTEM_TARGETS} amdgcn-amd-amdhsa" PARENT_SCOPE)
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ endif()
1616# Configure testing for the CUDA plugin. We will build tests if we could a
1717# functional NVIDIA GPU on the system, or if manually specifies by the user.
1818option (LIBOMPTARGET_FORCE_NVIDIA_TESTS "Build NVIDIA libomptarget tests" OFF )
19- if (LIBOMPTARGET_FOUND_NVIDIA_GPU OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
19+ if ((LIBOMPTARGET_FOUND_NVIDIA_GPU
20+ AND "${LIBOMPTARGET_DEP_CUDA_ARCH} "
21+ IN_LIST LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES)
22+ OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
2023 message (STATUS "Enable tests using CUDA plugin" )
2124 set (LIBOMPTARGET_SYSTEM_TARGETS
2225 "${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-LTO" PARENT_SCOPE)
Original file line number Diff line number Diff line change @@ -37,20 +37,6 @@ string(REGEX MATCHALL "([^\ ]+\ |[^\ ]+$)" SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM
3737foreach (CURRENT_TARGET IN LISTS SYSTEM_TARGETS)
3838 string (STRIP "${CURRENT_TARGET} " CURRENT_TARGET)
3939
40- if (CURRENT_TARGET MATCHES "^amdgcn" AND
41- NOT "${LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST} "
42- IN_LIST LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES)
43- message (WARNING "Detected AMDGPU arch ${LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST} "
44- "not in built arch list, ${CURRENT_TARGET} tests will be skipped" )
45- continue ()
46- elseif (CURRENT_TARGET MATCHES "^nvptx" AND
47- NOT "${LIBOMPTARGET_DEP_CUDA_ARCH} "
48- IN_LIST LIBOMPTARGET_EXPANDED_DEVICE_ARCHITECTURES)
49- message (WARNING "Detected NVPTX arch ${LIBOMPTARGET_DEP_CUDA_ARCH} "
50- "not in built arch list, ${CURRENT_TARGET} tests will be skipped" )
51- continue ()
52- endif ()
53-
5440 add_offload_testsuite(check-libomptarget-${CURRENT_TARGET}
5541 "Running libomptarget tests"
5642 ${CMAKE_CURRENT_BINARY_DIR} /${CURRENT_TARGET}
You can’t perform that action at this time.
0 commit comments