gcc/libgomp
Kwok Cheung Yeung 1bfc07d150 openmp: Implement support for OMP_TARGET_OFFLOAD environment variable
This implements support for the OMP_TARGET_OFFLOAD environment variable
introduced in the OpenMP 5.0 standard, which controls how offloading
is handled.  It may be set to MANDATORY (abort if offloading cannot be
performed), DISABLED (no offloading to devices) or DEFAULT (offload to
device if possible, fall back to host if not).

2020-10-20  Kwok Cheung Yeung  <kcy@codesourcery.com>

	libgomp/
	* env.c (gomp_target_offload_var): New.
	(parse_target_offload): New.
	(handle_omp_display_env): Print value of OMP_TARGET_OFFLOAD.
	(initialize_env): Parse OMP_TARGET_OFFLOAD.
	* libgomp.h (gomp_target_offload_t): New.
	(gomp_target_offload_var): New.
	* libgomp.texi (OMP_TARGET_OFFLOAD): New section.
	* target.c (resolve_device): Generate error if device not found and
	offloading is mandatory.
	(gomp_target_fallback): Generate error if offloading is mandatory.
	(GOMP_target): Add argument in call to gomp_target_fallback.
	(GOMP_target_ext): Likewise.
	(gomp_target_data_fallback): Generate error if offloading is mandatory.
	(GOMP_target_data): Add argument in call to gomp_target_data_fallback.
	(GOMP_target_data_ext): Likewise.
	(gomp_target_task_fn): Add argument in call to gomp_target_fallback.
	(gomp_target_init): Return early if offloading is disabled.
2020-10-20 04:16:26 -07:00
..
config aix: remove libgomp and libatomic archives before creating FAT archives 2020-10-11 17:30:24 -04:00
plugin [libgomp, nvptx] Report launch dimensions in GOMP_OFFLOAD_run 2020-10-08 11:03:29 +02:00
testsuite openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
.gitattributes
acc_prof.h
acinclude.m4
aclocal.m4 libgomp: Regenerate configure files with automake 1.15.1 2020-10-02 12:08:47 +02:00
affinity-fmt.c
affinity.c
alloc.c
allocator.c libgomp: Add Fortran routine support for allocators 2020-07-15 08:33:20 +02:00
atomic.c
barrier.c
ChangeLog Daily bump. 2020-10-16 00:16:29 +00:00
ChangeLog.graphite
config.h.in Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00
configure libgomp: Regenerate configure files with automake 1.15.1 2020-10-02 12:08:47 +02:00
configure.ac libomp: Add omp_depend_kind to omp_lib.{f90,h} 2020-07-23 15:02:15 +02:00
configure.tgt
critical.c
env.c openmp: Implement support for OMP_TARGET_OFFLOAD environment variable 2020-10-20 04:16:26 -07:00
error.c
fortran.c openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
hashtab.h
icv-device.c
icv.c openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
iter_ull.c
iter.c
libgomp_f.h.in libomp: Add omp_depend_kind to omp_lib.{f90,h} 2020-07-23 15:02:15 +02:00
libgomp_g.h
libgomp-plugin.c
libgomp-plugin.h
libgomp.h openmp: Implement support for OMP_TARGET_OFFLOAD environment variable 2020-10-20 04:16:26 -07:00
libgomp.map openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
libgomp.spec.in
libgomp.texi openmp: Implement support for OMP_TARGET_OFFLOAD environment variable 2020-10-20 04:16:26 -07:00
lock.c
loop_ull.c
loop.c
Makefile.am
Makefile.in libgomp: Regenerate configure files with automake 1.15.1 2020-10-02 12:08:47 +02:00
oacc-async.c
oacc-cuda.c
oacc-host.c
oacc-init.c libgomp: Fix hang when profiling OpenACC programs with CUDA 9.0 nvprof 2020-07-14 10:31:35 -07:00
oacc-int.h
oacc-mem.c openacc: Deep copy attach/detach should not affect reference counts 2020-07-27 09:16:57 -07:00
oacc-parallel.c
oacc-plugin.c
oacc-plugin.h
oacc-profiling.c
oacc-target.c
omp_lib.f90.in openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
omp_lib.h.in openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
omp.h.in openmp: Add support for the omp_get_supported_active_levels runtime library routine 2020-10-13 13:21:02 -07:00
openacc_lib.h
openacc.f90
openacc.h
ordered.c
parallel.c libgomp: Enforce 1-thread limit in subteams 2020-09-30 17:37:31 +01:00
priority_queue.c
priority_queue.h
sections.c
secure_getenv.h
single.c
splay-tree.c
splay-tree.h
target.c openmp: Implement support for OMP_TARGET_OFFLOAD environment variable 2020-10-20 04:16:26 -07:00
task.c
taskloop.c
team.c
teams.c
work.c