gcc/libgomp
Cesar Philippidis bd9b3d3d1a [nvptx] Use CUDA driver API to select default runtime launch geometry
The CUDA driver API starting version 6.5 offers a set of runtime functions to
calculate several occupancy-related measures, as a replacement for the occupancy
calculator spreadsheet.

This patch adds a heuristic for default runtime launch geometry, based on the
new runtime function cuOccupancyMaxPotentialBlockSize.

Build on x86_64 with nvptx accelerator and ran libgomp testsuite.

2018-08-13  Cesar Philippidis  <cesar@codesourcery.com>
	    Tom de Vries  <tdevries@suse.de>

	PR target/85590
	* plugin/cuda/cuda.h (CUoccupancyB2DSize): New typedef.
	(cuOccupancyMaxPotentialBlockSize): Declare.
	* plugin/cuda-lib.def (cuOccupancyMaxPotentialBlockSize): New
	CUDA_ONE_CALL_MAYBE_NULL.
	* plugin/plugin-nvptx.c (CUDA_VERSION < 6050): Define
	CUoccupancyB2DSize and declare
	cuOccupancyMaxPotentialBlockSize.
	(nvptx_exec): Use cuOccupancyMaxPotentialBlockSize to set the
	default num_gangs and num_workers when the driver supports it.

Co-Authored-By: Tom de Vries <tdevries@suse.de>

From-SVN: r263505
2018-08-13 12:04:24 +00:00
..
config [libgomp] Truncate config/nvptx/oacc-parallel.c 2018-08-01 13:01:45 -07:00
plugin [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-08-13 12:04:24 +00:00
testsuite [nvptx] Ignore c++ exceptions 2018-08-02 15:59:01 +00:00
ChangeLog [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-08-13 12:04:24 +00:00
ChangeLog.graphite
Makefile.am re PR other/79046 (g++ -print-file-name=plugin uses full version number in path) 2017-01-17 10:38:48 +01:00
Makefile.in re PR fortran/84381 (replace non-std 'call abort' by 'stop 1' in gfortran testsuite) 2018-03-25 16:00:52 +00:00
acinclude.m4 Enable building libgomp with Intel CET 2017-11-17 22:22:09 +01:00
aclocal.m4 libgomp: regenerate with automake-1.11.6 2016-11-30 21:05:33 +03:00
affinity.c Update copyright years. 2018-01-03 11:03:58 +01:00
alloc.c Update copyright years. 2018-01-03 11:03:58 +01:00
atomic.c Update copyright years. 2018-01-03 11:03:58 +01:00
barrier.c Update copyright years. 2018-01-03 11:03:58 +01:00
config.h.in configfrag.ac: For --without-cuda-driver don't initialize CUDA_DRIVER_INCLUDE nor CUDA_DRIVER_LIB. 2017-01-17 10:44:17 +01:00
configure [libgomp, nvptx, --without-cuda-driver] Don't use system cuda driver 2018-08-04 20:07:22 +00:00
configure.ac Enable building libgomp with Intel CET 2017-11-17 22:22:09 +01:00
configure.tgt re PR bootstrap/80531 (RC1 bootstrap comparison failure) 2017-04-27 22:03:01 +02:00
critical.c Update copyright years. 2018-01-03 11:03:58 +01:00
env.c [openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin 2018-05-02 17:53:56 +00:00
error.c Update copyright years. 2018-01-03 11:03:58 +01:00
fortran.c Update copyright years. 2018-01-03 11:03:58 +01:00
hashtab.h Update copyright years. 2018-01-03 11:03:58 +01:00
icv-device.c Update copyright years. 2018-01-03 11:03:58 +01:00
icv.c Update copyright years. 2018-01-03 11:03:58 +01:00
iter.c Update copyright years. 2018-01-03 11:03:58 +01:00
iter_ull.c Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp-plugin.c Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp-plugin.h Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp.h Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
libgomp.map Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
libgomp.spec.in
libgomp.texi libgomp.texi (Top): Move www.openmp.org to https. 2018-06-24 20:38:14 +00:00
libgomp_f.h.in Update copyright years. 2018-01-03 11:03:58 +01:00
libgomp_g.h Update copyright years. 2018-01-03 11:03:58 +01:00
lock.c Update copyright years. 2018-01-03 11:03:58 +01:00
loop.c Update copyright years. 2018-01-03 11:03:58 +01:00
loop_ull.c Update copyright years. 2018-01-03 11:03:58 +01:00
oacc-async.c [openacc] Factor out async argument utility functions 2018-05-09 13:52:49 +00:00
oacc-cuda.c [openacc] Factor out async argument utility functions 2018-05-09 13:52:49 +00:00
oacc-host.c Update copyright years. 2018-01-03 11:03:58 +01:00
oacc-init.c Update copyright years. 2018-01-03 11:03:58 +01:00
oacc-int.h [openacc] Factor out async argument utility functions 2018-05-09 13:52:49 +00:00
oacc-mem.c Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
oacc-parallel.c Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
oacc-plugin.c [openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin 2018-05-02 17:53:56 +00:00
oacc-plugin.h [openacc] Move GOMP_OPENACC_DIM parsing out of nvptx plugin 2018-05-02 17:53:56 +00:00
omp.h.in re PR libgomp/84096 (Wrong prototype for omp_init_nest_lock_with_hint() in "omp.h.in") 2018-01-30 00:38:01 +01:00
omp_lib.f90.in Update copyright years. 2018-01-03 11:03:58 +01:00
omp_lib.h.in Update copyright years. 2018-01-03 11:03:58 +01:00
openacc.f90 Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
openacc.h Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
openacc_lib.h Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
ordered.c Update copyright years. 2018-01-03 11:03:58 +01:00
parallel.c Update copyright years. 2018-01-03 11:03:58 +01:00
priority_queue.c Update copyright years. 2018-01-03 11:03:58 +01:00
priority_queue.h Update copyright years. 2018-01-03 11:03:58 +01:00
sections.c Update copyright years. 2018-01-03 11:03:58 +01:00
secure_getenv.h Update copyright years. 2018-01-03 11:03:58 +01:00
single.c Update copyright years. 2018-01-03 11:03:58 +01:00
splay-tree.c Update copyright years. 2018-01-03 11:03:58 +01:00
splay-tree.h Update copyright years. 2018-01-03 11:03:58 +01:00
target.c Update OpenACC data clause semantics to the 2.5 behavior 2018-06-20 09:35:15 -07:00
task.c Update copyright years. 2018-01-03 11:03:58 +01:00
taskloop.c Update copyright years. 2018-01-03 11:03:58 +01:00
team.c Update copyright years. 2018-01-03 11:03:58 +01:00
work.c Update copyright years. 2018-01-03 11:03:58 +01:00