diff options
author | Tom de Vries <tdevries@suse.de> | 2019-01-12 22:18:00 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2019-01-12 22:18:00 +0000 |
commit | 52d22ece49ac0517d4288d65a5ee6dd8d9441d4c (patch) | |
tree | ae934ea5cb23fc3d354e130cd9233d7697f2f4b6 /libgomp | |
parent | 2b9d9e393766d2fa6e2dd5f361d0db14872cf261 (diff) | |
download | gcc-52d22ece49ac0517d4288d65a5ee6dd8d9441d4c.zip gcc-52d22ece49ac0517d4288d65a5ee6dd8d9441d4c.tar.gz gcc-52d22ece49ac0517d4288d65a5ee6dd8d9441d4c.tar.bz2 |
[nvptx] Update insufficient launch message for variable vector_length
Update message in nvptx libgomp plugin about insufficient resources to launch
kernel, to accommodate for the fact the vector_length can now be variable.
2019-01-12 Tom de Vries <tdevries@suse.de>
* plugin/plugin-nvptx.c (nvptx_exec): Update insufficient hardware
resources diagnostic.
From-SVN: r267890
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/plugin/plugin-nvptx.c | 18 |
2 files changed, 15 insertions, 8 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index dce5dce..e08416c 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,5 +1,10 @@ 2019-01-12 Tom de Vries <tdevries@suse.de> + * plugin/plugin-nvptx.c (nvptx_exec): Update insufficient hardware + resources diagnostic. + +2019-01-12 Tom de Vries <tdevries@suse.de> + * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: Expect vector length to be 128. * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Expect vector diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index c80da64c..8912660 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1297,14 +1297,16 @@ nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs, if (dims[GOMP_DIM_WORKER] * dims[GOMP_DIM_VECTOR] > targ_fn->max_threads_per_block) { - int suggest_workers - = targ_fn->max_threads_per_block / dims[GOMP_DIM_VECTOR]; - GOMP_PLUGIN_fatal ("The Nvidia accelerator has insufficient resources to" - " launch '%s' with num_workers = %d; recompile the" - " program with 'num_workers = %d' on that offloaded" - " region or '-fopenacc-dim=:%d'", - targ_fn->launch->fn, dims[GOMP_DIM_WORKER], - suggest_workers, suggest_workers); + const char *msg + = ("The Nvidia accelerator has insufficient resources to launch '%s'" + " with num_workers = %d and vector_length = %d" + "; " + "recompile the program with 'num_workers = x and vector_length = y'" + " on that offloaded region or '-fopenacc-dim=:x:y' where" + " x * y <= %d" + ".\n"); + GOMP_PLUGIN_fatal (msg, targ_fn->launch->fn, dims[GOMP_DIM_WORKER], + dims[GOMP_DIM_VECTOR], targ_fn->max_threads_per_block); } /* Check if the accelerator has sufficient barrier resources to |