Commit 5d17a476 by Tom de Vries Committed by Tom de Vries

[nvptx] Add PTX_WARP_SIZE

Add PTX_WARP_SIZE constant and use it in nvptx_simt_vf.  The function
nvptx_simt_vf is used for OpenMP, and using PTX_WARP_SIZE here decouples the
OpenMP support from the PTX_VECTOR_LENGTH constant used in OpenACC support.

Build and reg-tested on x86_64 with nvptx accelerator.

2018-12-17  Tom de Vries  <tdevries@suse.de>

	* config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
	(nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.

From-SVN: r267215
parent 7820b298
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
(nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_single): Fix whitespace.
(nvptx_neuter_pars): Likewise.
......@@ -81,6 +81,8 @@
#define WORKAROUND_PTXJIT_BUG_2 1
#define WORKAROUND_PTXJIT_BUG_3 1
#define PTX_WARP_SIZE 32
/* The various PTX memory areas an object might reside in. */
enum nvptx_data_area
{
......@@ -5175,7 +5177,7 @@ nvptx_expand_builtin (tree exp, rtx target, rtx ARG_UNUSED (subtarget),
static int
nvptx_simt_vf ()
{
return PTX_VECTOR_LENGTH;
return PTX_WARP_SIZE;
}
/* Validate compute dimensions of an OpenACC offload or routine, fill
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment