[ was: Re: [nvptx] vector length patch series ] On 14-12-18 20:58, Tom de Vries wrote: > 0005-nvptx-update-openacc-dim-macros.patch
Factored out this patch. Committed. Thanks, - Tom
[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 <tdevr...@suse.de> * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define. (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH. --- gcc/config/nvptx/nvptx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 01505899785..9906716890e 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -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