[OpenMP][FIX] Split test into amdgpu and nvptx specific ones
authorJohannes Doerfert <johannes@jdoerfert.de>
Sun, 22 Jan 2023 03:54:35 +0000 (19:54 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Sun, 22 Jan 2023 04:12:04 +0000 (20:12 -0800)
This avoids running the test for the host.

openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.inc [moved from openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.c with 91% similarity]
openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c [new file with mode: 0644]
openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.c [new file with mode: 0644]

@@ -1,5 +1,4 @@
-// RUN: env LIBOMPTARGET_NEXTGEN_PLUGINS=1 \
-// RUN: %libomptarget-compileopt-run-and-check-generic
+// Run lines are in the target specific versions.
 
 #include <omp.h>
 #include <stdio.h>
@@ -47,5 +46,4 @@ int main() {
 
   if (!Failed)
     printf("PASS\n");
-  // CHECK: PASS
 }
diff --git a/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c b/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c
new file mode 100644 (file)
index 0000000..656c3a2
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %libomptarget-compile-amdgcn-amd-amdhsa -O1 -mllvm -openmp-opt-inline-device -I %S
+// RUN: env LIBOMPTARGET_NEXTGEN_PLUGINS=1 \
+// RUN:   %libomptarget-run-amdgcn-amd-amdhsa | %fcheck-amdgcn-amd-amdhsa
+// REQUIRES: amdgcn-amd-amdhsa
+
+#include "omp_dynamic_shared_memory_mixed.inc"
+// CHECK: PASS
diff --git a/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.c b/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.c
new file mode 100644 (file)
index 0000000..117809c
--- /dev/null
@@ -0,0 +1,7 @@
+// RUN: %libomptarget-compile-nvptx64-nvidia-cuda -I %S
+// RUN: env LIBOMPTARGET_NEXTGEN_PLUGINS=1 \
+// RUN:   %libomptarget-run-nvptx64-nvidia-cuda | %fcheck-nvptx64-nvidia-cuda
+// REQUIRES: nvptx64-nvidia-cuda
+
+#include "omp_dynamic_shared_memory_mixed.inc"
+// CHECK: PASS