gcc/libgomp
Andrew Stubbs cdddaf7fdf amdgcn: libgomp plugin USM implementation
Implement the Unified Shared Memory API calls in the GCN plugin.

The allocate and free are pretty straight-forward because all "target" memory
allocations are compatible with USM, on the right hardware.  However, there's
no known way to check what memory region was used, after the fact, so we use a
splay tree to record allocations so we can answer "is_usm_ptr" later.

libgomp/ChangeLog:

	* plugin/plugin-gcn.c (struct usm_splay_tree_key_s): New.
	(usm_splay_compare): New.
	(splay_tree_prefix): New.
	(GOMP_OFFLOAD_usm_alloc): New.
	(GOMP_OFFLOAD_usm_free): New.
	(GOMP_OFFLOAD_is_usm_ptr): New.
	(GOMP_OFFLOAD_supported_features): Move into the OpenMP API fold.
	Add GOMP_REQUIRES_UNIFIED_ADDRESS and
	GOMP_REQUIRES_UNIFIED_SHARED_MEMORY.
	(gomp_fatal): New.
	(splay_tree_c): New.
	* testsuite/lib/libgomp.exp (check_effective_target_omp_usm): New.
	* testsuite/libgomp.c++/usm-1.C: Use dg-require-effective-target.
	* testsuite/libgomp.c-c++-common/requires-1.c: Likewise.
	* testsuite/libgomp.c/usm-1.c: Likewise.
	* testsuite/libgomp.c/usm-2.c: Likewise.
	* testsuite/libgomp.c/usm-3.c: Likewise.
	* testsuite/libgomp.c/usm-4.c: Likewise.
	* testsuite/libgomp.c/usm-5.c: Likewise.
	* testsuite/libgomp.c/usm-6.c: Likewise.
2022-06-27 17:28:04 +01:00
..
config openmp: -foffload-memory=pinned 2022-03-11 23:03:59 +00:00
plugin amdgcn: libgomp plugin USM implementation 2022-06-27 17:28:04 +01:00
testsuite amdgcn: libgomp plugin USM implementation 2022-06-27 17:28:04 +01:00
.gitattributes libgomp: Fixes + cleanup for OpenACC's Fortran module + openacc_lib.h 2020-02-19 09:13:44 +01:00
acc_prof.h Update copyright years. 2021-01-04 10:26:59 +01:00
acinclude.m4 re PR other/79543 (Inappropriate "ld --version" checking) 2019-09-03 14:10:26 +00:00
aclocal.m4 libgomp: Regenerate configure files with automake 1.15.1 2020-10-02 12:08:47 +02:00
affinity-fmt.c openmp: Avoid PLT relocations for omp_* symbols in libgomp 2021-10-01 19:55:06 +02:00
affinity.c Update copyright years. 2021-01-04 10:26:59 +01:00
alloc.c Update copyright years. 2021-01-04 10:26:59 +01:00
allocator.c openmp, nvptx: ompx_unified_shared_mem_alloc 2022-03-11 23:03:58 +00:00
atomic.c Update copyright years. 2021-01-04 10:26:59 +01:00
barrier.c Update copyright years. 2021-01-04 10:26:59 +01:00
ChangeLog Daily bump. 2021-10-19 00:18:06 +00:00
ChangeLog.graphite
ChangeLog.omp amdgcn: Add gfx90a support 2022-05-24 16:59:27 +01:00
config.h.in libgomp HSA/GCN plugins: don't prepend the 'HSA_RUNTIME_LIB' path to 'libhsa-runtime64.so' 2021-03-25 14:11:50 +01:00
configure libgomp: Only check for 2*sizeof(void*) int type with Fortran [PR96661] 2021-09-28 15:17:07 +02:00
configure.ac libgomp: Only check for 2*sizeof(void*) int type with Fortran [PR96661] 2021-09-28 15:17:07 +02:00
configure.tgt libgomp: enable linux-futex on riscv64 2021-01-18 15:13:48 +01:00
critical.c Update copyright years. 2021-01-04 10:26:59 +01:00
env.c Restore 'GOMP_OPENACC_DIM' environment variable parsing 2021-11-10 08:49:34 +01:00
error.c openmp: Implement the error directive 2021-08-20 14:19:07 +02:00
fortran.c openmp: Add omp_set_num_teams, omp_get_max_teams, omp_[gs]et_teams_thread_limit 2021-10-11 13:06:27 +02:00
hashtab.h OpenMP 5.0 Structure element mapping 2021-04-22 10:14:32 -07:00
icv-device.c openmp: Avoid PLT relocations for omp_* symbols in libgomp 2021-10-01 19:55:06 +02:00
icv.c openmp: Add omp_set_num_teams, omp_get_max_teams, omp_[gs]et_teams_thread_limit 2021-10-11 13:06:27 +02:00
iter_ull.c Update copyright years. 2021-01-04 10:26:59 +01:00
iter.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgomp_f.h.in Update copyright years. 2021-01-04 10:26:59 +01:00
libgomp_g.h openmp: Add support for 'target_device' context selector set 2022-01-25 12:05:03 -08:00
libgomp-plugin.c Update copyright years. 2021-01-04 10:26:59 +01:00
libgomp-plugin.h openmp, nvptx: ompx_unified_shared_mem_alloc 2022-03-11 23:03:58 +00:00
libgomp.h openmp, nvptx: ompx_unified_shared_mem_alloc 2022-03-11 23:03:58 +00:00
libgomp.map openmp: -foffload-memory=pinned 2022-03-11 23:03:59 +00:00
libgomp.spec.in
libgomp.texi Add support for allocate clause (OpenMP 5.0). 2022-03-08 19:17:51 +00:00
lock.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop_ull.c Update copyright years. 2021-01-04 10:26:59 +01:00
loop.c Update copyright years. 2021-01-04 10:26:59 +01:00
Makefile.am openmp: Add support for 'target_device' context selector set 2022-01-25 12:05:03 -08:00
Makefile.in openmp: Add support for 'target_device' context selector set 2022-01-25 12:05:03 -08:00
oacc-async.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-cuda.c Tweak error return value for acc_set_cuda_stream. 2021-04-20 11:49:30 -07:00
oacc-host.c openmp: Add support for 'target_device' context selector set 2022-01-25 12:05:03 -08:00
oacc-init.c Add changes to profiling interface from OG8 branch 2021-04-21 09:33:50 -07:00
oacc-int.h Merge non-contiguous array support patches. 2021-04-20 11:49:29 -07:00
oacc-mem.c OpenMP 5.0: Improve OpenMP target support for C++ (includes PR92120 v3) 2021-05-30 05:00:19 +08:00
oacc-parallel.c OpenMP 5.0 Structure element mapping 2021-04-22 10:14:32 -07:00
oacc-plugin.c Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-plugin.h Update copyright years. 2021-01-04 10:26:59 +01:00
oacc-profiling-acc_register_library.c Add changes to profiling interface from OG8 branch 2021-04-21 09:33:50 -07:00
oacc-profiling.c Add changes to profiling interface from OG8 branch 2021-04-21 09:33:50 -07:00
oacc-target.c GCN libgomp port 2019-11-13 12:38:04 +00:00
omp_lib.f90.in openmp, nvptx: ompx_unified_shared_mem_alloc 2022-03-11 23:03:58 +00:00
omp_lib.h.in openmp: Add omp_set_num_teams, omp_get_max_teams, omp_[gs]et_teams_thread_limit 2021-10-11 13:06:27 +02:00
omp.h.in openmp, nvptx: ompx_unified_shared_mem_alloc 2022-03-11 23:03:58 +00:00
openacc_lib.h Update copyright years. 2021-01-04 10:26:59 +01:00
openacc.f90 Update copyright years. 2021-01-04 10:26:59 +01:00
openacc.h Update copyright years. 2021-01-04 10:26:59 +01:00
ordered.c Update copyright years. 2021-01-04 10:26:59 +01:00
parallel.c Update copyright years. 2021-01-04 10:26:59 +01:00
priority_queue.c openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
priority_queue.h openmp: Add support for the OpenMP 5.0 task detach clause 2021-01-16 12:58:13 -08:00
scope.c openmp: Implement OpenMP 5.1 scope construct 2021-08-17 15:44:56 +02:00
sections.c Update copyright years. 2021-01-04 10:26:59 +01:00
secure_getenv.h Update copyright years. 2021-01-04 10:26:59 +01:00
selector.c openmp: Add support for 'target_device' context selector set 2022-01-25 12:05:03 -08:00
single.c Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree.c Update copyright years. 2021-01-04 10:26:59 +01:00
splay-tree.h Update copyright years. 2021-01-04 10:26:59 +01:00
target.c OpenMP: Handle descriptors in target's firstprivate [PR104949] 2022-05-12 14:49:29 +02:00
task.c openmp: Add support for thread_limit clause on target 2022-02-27 21:54:04 +01:00
taskloop.c openmp: Add support for strict modifier on grainsize/num_tasks clauses 2021-08-23 15:25:24 +02:00
team.c libgomp: Silence false positive -Wmaybe-uninitialized warning [PR99984] 2021-04-09 10:18:47 +02:00
teams.c openmp: Add omp_set_num_teams, omp_get_max_teams, omp_[gs]et_teams_thread_limit 2021-10-11 13:06:27 +02:00
work.c openmp: Fix up struct gomp_work_share handling [PR102838] 2021-10-20 10:33:40 +02:00