gcc/libgomp/testsuite
Frederik Harwath 001ab12e62 openmp: ignore nowait if async execution is unsupported [PR93481]
An OpenMP "nowait" clause on a target construct currently leads to
a call to GOMP_OFFLOAD_async_run in the plugin that is used for
offloading at execution time. The nvptx plugin contains only a stub
of this function that always produces a fatal error if called.

This commit changes the "nowait" implementation to ignore the clause
if the executing device's plugin does not implement GOMP_OFFLOAD_async_run.
The stub in the nvptx plugin is removed which effectively means that
programs containing "nowait" can now be executed with nvptx offloading
as if the clause had not been used.
This behavior is consistent with the OpenMP specification which says that
"[...] execution of the target task *may* be deferred" (emphasis added),
cf. OpenMP 5.0, page 172.

libgomp/

	* plugin/plugin-nvptx.c: Remove GOMP_OFFLOAD_async_run stub.
	* target.c (gomp_load_plugin_for_device): Make "async_run" loading
	optional.
	(gomp_target_task_fn): Assert "devicep->async_run_func".
	(clear_unsupported_flags): New function to remove unsupported flags
	(right now only GOMP_TARGET_FLAG_NOWAIT) that can be be ignored.
	(GOMP_target_ext): Apply clear_unsupported_flags to flags.
	* testsuite/libgomp.c/target-33.c:
	Remove xfail for offload_target_nvptx.
	* testsuite/libgomp.c/target-34.c: Likewise.
2020-02-13 10:18:31 +01:00
..
config Update copyright years. 2020-01-01 12:51:42 +01:00
lib [libgomp] – Fix check_effective_target_offload_target_nvptx for remote execution 2020-02-05 17:40:48 +01:00
libgomp.c openmp: ignore nowait if async execution is unsupported [PR93481] 2020-02-13 10:18:31 +01:00
libgomp.c-c++-common openmp: Fix handling of non-addressable shared scalars in parallel nested inside of target [PR93515] 2020-02-06 09:19:08 +01:00
libgomp.c++ re PR c++/60228 (ICE using lambda in #pragma omp declare reduction) 2019-11-29 10:10:44 +01:00
libgomp.fortran Fortran] OpenMP/OpenACC – fix more issues with OPTIONAL 2020-01-03 13:56:46 +01:00
libgomp.graphite Update copyright years. 2020-01-01 12:51:42 +01:00
libgomp.hsa.c libgomp – spelling fixes, incl. omp_lib.h.in 2019-12-11 12:45:49 +01:00
libgomp.oacc-c Enable OpenACC GCN testing. 2019-12-03 12:53:53 +00:00
libgomp.oacc-c-c++-common Adjust formatting of acc_get_property tests 2020-01-29 11:55:06 +01:00
libgomp.oacc-c++ OpenACC 2.6 deep copy: C and C++ execution tests 2019-12-20 01:39:42 +00:00
libgomp.oacc-fortran [OpenACC] bump version for 2.6 plus libgomp.texi update 2020-02-03 10:10:37 +01:00
libgomp-test-support.exp.in libgomp/test: Fix compilation for build sysroot 2019-12-22 00:41:36 +00:00
Makefile.am Generalize getconf _NPROCESSORS_ONLN 2019-05-30 09:06:48 +00:00
Makefile.in Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00