Hi Thomas,
On 1/30/20 4:54 PM, Thomas Schwinge wrote:
That's still pending. Recently,<https://github.com/OpenACC/openacc-spec/issues/256>
"Missing definition
for acc_device_current" got filed; let's (also/first) watch/wait what
comes out of that.
(Still pending.)
Please review the attached (Tobias the Fortran test cases, please),
and test with AMD GCN offloading. If approving this patch, please respond with
"Reviewed-by: NAME <EMAIL>" so that your effort will be recorded in the
commit log, see<https://gcc.gnu.org/wiki/Reviewed-by>.
LGTM with the minor nit regarding the integer kind used
for dev_type (default/unspecified vs. "acc_device_kind").
To make you happy:
Reviewed-by: Tobias Burnus <tob...@codesourcery.com>
Thanks,
Tobias
--- a/libgomp/openacc.f90
+++ b/libgomp/openacc.f90
@@ -766,6 +766,7 @@ module openacc
! From openacc_kinds
public :: acc_device_kind
+ public :: acc_device_current
Good catch!
+++ b/libgomp/testsuite/libgomp.oacc-fortran/acc_get_property-aux.f90
…
+ subroutine expect_device_memory_properties (dev_type, dev_num, &
+ expected_total_memory)
+ integer, intent(in) :: dev_type
I think you should use (w/ or w/o "value" attribute)
integer (acc_device_kind) :: dev_type
instead for consistency. It does not matter in practice but is nicer.
+ expected_vendor, expected_name, expected_driver)
+ integer, intent(in) :: dev_type
+ integer, intent(in) :: dev_num
+ character*(*), intent(in) :: expected_vendor
Likewise for dev_num.
(Side note: I personally prefer "character(*)" or (even better:)
"character(len=*)"
to the "character*…" syntax – as I find it more readable. But that your syntax
is
not even marked as obsolescent and, hence, is perfectly valid.)
+ integer, intent(in) :: dev_num
Ditto.