gcc/libgomp/plugin
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
..
cuda [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-08-13 12:04:24 +00:00
configfrag.ac [libgomp, nvptx, --without-cuda-driver] Don't use system cuda driver 2018-08-04 20:07:22 +00:00
cuda-lib.def [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-08-13 12:04:24 +00:00
hsa_ext_finalize.h Update copyright years. 2018-01-03 11:03:58 +01:00
Makefrag.am Update copyright years. 2018-01-03 11:03:58 +01:00
plugin-hsa.c Update copyright years. 2018-01-03 11:03:58 +01:00
plugin-nvptx.c [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-08-13 12:04:24 +00:00