diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2021-06-04 15:29:54 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2021-06-08 11:28:53 +0200 |
commit | 97a040e987bfdc40d3bf442be74571a6819122cd (patch) | |
tree | d40081b78078ad9de2e5074e5dc3172c723a7631 | |
parent | 89c1a427a1cfdb38e4b2354eeb1e28e0042af54c (diff) | |
download | gcc-97a040e987bfdc40d3bf442be74571a6819122cd.zip gcc-97a040e987bfdc40d3bf442be74571a6819122cd.tar.gz gcc-97a040e987bfdc40d3bf442be74571a6819122cd.tar.bz2 |
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.
4 files changed, 32 insertions, 0 deletions
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 8112745..064c6f5 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 (); } @@ -56,6 +60,13 @@ main (int argc, char *argv[]) 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 } #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 ace9358..cd599e5 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 56270b1..eb3daba 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 a8b9cdd..5f500c1 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 |