[Openmp-commits] [openmp] c175c07 - [OpenMP][FIX] Split test into amdgpu and nvptx specific ones
Johannes Doerfert via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jan 21 20:12:50 PST 2023
Author: Johannes Doerfert
Date: 2023-01-21T20:12:04-08:00
New Revision: c175c07d905d3e7895451c17703f7d9b3efd0330
URL: https://github.com/llvm/llvm-project/commit/c175c07d905d3e7895451c17703f7d9b3efd0330
DIFF: https://github.com/llvm/llvm-project/commit/c175c07d905d3e7895451c17703f7d9b3efd0330.diff
LOG: [OpenMP][FIX] Split test into amdgpu and nvptx specific ones
This avoids running the test for the host.
Added:
openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.inc
openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c
openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.c
Modified:
Removed:
openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.c
################################################################################
diff --git a/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.c b/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.inc
similarity index 91%
rename from openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.c
rename to openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.inc
index 0168361fa112..16e0becd093e 100644
--- a/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.c
+++ b/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed.inc
@@ -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
index 000000000000..656c3a20aaf8
--- /dev/null
+++ b/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c
@@ -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
index 000000000000..117809c36c7d
--- /dev/null
+++ b/openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.c
@@ -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
More information about the Openmp-commits
mailing list