From: Thomas Schwinge Date: Fri, 4 Jun 2021 13:29:54 +0000 (+0200) Subject: Add 'acc_device_radeon' testing to 'libgomp.oacc-*/acc_on_device-*' X-Git-Tag: basepoints/gcc-13~7026 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97a040e987bfdc40d3bf442be74571a6819122cd;p=thirdparty%2Fgcc.git 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 --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 8112745bcb86..064c6f5f2d83 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 ace935817dcc..cd599e5d0e3a 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 56270b129702..eb3daba01885 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 a8b9cddd1ae1..5f500c194813 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