Commit 52d22ece by Tom de Vries Committed by Tom de Vries

[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
parent 2b9d9e39
2019-01-12 Tom de Vries <tdevries@suse.de> 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 * testsuite/libgomp.oacc-c-c++-common/vector-length-128-1.c: Expect
vector length to be 128. vector length to be 128.
* testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Expect vector * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Expect vector
......
...@@ -1297,14 +1297,16 @@ nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs, ...@@ -1297,14 +1297,16 @@ nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs,
if (dims[GOMP_DIM_WORKER] * dims[GOMP_DIM_VECTOR] if (dims[GOMP_DIM_WORKER] * dims[GOMP_DIM_VECTOR]
> targ_fn->max_threads_per_block) > targ_fn->max_threads_per_block)
{ {
int suggest_workers const char *msg
= targ_fn->max_threads_per_block / dims[GOMP_DIM_VECTOR]; = ("The Nvidia accelerator has insufficient resources to launch '%s'"
GOMP_PLUGIN_fatal ("The Nvidia accelerator has insufficient resources to" " with num_workers = %d and vector_length = %d"
" launch '%s' with num_workers = %d; recompile the" "; "
" program with 'num_workers = %d' on that offloaded" "recompile the program with 'num_workers = x and vector_length = y'"
" region or '-fopenacc-dim=:%d'", " on that offloaded region or '-fopenacc-dim=:x:y' where"
targ_fn->launch->fn, dims[GOMP_DIM_WORKER], " x * y <= %d"
suggest_workers, suggest_workers); ".\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 /* Check if the accelerator has sufficient barrier resources to
......
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