Skip to content

Commit e5a3d5b

Browse files
committed
[OpenMP][NFC] Enable more runtime tests and also run them with O3
The test run fine on my AMD GPU machine, we should verify them on others too and put them into our regular testing. Not testing O1/2/3 is really bad and not testing all architecturs is similarly problematic. Differential Revision: https://reviews.llvm.org/D148576
1 parent 6368455 commit e5a3d5b

15 files changed

+49
-20
lines changed

openmp/libomptarget/test/api/omp_device_managed_memory_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda
2-
// REQUIRES: nvptx64-nvidia-cuda
1+
// RUN: %libomptarget-compile-run-and-check-generic
2+
// RUN: %libomptarget-compileopt-run-and-check-generic
33

44
#include <omp.h>
55
#include <stdio.h>

openmp/libomptarget/test/api/omp_dynamic_shared_memory.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
// RUN: %libomptarget-compile-nvptx64-nvidia-cuda
1+
// RUN: %libomptarget-compile-generic
22
// RUN: env LIBOMPTARGET_SHARED_MEMORY_SIZE=256 \
3-
// RUN: %libomptarget-run-nvptx64-nvidia-cuda | %fcheck-nvptx64-nvidia-cuda
4-
// REQUIRES: nvptx64-nvidia-cuda
3+
// RUN: %libomptarget-run-generic | %fcheck-generic
4+
5+
// RUN: %libomptarget-compileopt-generic
6+
// RUN: env LIBOMPTARGET_SHARED_MEMORY_SIZE=256 \
7+
// RUN: %libomptarget-run-generic | %fcheck-generic
8+
9+
// UNSUPPORTED: x86_64-pc-linux-gnu
10+
// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
511

612
#include <omp.h>
713
#include <stdio.h>

openmp/libomptarget/test/mapping/lambda_mapping.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// RUN: %libomptarget-compilexx-run-and-check-generic
2-
3-
// Error on the gpu that crashes the host
4-
// UNSUPPORTED: amdgcn-amd-amdhsa
1+
// On AMDGPU we don't have malloc support yet. We need optimizations
2+
// to avoid a thread state which requires malloc.
3+
//
4+
// XUN: %libomptarget-compilexx-run-and-check-generic
5+
// RUN: %libomptarget-compileoptxx-run-and-check-generic
56

67
#include <iostream>
78

openmp/libomptarget/test/offloading/assert.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %libomptarget-compilexx-nvptx64-nvidia-cuda && %libomptarget-run-fail-nvptx64-nvidia-cuda
2-
// REQUIRES: nvptx64-nvidia-cuda
1+
// RUN: %libomptarget-compilexx-generic && %libomptarget-run-fail-generic
2+
// RUN: %libomptarget-compileoptxx-generic && %libomptarget-run-fail-generic
33

44
int main(int argc, char *argv[]) {
55
#pragma omp target

openmp/libomptarget/test/offloading/barrier_fence.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %libomptarget-compile-generic -fopenmp-offload-mandatory -O3
22
// RUN: %libomptarget-run-generic
3+
// RUN: %libomptarget-compileopt-generic -fopenmp-offload-mandatory -O3
4+
// RUN: %libomptarget-run-generic
35

46
// UNSUPPORTED: aarch64-unknown-linux-gnu
57
// UNSUPPORTED: aarch64-unknown-linux-gnu-LTO

openmp/libomptarget/test/offloading/bug47654.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %libomptarget-compilexx-run-and-check-generic
2+
// RUN: %libomptarget-compileoptxx-run-and-check-generic
23

34
#include <cassert>
45
#include <iostream>

openmp/libomptarget/test/offloading/bug49021.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: %libomptarget-compilexx-generic -O3 && %libomptarget-run-generic
22
// RUN: %libomptarget-compilexx-generic -O3 -ffast-math && %libomptarget-run-generic
3+
// RUN: %libomptarget-compileoptxx-generic -O3 && %libomptarget-run-generic
4+
// RUN: %libomptarget-compileoptxx-generic -O3 -ffast-math && %libomptarget-run-generic
35

46
#include <iostream>
57

openmp/libomptarget/test/offloading/bug49334.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
// The test is disabled for now because of the flaky failure which can cause
2-
// Buildbot gives false negative results.
3-
4-
// RUN: nothing
5-
// REQUIRES: testToBeFixed
1+
// RUN: %libomptarget-compilexx-generic -O3 && %libomptarget-run-generic
2+
// RUN: %libomptarget-compilexx-generic -O3 -ffast-math && \
3+
// RUN: %libomptarget-run-generic
4+
// RUN: %libomptarget-compileoptxx-generic -O3 && %libomptarget-run-generic
5+
// RUN: %libomptarget-compileoptxx-generic -O3 -ffast-math && \
6+
// RUN: %libomptarget-run-generic
7+
8+
// UNSUPPORTED: x86_64-pc-linux-gnu
9+
// UNSUPPORTED: x86_64-pc-linux-gnu-LTO
610

711
#include <cassert>
812
#include <cmath>

openmp/libomptarget/test/offloading/bug49779.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// RUN: %libomptarget-compilexx-generic && \
22
// RUN: env LIBOMPTARGET_STACK_SIZE=2048 %libomptarget-run-generic
3+
// RUN: %libomptarget-compileoptxx-generic && \
4+
// RUN: env LIBOMPTARGET_STACK_SIZE=2048 %libomptarget-run-generic
35

6+
// We need malloc/global_alloc support
47
// UNSUPPORTED: amdgcn-amd-amdhsa
58

69
#include <cassert>

openmp/libomptarget/test/offloading/bug50022.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %libomptarget-compilexx-and-run-generic
2+
// RUN: %libomptarget-compileoptxx-and-run-generic
23

34
#include <cassert>
45
#include <iostream>

openmp/libomptarget/test/offloading/bug51982.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %libomptarget-compile-generic -O1 && %libomptarget-run-generic
22
// -O1 to run openmp-opt
3+
// RUN: %libomptarget-compileopt-generic -O1 && %libomptarget-run-generic
34

45
int main(void) {
56
long int aa = 0;

openmp/libomptarget/test/offloading/bug53727.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// RUN: %libomptarget-compilexx-and-run-generic
2+
// RUN: %libomptarget-compileoptxx-and-run-generic
23

34
#include <cassert>
45
#include <iostream>

openmp/libomptarget/test/offloading/d2d_memcpy.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
// RUN: %libomptarget-compile-generic && env OMP_MAX_ACTIVE_LEVELS=2 %libomptarget-run-generic | %fcheck-generic -allow-empty
1+
// RUN: %libomptarget-compile-generic && \
2+
// RUN: env OMP_MAX_ACTIVE_LEVELS=2 %libomptarget-run-generic | \
3+
// RUN: %fcheck-generic -allow-empty
4+
// RUN: %libomptarget-compileopt-generic && \
5+
// RUN: env OMP_MAX_ACTIVE_LEVELS=2 %libomptarget-run-generic | \
6+
// RUN: %fcheck-generic -allow-empty
27

38
#include <assert.h>
49
#include <omp.h>

openmp/libomptarget/test/offloading/dynamic_module.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// RUN: %libomptarget-compile-generic -DSHARED -fPIC -shared -o %t.so && %libomptarget-compile-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic
1+
// RUN: %libomptarget-compile-generic -DSHARED -fPIC -shared -o %t.so && \
2+
// RUN: %libomptarget-compile-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic
3+
// RUN: %libomptarget-compileopt-generic -DSHARED -fPIC -shared -o %t.so && \
4+
// RUN: %libomptarget-compileopt-generic %t.so && %libomptarget-run-generic 2>&1 | %fcheck-generic
25

36
#ifdef SHARED
47
void foo() {}

openmp/libomptarget/test/offloading/target_nowait_target.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %libomptarget-compilexx-and-run-generic
2-
3-
// UNSUPPORTED: amdgcn-amd-amdhsa
2+
// RUN: %libomptarget-compileoptxx-and-run-generic
43

54
#include <cassert>
65

0 commit comments

Comments
 (0)