diff options
author | Tom de Vries <tdevries@suse.de> | 2019-01-12 22:19:15 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2019-01-12 22:19:15 +0000 |
commit | 2c2ff1684dd33a4ec2ea7b91c0ada9cf371bf75f (patch) | |
tree | 61235a7b30ab9a56f66607d3efcf978ca3f07463 | |
parent | a10577582585850c88b77dbc492eb046c05e79ce (diff) | |
download | gcc-2c2ff1684dd33a4ec2ea7b91c0ada9cf371bf75f.zip gcc-2c2ff1684dd33a4ec2ea7b91c0ada9cf371bf75f.tar.gz gcc-2c2ff1684dd33a4ec2ea7b91c0ada9cf371bf75f.tar.bz2 |
[nvptx] Enable setting vector length using -fopenacc-dim
Enable setting vector length using -fopenacc-dim, f.i. -fopenacc-dim=::128.
2019-01-12 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Alow setting
vector length using -fopenacc-dim.
* plugin/plugin-nvptx.c (nvptx_exec): Update error message.
From-SVN: r267896
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/nvptx/nvptx.c | 3 | ||||
-rw-r--r-- | libgomp/ChangeLog | 4 | ||||
-rw-r--r-- | libgomp/plugin/plugin-nvptx.c | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f18a34..2ba0b7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2019-01-12 Tom de Vries <tdevries@suse.de> + * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Alow setting + vector length using -fopenacc-dim. + +2019-01-12 Tom de Vries <tdevries@suse.de> + * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Take larger vector lengths into account. diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 8d2740c..03c0f82 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -5705,7 +5705,8 @@ nvptx_goacc_validate_dims_1 (tree decl, int dims[], int fn_level, unsigned used) if (oacc_default_dims_p) { - dims[GOMP_DIM_VECTOR] = default_vector_length; + if (dims[GOMP_DIM_VECTOR] < 0) + dims[GOMP_DIM_VECTOR] = default_vector_length; if (dims[GOMP_DIM_WORKER] < 0) dims[GOMP_DIM_WORKER] = PTX_DEFAULT_RUNTIME_DIM; if (dims[GOMP_DIM_GANG] < 0) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index fc1fb2a..0021052 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,5 +1,9 @@ 2019-01-12 Tom de Vries <tdevries@suse.de> + * plugin/plugin-nvptx.c (nvptx_exec): Update error message. + +2019-01-12 Tom de Vries <tdevries@suse.de> + * testsuite/libgomp.oacc-c-c++-common/vector-length-64-1.c: New test. * testsuite/libgomp.oacc-c-c++-common/vector-length-64-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/vector-length-64-3.c: New test. diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 8912660..dd2bcf3 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1321,7 +1321,7 @@ nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs, " region or '-fopenacc-dim=:x:' where x <= 15" "; " "or, recompile the program with 'vector_length = 32' on that" - " offloaded region" + " offloaded region or '-fopenacc-dim=::32'" ".\n"); GOMP_PLUGIN_fatal (msg, targ_fn->launch->fn, dims[GOMP_DIM_WORKER], dims[GOMP_DIM_VECTOR]); |