From a10577582585850c88b77dbc492eb046c05e79ce Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Sat, 12 Jan 2019 22:19:02 +0000 Subject: [PATCH] [nvptx] Add vector_length 64 test-cases Add some test-cases using vector_length 64. 2019-01-12 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c: New test. From-SVN: r267895 --- libgomp/ChangeLog | 6 ++++++ .../vector-length-64-1.c | 17 +++++++++++++++ .../vector-length-64-2.c | 21 +++++++++++++++++++ .../vector-length-64-3.c | 17 +++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index e6b14609171..fc1fb2a967d 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,9 @@ +2019-01-12 Tom de Vries + + * testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c: New test. + * testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c: New test. + * testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c: New test. + 2019-01-12 Tom de Vries PR target/85486 diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c new file mode 100644 index 00000000000..b6ee732f863 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c @@ -0,0 +1,17 @@ +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (64) num_workers (16) /* { dg-warning "using num_workers \\(15\\), ignoring 16" "" { target openacc_nvidia_accel_configured } } */ + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +} diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c new file mode 100644 index 00000000000..4dfbae8de91 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c @@ -0,0 +1,21 @@ +/* { dg-set-target-env-var "GOMP_OPENACC_DIM" ":16:" } */ +/* { dg-shouldfail "" { openacc_nvidia_accel_selected } } */ + +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (64) + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +} +/* { dg-output "The Nvidia accelerator has insufficient barrier resources" { target openacc_nvidia_accel_selected } } */ diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c new file mode 100644 index 00000000000..1acb40e8357 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c @@ -0,0 +1,17 @@ +#include +#include + +int +main (void) +{ +#pragma acc parallel vector_length (64) + { +#pragma acc loop worker + for (unsigned int i = 0; i < 32; i++) +#pragma acc loop vector + for (unsigned int j = 0; j < 64; j++) + ; + } + + return 0; +}