mirror of git://gcc.gnu.org/git/gcc.git
[nvptx, offloading] Determine default workers at runtime
Currently, if the user doesn't specify the number of workers for an openacc region, the compiler hardcodes it to a default value. This patch removes this functionality, such that the libgomp runtime can decide on a default value. 2018-07-30 Cesar Philippidis <cesar@codesourcery.com> Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ... (PTX_DEFAULT_RUNTIME_DIM): ... this. (nvptx_goacc_validate_dims): Set default worker and gang dims to PTX_DEFAULT_RUNTIME_DIM. (nvptx_dim_limit): Ignore GOMP_DIM_WORKER. Co-Authored-By: Tom de Vries <tdevries@suse.de> From-SVN: r263060
This commit is contained in:
parent
d634309f9a
commit
605219e7c7
|
|
@ -1,3 +1,12 @@
|
||||||
|
2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
|
||||||
|
Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
|
||||||
|
(PTX_DEFAULT_RUNTIME_DIM): ... this.
|
||||||
|
(nvptx_goacc_validate_dims): Set default worker and gang dims to
|
||||||
|
PTX_DEFAULT_RUNTIME_DIM.
|
||||||
|
(nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
|
||||||
|
|
||||||
2018-07-29 John David Anglin <danglin@gcc.gnu.org>
|
2018-07-29 John David Anglin <danglin@gcc.gnu.org>
|
||||||
|
|
||||||
* config/pa/pa.c (pa_output_addr_vec): Align address table.
|
* config/pa/pa.c (pa_output_addr_vec): Align address table.
|
||||||
|
|
|
||||||
|
|
@ -5165,7 +5165,7 @@ nvptx_expand_builtin (tree exp, rtx target, rtx ARG_UNUSED (subtarget),
|
||||||
/* Define dimension sizes for known hardware. */
|
/* Define dimension sizes for known hardware. */
|
||||||
#define PTX_VECTOR_LENGTH 32
|
#define PTX_VECTOR_LENGTH 32
|
||||||
#define PTX_WORKER_LENGTH 32
|
#define PTX_WORKER_LENGTH 32
|
||||||
#define PTX_GANG_DEFAULT 0 /* Defer to runtime. */
|
#define PTX_DEFAULT_RUNTIME_DIM 0 /* Defer to runtime. */
|
||||||
|
|
||||||
/* Implement TARGET_SIMT_VF target hook: number of threads in a warp. */
|
/* Implement TARGET_SIMT_VF target hook: number of threads in a warp. */
|
||||||
|
|
||||||
|
|
@ -5214,9 +5214,9 @@ nvptx_goacc_validate_dims (tree decl, int dims[], int fn_level)
|
||||||
{
|
{
|
||||||
dims[GOMP_DIM_VECTOR] = PTX_VECTOR_LENGTH;
|
dims[GOMP_DIM_VECTOR] = PTX_VECTOR_LENGTH;
|
||||||
if (dims[GOMP_DIM_WORKER] < 0)
|
if (dims[GOMP_DIM_WORKER] < 0)
|
||||||
dims[GOMP_DIM_WORKER] = PTX_WORKER_LENGTH;
|
dims[GOMP_DIM_WORKER] = PTX_DEFAULT_RUNTIME_DIM;
|
||||||
if (dims[GOMP_DIM_GANG] < 0)
|
if (dims[GOMP_DIM_GANG] < 0)
|
||||||
dims[GOMP_DIM_GANG] = PTX_GANG_DEFAULT;
|
dims[GOMP_DIM_GANG] = PTX_DEFAULT_RUNTIME_DIM;
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5230,9 +5230,6 @@ nvptx_dim_limit (int axis)
|
||||||
{
|
{
|
||||||
switch (axis)
|
switch (axis)
|
||||||
{
|
{
|
||||||
case GOMP_DIM_WORKER:
|
|
||||||
return PTX_WORKER_LENGTH;
|
|
||||||
|
|
||||||
case GOMP_DIM_VECTOR:
|
case GOMP_DIM_VECTOR:
|
||||||
return PTX_VECTOR_LENGTH;
|
return PTX_VECTOR_LENGTH;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue