[og10] openacc: Fix parallel-dims.c test

Message ID 20200730221054.85545-1-julian@codesourcery.com
State New
Headers show
Series
  • [og10] openacc: Fix parallel-dims.c test
Related show

Commit Message

Julian Brown July 30, 2020, 10:10 p.m.
This test appears to have been missed on the og10 branch when enabling
worker partitioning support for AMD GCN. It was still assuming num_workers
was fixed at 1.

Tested with offloading to AMD GCN. I will apply shortly.

Thanks,

Julian

2020-07-30  Julian Brown  <julian@codesourcery.com>

libgomp/
	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Fix for GCN
	num_workers > 1.
---
 libgomp/ChangeLog.omp                             |  5 +++++
 .../libgomp.oacc-c-c++-common/parallel-dims.c     | 15 ++++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)

-- 
2.23.0

Patch

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index db88fa64661b..e741121b234e 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,3 +1,8 @@ 
+2020-07-30  Julian Brown  <julian@codesourcery.com>
+
+	* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Fix for GCN
+	num_workers > 1.
+
 2020-07-17  Thomas Schwinge  <thomas@codesourcery.com>
 	    Kwok Cheung Yeung  <kcy@codesourcery.com>
 
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
index 71600e2386ed..511bedb9f81a 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/parallel-dims.c
@@ -288,9 +288,8 @@  int main ()
 	}
       else if (acc_on_device (acc_device_radeon))
 	{
-	  /* The GCC GCN back end is limited to num_workers (16).
-	     Temporarily set this to 1 until multiple workers are permitted. */
-	  workers_actual = 1; // 16;
+	  /* The GCC GCN back end is limited to num_workers (16).  */
+	  workers_actual = 16;
 	}
       else
 	__builtin_abort ();
@@ -491,8 +490,6 @@  int main ()
 	}
       else if (acc_on_device (acc_device_radeon))
 	{
-	  /* Temporary setting, until multiple workers are permitted.  */
-	  workers_actual = 1;
 	  /* See above comments about GCN vectors_actual.  */
 	  vectors_actual = 1;
 	}
@@ -618,10 +615,10 @@  int main ()
     gangs_max = workers_max = vectors_max = INT_MIN;
 #pragma acc serial copy (vectors_actual) \
   copy (gangs_min, gangs_max, workers_min, workers_max, vectors_min, vectors_max)
-  /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } 619 } */
-  /* { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } 619 } */
-  /* { dg-warning "region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } 619 } */
-  /* { dg-warning "region contains vector partitioned code but is not vector partitioned" "" { target *-*-* } 619 } */
+  /* { dg-warning "using vector_length \\(32\\), ignoring 1" "" { target openacc_nvidia_accel_selected } 616 } */
+  /* { dg-warning "region contains gang partitioned code but is not gang partitioned" "" { target *-*-* } 616 } */
+  /* { dg-warning "region contains worker partitioned code but is not worker partitioned" "" { target *-*-* } 616 } */
+  /* { dg-warning "region contains vector partitioned code but is not vector partitioned" "" { target *-*-* } 616 } */
     {
       if (acc_on_device (acc_device_nvidia))
 	{