diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2021-04-07 10:36:36 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2021-04-15 11:13:27 +0200 |
commit | 4dd9e1c541e0eb921d62c8652c854b1259e56aac (patch) | |
tree | 757f5ea6dac106c87ec883ac2e0ab3aee6923c0d | |
parent | 39d23b7960e4efb11bbe1eff056ae9da0884c539 (diff) | |
download | gcc-4dd9e1c541e0eb921d62c8652c854b1259e56aac.zip gcc-4dd9e1c541e0eb921d62c8652c854b1259e56aac.tar.gz gcc-4dd9e1c541e0eb921d62c8652c854b1259e56aac.tar.bz2 |
XFAIL OpenMP/nvptx execution-time hangs for simple nested OpenMP 'target'/'parallel'/'task' constructs [PR99555]
... still awaiting proper resolution, of course.
libgomp/
PR target/99555
* testsuite/lib/libgomp.exp
(check_effective_target_offload_device_nvptx): New.
* testsuite/libgomp.c/pr99555-1.c <nvptx offload device>: Until
resolved, make sure that we exit quickly, with error status,
XFAILed.
* testsuite/libgomp.c-c++-common/task-detach-6.c: Likewise.
* testsuite/libgomp.fortran/task-detach-6.f90: Likewise.
-rw-r--r-- | libgomp/testsuite/lib/libgomp.exp | 12 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr99555-1.c | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.fortran/task-detach-6.f90 | 3 |
4 files changed, 22 insertions, 3 deletions
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index 72d0011..14dcfdf 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -401,6 +401,18 @@ proc check_effective_target_offload_device_shared_as { } { } ] } +# Return 1 if using nvptx offload device. +proc check_effective_target_offload_device_nvptx { } { + return [check_runtime_nocache offload_device_nvptx { + #include <omp.h> + #include "testsuite/libgomp.c-c++-common/on_device_arch.h" + int main () + { + return !on_device_arch_nvptx (); + } + } ] +} + # Return 1 if at least one Nvidia GPU is accessible. proc check_effective_target_openacc_nvidia_accel_present { } { diff --git a/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c b/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c index 119d7f5..f18b57b 100644 --- a/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c +++ b/libgomp/testsuite/libgomp.c-c++-common/task-detach-6.c @@ -2,6 +2,8 @@ #include <omp.h> #include <assert.h> +#include <unistd.h> // For 'alarm'. + #include "on_device_arch.h" /* Test tasks with detach clause on an offload device. Each device @@ -12,7 +14,8 @@ int main (void) { //TODO See '../libgomp.c/pr99555-1.c'. if (on_device_arch_nvptx ()) - __builtin_abort (); //TODO Until resolved, skip, with error status. + alarm (4); /*TODO Until resolved, make sure that we exit quickly, with error status. + { dg-xfail-run-if "PR99555" { offload_device_nvptx } } */ int x = 0, y = 0, z = 0; int thread_count; diff --git a/libgomp/testsuite/libgomp.c/pr99555-1.c b/libgomp/testsuite/libgomp.c/pr99555-1.c index 0dc17bf..bd33b93 100644 --- a/libgomp/testsuite/libgomp.c/pr99555-1.c +++ b/libgomp/testsuite/libgomp.c/pr99555-1.c @@ -2,12 +2,15 @@ // { dg-additional-options "-O0" } +#include <unistd.h> // For 'alarm'. + #include "../libgomp.c-c++-common/on_device_arch.h" int main (void) { if (on_device_arch_nvptx ()) - __builtin_abort (); //TODO Until resolved, skip, with error status. + alarm (4); /*TODO Until resolved, make sure that we exit quickly, with error status. + { dg-xfail-run-if "PR99555" { offload_device_nvptx } } */ #pragma omp target #pragma omp parallel // num_threads(1) diff --git a/libgomp/testsuite/libgomp.fortran/task-detach-6.f90 b/libgomp/testsuite/libgomp.fortran/task-detach-6.f90 index bd0beb6..e4373b4 100644 --- a/libgomp/testsuite/libgomp.fortran/task-detach-6.f90 +++ b/libgomp/testsuite/libgomp.fortran/task-detach-6.f90 @@ -21,7 +21,8 @@ program task_detach_6 !TODO See '../libgomp.c/pr99555-1.c'. if (on_device_arch_nvptx () /= 0) then - error stop !TODO Until resolved, skip, with error status. + call alarm (4, 0); !TODO Until resolved, make sure that we exit quickly, with error status. + ! { dg-xfail-run-if "PR99555" { offload_device_nvptx } } end if !$omp target map (tofrom: x, y, z) map (from: thread_count) |