From c175c07d905d3e7895451c17703f7d9b3efd0330 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 21 Jan 2023 19:54:35 -0800 Subject: [PATCH] [OpenMP][FIX] Split test into amdgpu and nvptx specific ones This avoids running the test for the host. --- ...c_shared_memory_mixed.c => omp_dynamic_shared_memory_mixed.inc} | 4 +--- .../libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c | 7 +++++++ .../libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.c | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) rename openmp/libomptarget/test/api/{omp_dynamic_shared_memory_mixed.c => omp_dynamic_shared_memory_mixed.inc} (91%) create mode 100644 openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_amdgpu.c create mode 100644 openmp/libomptarget/test/api/omp_dynamic_shared_memory_mixed_nvptx.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 0168361..16e0bec 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 #include @@ -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 0000000..656c3a2 --- /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 0000000..117809c --- /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 -- 2.7.4