Skip to content

Commit bf6f955

Browse files
[libomptarget] Run GPU offloading tests on both new and old runtime
Implemented by patching python config instead of modifying all the tests so that -generic and XFAIL work as usual. Expectation is for this to be reverted once the old runtime is deleted. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D112225
1 parent 61cfdf6 commit bf6f955

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

openmp/libomptarget/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ endif()
3838
# This is a list of all the targets that are supported/tested right now.
3939
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} aarch64-unknown-linux-gnu")
4040
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} amdgcn-amd-amdhsa")
41+
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} amdgcn-amd-amdhsa-newRTL")
4142
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64le-ibm-linux-gnu")
4243
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64-ibm-linux-gnu")
4344
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} x86_64-pc-linux-gnu")
4445
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} nvptx64-nvidia-cuda")
46+
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} nvptx64-nvidia-cuda-newRTL")
4547

4648
# Once the plugins for the different targets are validated, they will be added to
4749
# the list of supported targets in the current system.

openmp/libomptarget/plugins/amdgpu/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,3 @@ endif()
122122

123123
# Report to the parent scope that we are building a plugin for amdgpu
124124
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS} amdgcn-amd-amdhsa" PARENT_SCOPE)
125-

openmp/libomptarget/plugins/cuda/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ target_link_libraries(omptarget.rtl.cuda
6565
# Otherwise this plugin is being built speculatively and there may be no cuda available
6666
if (LIBOMPTARGET_CAN_LINK_LIBCUDA OR LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA)
6767
libomptarget_say("Enable tests using CUDA plugin")
68-
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda" PARENT_SCOPE)
68+
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-newRTL" PARENT_SCOPE)
6969
else()
7070
libomptarget_say("Disabling tests using CUDA plugin as cuda may not be available")
7171
endif()

openmp/libomptarget/test/lit.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ else: # Unices
9696
config.test_flags += " --libomptarget-amdgcn-bc-path=" + config.library_dir
9797
if config.libomptarget_current_target.startswith('nvptx'):
9898
config.test_flags += " --libomptarget-nvptx-bc-path=" + config.library_dir
99+
if config.libomptarget_current_target.endswith('-newRTL'):
100+
config.test_flags += " -fopenmp-target-new-runtime"
99101

100102
# substitutions
101103
# - for targets that exist in the system create the actual command.

openmp/libomptarget/test/unified_shared_memory/api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %libomptarget-compile-run-and-check-generic
22
// XFAIL: nvptx64-nvidia-cuda
3+
// XFAIL: nvptx64-nvidia-cuda-newRTL
34

45
// Fails on amdgcn with error: GPU Memory Error
56
// XFAIL: amdgcn-amd-amdhsa

0 commit comments

Comments
 (0)