-
Notifications
You must be signed in to change notification settings - Fork 11.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Offload] Refactor offload test requirements #95196
[Offload] Refactor offload test requirements #95196
Conversation
@llvm/pr-subscribers-offload Author: Ethan Luis McDonough (EthanLuisMcDonough) ChangesMany tests in the Patch is 67.16 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/95196.diff 92 Files Affected:
diff --git a/offload/test/api/omp_dynamic_shared_memory.c b/offload/test/api/omp_dynamic_shared_memory.c
index 3fe75f24db3e6..76f625f07bfaf 100644
--- a/offload/test/api/omp_dynamic_shared_memory.c
+++ b/offload/test/api/omp_dynamic_shared_memory.c
@@ -6,12 +6,7 @@
// RUN: env LIBOMPTARGET_SHARED_MEMORY_SIZE=256 \
// RUN: %libomptarget-run-generic | %fcheck-generic
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
#include <omp.h>
#include <stdio.h>
diff --git a/offload/test/jit/empty_kernel_lvl1.c b/offload/test/jit/empty_kernel_lvl1.c
index a0b8cd448837d..812d5c1f46314 100644
--- a/offload/test/jit/empty_kernel_lvl1.c
+++ b/offload/test/jit/empty_kernel_lvl1.c
@@ -28,11 +28,6 @@
// RUN: %fcheck-plain-generic --input-file %t.pre.ll %S/empty_kernel.inc --check-prefixes=FIRST,SECOND
// clang-format on
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
#include "empty_kernel.inc"
diff --git a/offload/test/jit/empty_kernel_lvl2.c b/offload/test/jit/empty_kernel_lvl2.c
index 81a04f55ce43d..90e4ce321fe8a 100644
--- a/offload/test/jit/empty_kernel_lvl2.c
+++ b/offload/test/jit/empty_kernel_lvl2.c
@@ -88,11 +88,6 @@
// RUN: not %fcheck-plain-generic --input-file %t.pre.ll %S/empty_kernel.inc --check-prefixes=FIRST,SECOND
// clang-format on
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
#include "empty_kernel.inc"
diff --git a/offload/test/jit/type_punning.c b/offload/test/jit/type_punning.c
index 10e3d2cef718b..574168b8a69cb 100644
--- a/offload/test/jit/type_punning.c
+++ b/offload/test/jit/type_punning.c
@@ -8,12 +8,7 @@
//
// clang-format on
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
// Ensure that there is only the kernel function left, not any outlined
// parallel regions.
diff --git a/offload/test/libc/assert.c b/offload/test/libc/assert.c
index 803a8207e10a4..c2c5055c47051 100644
--- a/offload/test/libc/assert.c
+++ b/offload/test/libc/assert.c
@@ -5,12 +5,7 @@
// NVPTX without LTO uses the implementation in OpenMP currently.
// UNSUPPORTED: nvptx64-nvidia-cuda
-// UNSUPPORTED: powerpc64-ibm-linux-gnu
-// UNSUPPORTED: powerpc64-ibm-linux-gnu-LTO
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
+// REQUIRES: gpu
#include <assert.h>
diff --git a/offload/test/lit.cfg b/offload/test/lit.cfg
index 6c590603079c4..ef9a7deb97d34 100644
--- a/offload/test/lit.cfg
+++ b/offload/test/lit.cfg
@@ -188,6 +188,24 @@ def add_libraries(source):
config.llvm_library_intdir + "/libomptarget.devicertl.a"
return source + " " + config.llvm_library_intdir + "/libomptarget.devicertl.a"
+# Add platform targets
+host_targets = [
+ "aarch64-unknown-linux-gnu",
+ "aarch64-unknown-linux-gnu-LTO",
+ "x86_64-pc-linux-gnu",
+ "x86_64-pc-linux-gnu-LTO",
+ "s390x-ibm-linux-gnu",
+ "s390x-ibm-linux-gnu-LTO",
+]
+if config.libomptarget_current_target.startswith('nvptx'):
+ config.available_features.add('gpu')
+ config.available_features.add('nvidia-gpu')
+if config.libomptarget_current_target.startswith('amdgcn'):
+ config.available_features.add('gpu')
+ config.available_features.add('amdgpu')
+if config.libomptarget_current_target in host_targets:
+ config.available_features.add('host')
+
# substitutions
# - for targets that exist in the system create the actual command.
# - for valid targets that do not exist in the system, return false, so that the
diff --git a/offload/test/mapping/auto_zero_copy.cpp b/offload/test/mapping/auto_zero_copy.cpp
index 46641200bb56e..69dabadd25322 100644
--- a/offload/test/mapping/auto_zero_copy.cpp
+++ b/offload/test/mapping/auto_zero_copy.cpp
@@ -7,15 +7,7 @@
// RUN: env HSA_XNACK=0 LIBOMPTARGET_INFO=30 %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic -check-prefix=INFO_COPY -check-prefix=CHECK
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: nvptx64-nvidia-cuda
-// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
-
+// REQUIRES: amdgpu
// REQUIRES: unified_shared_memory
// clang-format on
diff --git a/offload/test/mapping/auto_zero_copy_apu.cpp b/offload/test/mapping/auto_zero_copy_apu.cpp
index 48360e4fd7f7b..4a03fb2e7084e 100644
--- a/offload/test/mapping/auto_zero_copy_apu.cpp
+++ b/offload/test/mapping/auto_zero_copy_apu.cpp
@@ -7,13 +7,7 @@
// RUN: env HSA_XNACK=0 LIBOMPTARGET_INFO=30 %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic -check-prefix=INFO_COPY -check-prefix=CHECK
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: nvptx64-nvidia-cuda
-// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-
+// REQUIRES: amdgpu
// REQUIRES: apu
// clang-format on
diff --git a/offload/test/mapping/auto_zero_copy_globals.cpp b/offload/test/mapping/auto_zero_copy_globals.cpp
index 55dfb2807ebc7..556f0142695fd 100644
--- a/offload/test/mapping/auto_zero_copy_globals.cpp
+++ b/offload/test/mapping/auto_zero_copy_globals.cpp
@@ -3,15 +3,7 @@
// RUN: env OMPX_APU_MAPS=1 HSA_XNACK=1 LIBOMPTARGET_INFO=60 %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic -check-prefix=CHECK
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: nvptx64-nvidia-cuda
-// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
-
+// REQUIRES: amdgpu
// REQUIRES: unified_shared_memory
// clang-format on
diff --git a/offload/test/mapping/prelock.cpp b/offload/test/mapping/prelock.cpp
index d019108dcad62..bc881ef827498 100644
--- a/offload/test/mapping/prelock.cpp
+++ b/offload/test/mapping/prelock.cpp
@@ -1,12 +1,9 @@
// RUN: %libomptarget-compilexx-generic
// RUN: %libomptarget-run-generic %fcheck-generic
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
+// REQURIES: gpu
// UNSUPPORTED: nvptx64-nvidia-cuda
// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
// UNSUPPORTED: amdgcn-amd-amdhsa
#include <cstdio>
diff --git a/offload/test/offloading/barrier_fence.c b/offload/test/offloading/barrier_fence.c
index b9a8ca27965a0..73d259d4f71b6 100644
--- a/offload/test/offloading/barrier_fence.c
+++ b/offload/test/offloading/barrier_fence.c
@@ -3,12 +3,7 @@
// RUN: %libomptarget-compileopt-generic -fopenmp-offload-mandatory -O3
// RUN: %libomptarget-run-generic
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
#include <omp.h>
#include <stdio.h>
diff --git a/offload/test/offloading/bug49334.cpp b/offload/test/offloading/bug49334.cpp
index 1f19dab378810..eaf7b85049bff 100644
--- a/offload/test/offloading/bug49334.cpp
+++ b/offload/test/offloading/bug49334.cpp
@@ -5,12 +5,7 @@
// RUN: %libomptarget-compileoptxx-generic -O3 -ffast-math && \
// RUN: %libomptarget-run-generic
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
// UNSUPPORTED: amdgcn-amd-amdhsa
// UNSUPPORTED: nvptx64-nvidia-cuda
// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
diff --git a/offload/test/offloading/default_thread_limit.c b/offload/test/offloading/default_thread_limit.c
index d9be843dfbda4..6e415a5cc11c2 100644
--- a/offload/test/offloading/default_thread_limit.c
+++ b/offload/test/offloading/default_thread_limit.c
@@ -5,12 +5,7 @@
// UNSUPPORTED: nvptx64-nvidia-cuda
// UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-// UNSUPPORTED: aarch64-unknown-linux-gnu
-// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-// UNSUPPORTED: x86_64-pc-linux-gnu
-// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
-// UNSUPPORTED: s390x-ibm-linux-gnu
-// UNSUPPORTED: s390x-ibm-linux-gnu-LTO
+// REQUIRES: gpu
__attribute__((optnone)) int optnone() { return 1; }
diff --git a/offload/test/offloading/dynamic_module.c b/offload/test/offloading/dynamic_module.c
index 9dcf3a1ae649a..00ae8100db7e4 100644
--- a/offload/test/offloading/dynamic_module.c
+++ b/offload/test/offloading/dynamic_module.c
@@ -3,7 +3,7 @@
// RUN: %libomptarget-compileopt-generic -DSHARED -fPIC -shared -o %t.so && \
// RUN: %libomptarget-compileopt-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic
//
-// UNSUPPORTED: x86_64-pc-linux-gnu
+// REQUIRES: gpu
#ifdef SHARED
void foo() {}
diff --git a/offload/test/offloading/fortran/basic-target-parallel-do.f90 b/offload/test/offloading/fortran/basic-target-parallel-do.f90
index 0027f15bdb423..21f33dab65fb0 100644
--- a/offload/test/offloading/fortran/basic-target-parallel-do.f90
+++ b/offload/test/offloading/fortran/basic-target-parallel-do.f90
@@ -1,10 +1,7 @@
! Basic offloading test with a target region
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-generic
! RUN: env LIBOMPTARGET_INFO=16 %libomptarget-run-generic 2>&1 | %fcheck-generic
diff --git a/offload/test/offloading/fortran/basic-target-parallel-region.f90 b/offload/test/offloading/fortran/basic-target-parallel-region.f90
index 54341f7c40ff3..b65fa99617302 100644
--- a/offload/test/offloading/fortran/basic-target-parallel-region.f90
+++ b/offload/test/offloading/fortran/basic-target-parallel-region.f90
@@ -1,10 +1,7 @@
! Basic offloading test with a target region
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90 b/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
index e0b0f2ea734e9..712bcacf671cb 100644
--- a/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
+++ b/offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
@@ -1,11 +1,8 @@
! Basic offloading test of arrays with provided lower
! and upper bounds as specified by OpenMP's sectioning
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90 b/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
index 1b3f86c0dbfaa..a6928b61a0439 100644
--- a/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
+++ b/offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
@@ -1,11 +1,8 @@
! Basic offloading test of a regular array explicitly
! passed within a target region
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/basic-target-region-3D-array.f90 b/offload/test/offloading/fortran/basic-target-region-3D-array.f90
index ea3048185d52b..d575810713895 100644
--- a/offload/test/offloading/fortran/basic-target-region-3D-array.f90
+++ b/offload/test/offloading/fortran/basic-target-region-3D-array.f90
@@ -1,11 +1,8 @@
! Basic offloading test of a regular array explicitly
! passed within a target region
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/basic_target_region.f90 b/offload/test/offloading/fortran/basic_target_region.f90
index d856d42bb8cd6..be59dd4596532 100644
--- a/offload/test/offloading/fortran/basic_target_region.f90
+++ b/offload/test/offloading/fortran/basic_target_region.f90
@@ -1,10 +1,7 @@
! Basic offloading test with a target region
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/constant-arr-index.f90 b/offload/test/offloading/fortran/constant-arr-index.f90
index 669630555c31e..5e4846eda74d2 100644
--- a/offload/test/offloading/fortran/constant-arr-index.f90
+++ b/offload/test/offloading/fortran/constant-arr-index.f90
@@ -3,11 +3,8 @@
! correctly works (regression test for prior
! bug).
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/declare-target-vars-in-target-region.f90 b/offload/test/offloading/fortran/declare-target-vars-in-target-region.f90
index f524deac3bcce..76c431829f7fe 100644
--- a/offload/test/offloading/fortran/declare-target-vars-in-target-region.f90
+++ b/offload/test/offloading/fortran/declare-target-vars-in-target-region.f90
@@ -2,11 +2,8 @@
! Fortran array writing some values to it and checking the host
! correctly receives the updates made on the device.
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
module test_0
diff --git a/offload/test/offloading/fortran/double-target-call-with-declare-target.f90 b/offload/test/offloading/fortran/double-target-call-with-declare-target.f90
index 38cb055bfa2da..237eabc29c2dd 100644
--- a/offload/test/offloading/fortran/double-target-call-with-declare-target.f90
+++ b/offload/test/offloading/fortran/double-target-call-with-declare-target.f90
@@ -3,12 +3,9 @@
! it before checking the host correctly receives the
! correct updates made on the device.
! REQUIRES: flang
+! REQUIRES: gpu
! UNSUPPORTED: nvptx64-nvidia-cuda
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
module test_0
diff --git a/offload/test/offloading/fortran/target-map-allocatable-array-section-1d-bounds.f90 b/offload/test/offloading/fortran/target-map-allocatable-array-section-1d-bounds.f90
index 99dbe99d40497..c52d8bc3cc5d8 100644
--- a/offload/test/offloading/fortran/target-map-allocatable-array-section-1d-bounds.f90
+++ b/offload/test/offloading/fortran/target-map-allocatable-array-section-1d-bounds.f90
@@ -1,13 +1,8 @@
! Offloading test checking interaction of a
! two 1-D allocatable arrays with a target region
! while providing the map upper and lower bounds
-! REQUIRES: flang, amdgcn-amd-amdhsa
-! UNSUPPORTED: nvptx64-nvidia-cuda
-! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
+! REQUIRES: flang
+! REQUIRES: amdgcn-amd-amdhsa
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/target-map-allocatable-array-section-3d-bounds.f90 b/offload/test/offloading/fortran/target-map-allocatable-array-section-3d-bounds.f90
index 0786e0fd744e7..0ed15f66543de 100644
--- a/offload/test/offloading/fortran/target-map-allocatable-array-section-3d-bounds.f90
+++ b/offload/test/offloading/fortran/target-map-allocatable-array-section-3d-bounds.f90
@@ -1,13 +1,8 @@
! Offloading test checking interaction of allocatables
! with multi-dimensional bounds (3-D in this case) and
! a target region
-! REQUIRES: flang, amdgcn-amd-amdhsa
-! UNSUPPORTED: nvptx64-nvidia-cuda
-! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
+! REQUIRES: flang
+! REQUIRES: amdgcn-amd-amdhsa
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90 b/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
index 506976b339dfc..93ff8159bef87 100644
--- a/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
+++ b/offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
@@ -1,12 +1,6 @@
! Offloading test checking interaction of allocatables
! with target in different scopes
! REQUIRES: flang, amdgcn-amd-amdhsa
-! UNSUPPORTED: nvptx64-nvidia-cuda
-! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
module test
diff --git a/offload/test/offloading/fortran/target-map-derived-type-full-1.f90 b/offload/test/offloading/fortran/target-map-derived-type-full-1.f90
index f4e11f8b9e326..e81d603a6b4f5 100644
--- a/offload/test/offloading/fortran/target-map-derived-type-full-1.f90
+++ b/offload/test/offloading/fortran/target-map-derived-type-full-1.f90
@@ -3,12 +3,6 @@
! to target and assinging one derived type
! to another
! REQUIRES: flang, amdgcn-amd-amdhsa
-! UNSUPPORTED: nvptx64-nvidia-cuda
-! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
-! UNSUPPORTED: aarch64-unknown-linux-gnu
-! UNSUPPORTED: aarch64-unknown-linux-gnu-LTO
-! UNSUPPORTED: x86_64-pc-linux-gnu
-! UNSUPPORTED: x86_64-pc-linux-gnu-LTO
! RUN: %libomptarget-compile-fortran-run-and-check-generic
program main
diff --git a/offload/test/offloading/fortran/target-map-derived-type-full-2.f90 b/offload/test/offloading/fortran/target-map-derived-type-full-2.f90
index f97880a2023d4..520d94e83a308 100644
--- a/offload/test/offloading/fortran/target-map-derived-type-full-2.f90
+++ b/offload/tes...
[truncated]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM I think the overall simplification is nice (at least from the perspective of someone writing these on a fairly regular basis at least), but please do wait on one of the more experienced reviewers to approve before landing! They'll likely know the broader impact of simplifying the architecture listing, if there is any :-)
offload/test/mapping/prelock.cpp
Outdated
@@ -1,12 +1,9 @@ | |||
// RUN: %libomptarget-compilexx-generic | |||
// RUN: %libomptarget-run-generic %fcheck-generic | |||
|
|||
// UNSUPPORTED: aarch64-unknown-linux-gnu | |||
// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO | |||
// REQURIES: gpu | |||
// UNSUPPORTED: nvptx64-nvidia-cuda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also use nvidia-gpu
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I that should work. I kept those long names because I wasn't sure which targets this test was meant to run on (seeing that host, nvptx64-nvidia-cuda
, nvptx64-nvidia-cuda-LTO
, and amdgcn-amd-amdhsa
). I figured it was best to err on the side of caution.
Make naming scheme consistent
offload/test/mapping/prelock.cpp
Outdated
// UNSUPPORTED: nvidiagpu | ||
// UNSUPPORTED: amdgcn-amd-amdhsa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird that we're doing nvidia-gpu
instead of nvptx64-nvidia-cuda
or just nvptx
when there's amdgcn
right below it. I don't think there's a particular need to distinguish between the NVPTX triple and the NVPTX triple on a GPU.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just not sure where this test is supposed to be run. The test is unsupported on host targets, amdgcn-amd-amdhsa
, and NVIDIA targets. Ideally we would only include the platform its meant to run on, but I'm not sure what platform that is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug49334.cpp is another test case where I did this. I wasn't sure which targets the test was meant to support, so I just kept in a lot of the unsupported directives.
Upstream main:
llvm-project/offload/test/offloading/bug49334.cpp
Lines 8 to 16 in aa9bf71
// UNSUPPORTED: x86_64-pc-linux-gnu | |
// UNSUPPORTED: x86_64-pc-linux-gnu-LTO | |
// UNSUPPORTED: aarch64-unknown-linux-gnu | |
// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO | |
// UNSUPPORTED: s390x-ibm-linux-gnu | |
// UNSUPPORTED: s390x-ibm-linux-gnu-LTO | |
// UNSUPPORTED: amdgcn-amd-amdhsa | |
// UNSUPPORTED: nvptx64-nvidia-cuda | |
// UNSUPPORTED: nvptx64-nvidia-cuda-LTO |
My PR:
llvm-project/offload/test/offloading/bug49334.cpp
Lines 8 to 11 in 88b8437
// REQUIRES: gpu | |
// UNSUPPORTED: amdgcn-amd-amdhsa | |
// UNSUPPORTED: nvptx64-nvidia-cuda | |
// UNSUPPORTED: nvptx64-nvidia-cuda-LTO |
Are these tests meant to be disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, that list pretty much means "no one". I would just keep nvptx64-nvidia-cuda
but drop the -LTO
bit since it's irrelevant AFAIK. (I think there's a single test case where it matters but that's just because I don't have compiler-rt yet)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the test where that matters is assert.c:
llvm-project/offload/test/libc/assert.c
Lines 6 to 8 in 88b8437
// NVPTX without LTO uses the implementation in OpenMP currently. | |
// UNSUPPORTED: nvptx64-nvidia-cuda | |
// REQUIRES: gpu |
If the test isn't meant to run anywhere yet, I think // UNSUPPORTED: host, gpu
might be more explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah I wanted to get rid of that as well and just make it use the libc
one, but for now it's probably fin. Can probably just have REQUIRES: lto
or something.
Many tests in the `offload` project have requirements defined by which targets are not supported rather than which platforms are supported. This patch aims to streamline the requirement definitions by adding four new feature tags: `host`, `gpu`, `amdgpu`, and `nvidiagpu`.
Many tests in the
offload
project have requirements defined by which targets are not supported rather than which platforms are supported. This patch aims to streamline the requirement definitions by adding four new feature tags:host
,gpu
,amdgpu
, andnvidia-gpu
.