[12/13] Fix parallel-dims.f90 for AMD GCN
diff mbox series

Message ID 292d1e6f61c251cf8b31320b6ad54c9a08e59748.1573849744.git.julian@codesourcery.com
State New
Headers show
Series
  • AMD GCN worker partitioning support
Related show

Commit Message

Julian Brown Nov. 15, 2019, 9:44 p.m. UTC
This patch provides AMD GCN support for the parallel-dims.f90 test's
parallel-dims-aux.c helper.

OK?

Thanks,

Julian

ChangeLog

	libgomp/
	* testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: Support AMD GCN.
---
 .../testsuite/libgomp.oacc-fortran/parallel-dims-aux.c   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims-aux.c b/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims-aux.c
index b5986f4afef..0778081860f 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims-aux.c
+++ b/libgomp/testsuite/libgomp.oacc-fortran/parallel-dims-aux.c
@@ -16,7 +16,8 @@ 
 {
   if (acc_on_device ((int) acc_device_host))
     return 0;
-  else if (acc_on_device ((int) acc_device_nvidia))
+  else if (acc_on_device ((int) acc_device_nvidia)
+	   || acc_on_device ((int) acc_device_gcn))
     return __builtin_goacc_parlevel_id (GOMP_DIM_GANG);
   else
     __builtin_abort ();
@@ -27,7 +28,8 @@ 
 {
   if (acc_on_device ((int) acc_device_host))
     return 0;
-  else if (acc_on_device ((int) acc_device_nvidia))
+  else if (acc_on_device ((int) acc_device_nvidia)
+	   || acc_on_device ((int) acc_device_gcn))
     return __builtin_goacc_parlevel_id (GOMP_DIM_WORKER);
   else
     __builtin_abort ();
@@ -38,7 +40,8 @@ 
 {
   if (acc_on_device ((int) acc_device_host))
     return 0;
-  else if (acc_on_device ((int) acc_device_nvidia))
+  else if (acc_on_device ((int) acc_device_nvidia)
+	   || acc_on_device ((int) acc_device_gcn))
     return __builtin_goacc_parlevel_id (GOMP_DIM_VECTOR);
   else
     __builtin_abort ();