gcc/libgomp
Tom de Vries 2c372e81a9 [nvptx, libgomp] Don't launch with num_workers == 0
When using a compiler build with:
...
+#define PTX_DEFAULT_VECTOR_LENGTH PTX_CTA_SIZE
+#define PTX_MAX_VECTOR_LENGTH PTX_CTA_SIZE
...
and running the libgomp testsuite, we run into an execution failure in
parallel-loop-1.c, due to a cuda launch failure:
...
  nvptx_exec: kernel f6_none_none$_omp_fn$0: launch gangs=480, workers=0, \
    vectors=1024

libgomp: cuLaunchKernel error: invalid argument
...
because workers == 0.

The workers variable is set to 0 here in nvptx_exec:
...
                workers = blocks / actual_vectors;
...
because actual_vectors is 1024, and blocks is 768:
...
cuOccupancyMaxPotentialBlockSize: grid = 10, block = 768
...

Fix this by ensuring that workers is at least one.

2019-01-09  Tom de Vries  <tdevries@suse.de>

	* plugin/plugin-nvptx.c (nvptx_exec): Make sure to launch with at least
	one worker.

From-SVN: r267746
2019-01-09 00:07:45 +00:00
..
config Update copyright years. 2019-01-01 13:31:55 +01:00
plugin [nvptx, libgomp] Don't launch with num_workers == 0 2019-01-09 00:07:45 +00:00
testsuite [nvptx] Fix libgomp.oacc-c-c++-common/vector-length-128-3.c 2019-01-07 08:09:49 +00:00
acinclude.m4 Enable building libgomp with Intel CET 2017-11-17 22:22:09 +01:00
aclocal.m4 Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
affinity-fmt.c Update copyright years. 2019-01-01 13:31:55 +01:00
affinity.c Update copyright years. 2019-01-01 13:31:55 +01:00
alloc.c Update copyright years. 2019-01-01 13:31:55 +01:00
atomic.c Update copyright years. 2019-01-01 13:31:55 +01:00
barrier.c Update copyright years. 2019-01-01 13:31:55 +01:00
ChangeLog [nvptx, libgomp] Don't launch with num_workers == 0 2019-01-09 00:07:45 +00:00
ChangeLog.graphite Add forgotten ChangeLog entries. 2010-03-08 17:49:42 +00:00
config.h.in builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
configure builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
configure.ac builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
configure.tgt builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
critical.c Update copyright years. 2019-01-01 13:31:55 +01:00
env.c Update copyright years. 2019-01-01 13:31:55 +01:00
error.c Update copyright years. 2019-01-01 13:31:55 +01:00
fortran.c Update copyright years. 2019-01-01 13:31:55 +01:00
hashtab.h Update copyright years. 2019-01-01 13:31:55 +01:00
icv-device.c Update copyright years. 2019-01-01 13:31:55 +01:00
icv.c Update copyright years. 2019-01-01 13:31:55 +01:00
iter_ull.c Update copyright years. 2019-01-01 13:31:55 +01:00
iter.c Update copyright years. 2019-01-01 13:31:55 +01:00
libgomp_f.h.in Update copyright years. 2019-01-01 13:31:55 +01:00
libgomp_g.h Update copyright years. 2019-01-01 13:31:55 +01:00
libgomp-plugin.c Update copyright years. 2019-01-01 13:31:55 +01:00
libgomp-plugin.h Update copyright years. 2019-01-01 13:31:55 +01:00
libgomp.h Update copyright years. 2019-01-01 13:31:55 +01:00
libgomp.map builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
libgomp.spec.in Generally link to libgomp for -ftree-parallelize-loops=*. 2013-11-07 16:07:34 +01:00
libgomp.texi gcc.c (process_command): Update copyright notice dates. 2019-01-01 12:34:49 +01:00
lock.c Update copyright years. 2019-01-01 13:31:55 +01:00
loop_ull.c Update copyright years. 2019-01-01 13:31:55 +01:00
loop.c Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.am builtin-types.def (BT_FN_VOID_BOOL, [...]): New. 2018-11-08 18:13:04 +01:00
Makefile.in Makefile.am (AUTOMAKE_OPTIONS): Drop dejagnu. 2018-11-26 22:03:41 +01:00
oacc-async.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-cuda.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-host.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-init.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-int.h Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-mem.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-parallel.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-plugin.c Update copyright years. 2019-01-01 13:31:55 +01:00
oacc-plugin.h Update copyright years. 2019-01-01 13:31:55 +01:00
omp_lib.f90.in Update copyright years. 2019-01-01 13:31:55 +01:00
omp_lib.h.in Update copyright years. 2019-01-01 13:31:55 +01:00
omp.h.in Update copyright years. 2019-01-01 13:31:55 +01:00
openacc_lib.h Update copyright years. 2019-01-01 13:31:55 +01:00
openacc.f90 Update copyright years. 2019-01-01 13:31:55 +01:00
openacc.h Update copyright years. 2019-01-01 13:31:55 +01:00
ordered.c Update copyright years. 2019-01-01 13:31:55 +01:00
parallel.c Update copyright years. 2019-01-01 13:31:55 +01:00
priority_queue.c Update copyright years. 2019-01-01 13:31:55 +01:00
priority_queue.h Update copyright years. 2019-01-01 13:31:55 +01:00
sections.c Update copyright years. 2019-01-01 13:31:55 +01:00
secure_getenv.h Update copyright years. 2019-01-01 13:31:55 +01:00
single.c Update copyright years. 2019-01-01 13:31:55 +01:00
splay-tree.c Update copyright years. 2019-01-01 13:31:55 +01:00
splay-tree.h Update copyright years. 2019-01-01 13:31:55 +01:00
target.c Update copyright years. 2019-01-01 13:31:55 +01:00
task.c Update copyright years. 2019-01-01 13:31:55 +01:00
taskloop.c Update copyright years. 2019-01-01 13:31:55 +01:00
team.c Update copyright years. 2019-01-01 13:31:55 +01:00
teams.c Update copyright years. 2019-01-01 13:31:55 +01:00
work.c Update copyright years. 2019-01-01 13:31:55 +01:00