diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 120f0874b27..fba0ba0562a 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,8 @@ +2019-01-09 Tom de Vries + + * plugin/plugin-nvptx.c (nvptx_exec): Make sure to launch with at least + one worker. + 2019-01-07 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/vector-length-128-3.c: Fix diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c index 572d9ef8d5c..60553bdf3bd 100644 --- a/libgomp/plugin/plugin-nvptx.c +++ b/libgomp/plugin/plugin-nvptx.c @@ -1272,6 +1272,7 @@ nvptx_exec (void (*fn), size_t mapnum, void **hostaddrs, void **devaddrs, ? vectors : dims[GOMP_DIM_VECTOR]); workers = blocks / actual_vectors; + workers = MAX (workers, 1); } for (i = 0; i != GOMP_DIM_MAX; i++)