public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1287] Add 'acc_device_radeon' testing to 'libgomp.oacc-*/acc_on_device-*'
@ 2021-06-08  9:30 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2021-06-08  9:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:97a040e987bfdc40d3bf442be74571a6819122cd

commit r12-1287-g97a040e987bfdc40d3bf442be74571a6819122cd
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Fri Jun 4 15:29:54 2021 +0200

    Add 'acc_device_radeon' testing to 'libgomp.oacc-*/acc_on_device-*'
    
            libgomp/
            * testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c: Add
            'acc_device_radeon' testing.
            * testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90: Likewise.
            * testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f: Likewise.
            * testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f: Likewise.

Diff:
---
 libgomp/testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c | 11 +++++++++++
 libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90  |  7 +++++++
 libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f    |  7 +++++++
 libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f    |  7 +++++++
 4 files changed, 32 insertions(+)

diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c
index 8112745bcb8..064c6f5f2d8 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c
@@ -19,6 +19,8 @@ main (int argc, char *argv[])
       abort ();
     if (acc_on_device (acc_device_nvidia))
       abort ();
+    if (acc_on_device (acc_device_radeon))
+      abort ();
   }
 
 
@@ -34,6 +36,8 @@ main (int argc, char *argv[])
       abort ();
     if (acc_on_device (acc_device_nvidia))
       abort ();
+    if (acc_on_device (acc_device_radeon))
+      abort ();
   }
 
 
@@ -55,6 +59,13 @@ main (int argc, char *argv[])
 #else
     if (acc_on_device (acc_device_nvidia))
       abort ();
+#endif
+#if ACC_DEVICE_TYPE_radeon
+    if (!acc_on_device (acc_device_radeon))
+      abort ();
+#else
+    if (acc_on_device (acc_device_radeon))
+      abort ();
 #endif
   }
 
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90
index ace935817dc..cd599e5d0e3 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90
@@ -21,6 +21,7 @@ if (.not. acc_on_device (acc_device_none)) STOP 1
 if (.not. acc_on_device (acc_device_host)) STOP 2
 if (acc_on_device (acc_device_not_host)) STOP 3
 if (acc_on_device (acc_device_nvidia)) STOP 4
+if (acc_on_device (acc_device_radeon)) STOP 4
 
 
 ! Host via offloading fallback mode.
@@ -32,6 +33,7 @@ if (.not. acc_on_device (acc_device_none)) STOP 5
 if (.not. acc_on_device (acc_device_host)) STOP 6
 if (acc_on_device (acc_device_not_host)) STOP 7
 if (acc_on_device (acc_device_nvidia)) STOP 8
+if (acc_on_device (acc_device_radeon)) STOP 8
 !$acc end parallel
 
 
@@ -49,6 +51,11 @@ if (.not. acc_on_device (acc_device_nvidia)) STOP 12
 #else
 if (acc_on_device (acc_device_nvidia)) STOP 13
 #endif
+#if ACC_DEVICE_TYPE_radeon
+if (.not. acc_on_device (acc_device_radeon)) STOP 14
+#else
+if (acc_on_device (acc_device_radeon)) STOP 15
+#endif
 !$acc end parallel
 
 #endif
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f
index 56270b12970..eb3daba0188 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f
+++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f
@@ -21,6 +21,7 @@
       IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 2
       IF (ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 3
       IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 4
+      IF (ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 4
 
 
 !Host via offloading fallback mode.
@@ -32,6 +33,7 @@
       IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 6
       IF (ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 7
       IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 8
+      IF (ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 8
 !$ACC END PARALLEL
 
 
@@ -49,6 +51,11 @@
 #else
       IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 13
 #endif
+#if ACC_DEVICE_TYPE_radeon
+      IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 14
+#else
+      IF (ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 15
+#endif
 !$ACC END PARALLEL
 
 #endif
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f
index a8b9cddd1ae..5f500c19481 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f
+++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f
@@ -21,6 +21,7 @@
       IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 2
       IF (ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 3
       IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 4
+      IF (ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 4
 
 
 !Host via offloading fallback mode.
@@ -32,6 +33,7 @@
       IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_HOST)) STOP 6
       IF (ACC_ON_DEVICE (ACC_DEVICE_NOT_HOST)) STOP 7
       IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 8
+      IF (ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 8
 !$ACC END PARALLEL
 
 
@@ -49,6 +51,11 @@
 #else
       IF (ACC_ON_DEVICE (ACC_DEVICE_NVIDIA)) STOP 13
 #endif
+#if ACC_DEVICE_TYPE_radeon
+      IF (.NOT. ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 14
+#else
+      IF (ACC_ON_DEVICE (ACC_DEVICE_RADEON)) STOP 15
+#endif
 !$ACC END PARALLEL
 
 #endif


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-08  9:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08  9:30 [gcc r12-1287] Add 'acc_device_radeon' testing to 'libgomp.oacc-*/acc_on_device-*' Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).