]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add 'acc_device_radeon' testing to 'libgomp.oacc-*/acc_on_device-*'
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 4 Jun 2021 13:29:54 +0000 (15:29 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 8 Jun 2021 09:28:53 +0000 (11:28 +0200)
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.

libgomp/testsuite/libgomp.oacc-c-c++-common/acc_on_device-1.c
libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-1.f90
libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-2.f
libgomp/testsuite/libgomp.oacc-fortran/acc_on_device-1-3.f

index 8112745bcb86077c17e5259963aec6957d8ee479..064c6f5f2d83af7a090efe9a29f17ed1d278ac65 100644 (file)
@@ -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
   }
 
index ace935817dcc5e3221b6547b1c879c1be75444a9..cd599e5d0e3ac9945b342f0239f62f8454cad7a4 100644 (file)
@@ -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
index 56270b129702d32f6638fa801cb9925b75d80ba9..eb3daba0188559da2c8201ef91fee9a589dd8edd 100644 (file)
@@ -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
 
 
 #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
index a8b9cddd1ae10093cb26cd7e09b558264e7c5555..5f500c19481330ffebf74a24538de9c904054687 100644 (file)
@@ -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
 
 
 #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