Add generic support for the OpenACC 2.6 `acc_get_property' and `acc_get_property_string' routines, as well as full handlers for the host and the NVPTX offload targets and minimal handlers for the HSA, Intel MIC, and AMD GCN offload targets. Included are C/C++ and Fortran tests that, in particular, print the property values for acc_property_vendor, acc_property_memory, acc_property_free_memory, acc_property_name, and acc_property_driver. The output looks as follows: Vendor: GNU Name: GOMP Total memory: 0 Free memory: 0 Driver: 1.0 with the host driver (where the memory related properties are not supported for the host device and yield 0, conforming to the standard) and output like: Vendor: Nvidia Total memory: 12651462656 Free memory: 12202737664 Name: TITAN V Driver: CUDA Driver 9.1 with the NVPTX driver. 2019-12-22 Maciej W. Rozycki <macro@codesourcery.com> Frederik Harwath <frederik@codesourcery.com> Thomas Schwinge <tschwinge@codesourcery.com> include/ * gomp-constants.h (gomp_device_property): New enum. libgomp/ * libgomp.h (gomp_device_descr): Add `get_property_func' member. * libgomp-plugin.h (gomp_device_property_value): New union. (gomp_device_property_value): New prototype. * openacc.h (acc_device_t): Add `acc_device_current' enumeration constant. (acc_device_property_t): New enum. (acc_get_property, acc_get_property_string): New prototypes. * oacc-init.c (acc_get_device_type): Also assert that result is not `acc_device_current'. (get_property_any, acc_get_property, acc_get_property_string): New functions. * openacc.f90 (openacc_kinds): Add `acc_device_current' and `acc_property_memory', `acc_property_free_memory', `acc_property_name', `acc_property_vendor' and `acc_property_driver' constants. Add `acc_device_property' data type. (openacc_internal): Add `acc_get_property' and `acc_get_property_string' interfaces. Add `acc_get_property_h', `acc_get_property_string_h', `acc_get_property_l' and `acc_get_property_string_l'. * oacc-host.c (host_get_property): New function. (host_dispatch): Wire it. * target.c (gomp_load_plugin_for_device): Handle `get_property'. * libgomp.map (OACC_2.6): Add `acc_get_property', `acc_get_property_h_', `acc_get_property_string' and `acc_get_property_string_h_' symbols. * libgomp.texi (OpenACC Runtime Library Routines): Add `acc_get_property'. (acc_get_property): New node. * plugin/plugin-gcn.c (GOMP_OFFLOAD_get_property): New function (stub). * plugin/plugin-hsa.c (GOMP_OFFLOAD_get_property): New function. * plugin/plugin-nvptx.c (CUDA_CALLS): Add `cuDeviceGetName', `cuDeviceTotalMem', `cuDriverGetVersion' and `cuMemGetInfo' calls. (GOMP_OFFLOAD_get_property): New function. (struct ptx_device): Add new field "name". (cuda_driver_version_s): Add new static variable ... (nvptx_init): ... and init from here. * testsuite/libgomp.oacc-c-c++-common/acc_get_property.c: New test. * testsuite/libgomp.oacc-c-c++-common/acc_get_property-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/acc_get_property-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c: New file with test helper functions. * testsuite/libgomp.oacc-fortran/acc_get_property.f90: New test. liboffloadmic/ * plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_get_property): New function. Reviewed-by: Thomas Schwinge <thomas@codesourcery.com> Co-Authored-By: Frederik Harwath <frederik@codesourcery.com> Co-Authored-By: Thomas Schwinge <tschwinge@codesourcery.com> From-SVN: r279710
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| abort-1.f90 | Loading commit data... | |
| abort-2.f90 | Loading commit data... | |
| acc_get_property.f90 | Loading commit data... | |
| acc_on_device-1-1.f90 | Loading commit data... | |
| acc_on_device-1-2.f | Loading commit data... | |
| acc_on_device-1-3.f | Loading commit data... | |
| allocatable-1-1.f90 | Loading commit data... | |
| allocatable-1-2.f90 | Loading commit data... | |
| allocatable-array-1.f90 | Loading commit data... | |
| asyncwait-1.f90 | Loading commit data... | |
| asyncwait-2.f90 | Loading commit data... | |
| asyncwait-3.f90 | Loading commit data... | |
| atomic_capture-1.f90 | Loading commit data... | |
| atomic_rw-1.f90 | Loading commit data... | |
| atomic_update-1.f90 | Loading commit data... | |
| cache-1.f95 | Loading commit data... | |
| class-ptr-param.f95 | Loading commit data... | |
| classtypes-1.f95 | Loading commit data... | |
| classtypes-2.f95 | Loading commit data... | |
| clauses-1.f90 | Loading commit data... | |
| collapse-1.f90 | Loading commit data... | |
| collapse-2.f90 | Loading commit data... | |
| collapse-3.f90 | Loading commit data... | |
| collapse-4.f90 | Loading commit data... | |
| collapse-5.f90 | Loading commit data... | |
| collapse-6.f90 | Loading commit data... | |
| collapse-7.f90 | Loading commit data... | |
| collapse-8.f90 | Loading commit data... | |
| combined-directives-1.f90 | Loading commit data... | |
| combined-reduction.f90 | Loading commit data... | |
| common-block-1.f90 | Loading commit data... | |
| common-block-2.f90 | Loading commit data... | |
| common-block-3.f90 | Loading commit data... | |
| cublas-fixed.h | Loading commit data... | |
| data-1.f90 | Loading commit data... | |
| data-2.f90 | Loading commit data... | |
| data-3.f90 | Loading commit data... | |
| data-4-2.f90 | Loading commit data... | |
| data-4.f90 | Loading commit data... | |
| data-5.f90 | Loading commit data... | |
| declare-1.f90 | Loading commit data... | |
| declare-2.f90 | Loading commit data... | |
| declare-3.f90 | Loading commit data... | |
| declare-4.f90 | Loading commit data... | |
| declare-5.f90 | Loading commit data... | |
| deep-copy-1.f90 | Loading commit data... | |
| deep-copy-2.f90 | Loading commit data... | |
| deep-copy-3.f90 | Loading commit data... | |
| deep-copy-4.f90 | Loading commit data... | |
| deep-copy-5.f90 | Loading commit data... | |
| deep-copy-6.f90 | Loading commit data... | |
| deep-copy-7.f90 | Loading commit data... | |
| deep-copy-8.f90 | Loading commit data... | |
| default-1.f90 | Loading commit data... | |
| derived-type-1.f90 | Loading commit data... | |
| derivedtype-1.f95 | Loading commit data... | |
| derivedtype-2.f95 | Loading commit data... | |
| dummy-array.f90 | Loading commit data... | |
| error_stop-1.f | Loading commit data... | |
| error_stop-2.f | Loading commit data... | |
| error_stop-3.f | Loading commit data... | |
| firstprivate-1.f90 | Loading commit data... | |
| fortran.exp | Loading commit data... | |
| gang-static-1.f90 | Loading commit data... | |
| gemm-2.f90 | Loading commit data... | |
| gemm.f90 | Loading commit data... | |
| host_data-1.f90 | Loading commit data... | |
| host_data-2.f90 | Loading commit data... | |
| host_data-3.f | Loading commit data... | |
| host_data-4.f90 | Loading commit data... | |
| if-1.f90 | Loading commit data... | |
| implicit-firstprivate-ref.f90 | Loading commit data... | |
| kernels-acc-loop-reduction-2.f90 | Loading commit data... | |
| kernels-acc-loop-reduction.f90 | Loading commit data... | |
| kernels-collapse-3.f90 | Loading commit data... | |
| kernels-collapse-4.f90 | Loading commit data... | |
| kernels-independent.f90 | Loading commit data... | |
| kernels-loop-1.f90 | Loading commit data... | |
| kernels-loop-2.f95 | Loading commit data... | |
| kernels-loop-data-2.f95 | Loading commit data... | |
| kernels-loop-data-enter-exit-2.f95 | Loading commit data... | |
| kernels-loop-data-enter-exit.f95 | Loading commit data... | |
| kernels-loop-data-update.f95 | Loading commit data... | |
| kernels-loop-data.f95 | Loading commit data... | |
| kernels-loop.f95 | Loading commit data... | |
| kernels-map-1.f90 | Loading commit data... | |
| kernels-parallel-loop-data-enter-exit.f95 | Loading commit data... | |
| kernels-private-vars-loop-gang-1.f90 | Loading commit data... | |
| kernels-private-vars-loop-gang-2.f90 | Loading commit data... | |
| kernels-private-vars-loop-gang-3.f90 | Loading commit data... | |
| kernels-private-vars-loop-gang-6.f90 | Loading commit data... | |
| kernels-private-vars-loop-vector-1.f90 | Loading commit data... | |
| kernels-private-vars-loop-vector-2.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-1.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-2.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-3.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-4.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-5.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-6.f90 | Loading commit data... | |
| kernels-private-vars-loop-worker-7.f90 | Loading commit data... | |
| kernels-reduction-1.f90 | Loading commit data... | |
| lib-1.f90 | Loading commit data... | |
| lib-10.f90 | Loading commit data... | |
| lib-12.f90 | Loading commit data... | |
| lib-13.f90 | Loading commit data... | |
| lib-14.f90 | Loading commit data... | |
| lib-15.f90 | Loading commit data... | |
| lib-16-2.f90 | Loading commit data... | |
| lib-16.f90 | Loading commit data... | |
| lib-2.f | Loading commit data... | |
| lib-3.f | Loading commit data... | |
| lib-32-1.f | Loading commit data... | |
| lib-32-2.f | Loading commit data... | |
| lib-4.f90 | Loading commit data... | |
| lib-5.f90 | Loading commit data... | |
| lib-6.f90 | Loading commit data... | |
| lib-7.f90 | Loading commit data... | |
| lib-8.f90 | Loading commit data... | |
| map-1.f90 | Loading commit data... | |
| multidim-slice.f95 | Loading commit data... | |
| nested-function-1.f90 | Loading commit data... | |
| nested-function-2.f90 | Loading commit data... | |
| nested-function-3.f90 | Loading commit data... | |
| no_create-1.f90 | Loading commit data... | |
| no_create-2.f90 | Loading commit data... | |
| no_create-3.F90 | Loading commit data... | |
| non-scalar-data.f90 | Loading commit data... | |
| openacc_version-1.f | Loading commit data... | |
| openacc_version-2.f90 | Loading commit data... | |
| optional-cache.f95 | Loading commit data... | |
| optional-data-copyin-by-value.f90 | Loading commit data... | |
| optional-data-copyin.f90 | Loading commit data... | |
| optional-data-copyout.f90 | Loading commit data... | |
| optional-data-enter-exit.f90 | Loading commit data... | |
| optional-declare.f90 | Loading commit data... | |
| optional-firstprivate.f90 | Loading commit data... | |
| optional-host_data.f90 | Loading commit data... | |
| optional-nested-calls.f90 | Loading commit data... | |
| optional-private.f90 | Loading commit data... | |
| optional-reduction.f90 | Loading commit data... | |
| optional-update-device.f90 | Loading commit data... | |
| optional-update-host.f90 | Loading commit data... | |
| par-reduction-2-1.f | Loading commit data... | |
| par-reduction-2-2.f | Loading commit data... | |
| parallel-dims-aux.c | Loading commit data... | |
| parallel-dims.f90 | Loading commit data... | |
| parallel-loop-1.f90 | Loading commit data... | |
| parallel-reduction.f90 | Loading commit data... | |
| pointer-align-1.f90 | Loading commit data... | |
| pr68813.f90 | Loading commit data... | |
| pr70289.f90 | Loading commit data... | |
| pr70643.f90 | Loading commit data... | |
| pr81352.f90 | Loading commit data... | |
| pr83920.f90 | Loading commit data... | |
| pr84028.f90 | Loading commit data... | |
| pr84955.f90 | Loading commit data... | |
| print-1-nvptx.f90 | Loading commit data... | |
| print-1.f90 | Loading commit data... | |
| private-variables.f90 | Loading commit data... | |
| pset-1.f90 | Loading commit data... | |
| reduction-1.f90 | Loading commit data... | |
| reduction-2.f90 | Loading commit data... | |
| reduction-3.f90 | Loading commit data... | |
| reduction-4.f90 | Loading commit data... | |
| reduction-5.f90 | Loading commit data... | |
| reduction-6.f90 | Loading commit data... | |
| reduction-7.f90 | Loading commit data... | |
| reduction-8.f90 | Loading commit data... | |
| reference-reductions.f90 | Loading commit data... | |
| routine-1.f90 | Loading commit data... | |
| routine-2.f90 | Loading commit data... | |
| routine-3.f90 | Loading commit data... | |
| routine-4.f90 | Loading commit data... | |
| routine-5.f90 | Loading commit data... | |
| routine-7.f90 | Loading commit data... | |
| routine-9.f90 | Loading commit data... | |
| stop-1.f | Loading commit data... | |
| stop-2.f | Loading commit data... | |
| stop-3.f | Loading commit data... | |
| subarrays-1.f90 | Loading commit data... | |
| subarrays-2.f90 | Loading commit data... | |
| update-1.f90 | Loading commit data... | |
| update-2.f90 | Loading commit data... | |
| vector-routine.f90 | Loading commit data... |