gcc/libgomp
Tobias Burnus 4ccb3366ad libgomp: Enable USM for some nvptx devices
A few high-end nvptx devices support the attribute
CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS; for those, unified shared
memory is supported in hardware. This patch enables support for those -
if all installed nvptx devices have this feature (as the capabilities
are per device type).

This exposes a bug in gomp_copy_back_icvs as it did before use
omp_get_mapped_ptr to find mapped variables, but that returns
the unchanged pointer in cased of shared memory. But in this case,
we have a few actually mapped pointers - like the ICV variables.
Additionally, there was a mismatch with regards to '-1' for the
device number as gomp_copy_back_icvs and omp_get_mapped_ptr count
differently. Hence, do the lookup manually.

include/ChangeLog:

	* cuda/cuda.h (CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS): Add.

libgomp/ChangeLog:

	* libgomp.texi (nvptx): Update USM description.
	* plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_num_devices):
	Claim support when requesting USM and all devices support
	CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.
	* target.c (gomp_copy_back_icvs): Fix device ptr lookup.
	(gomp_target_init): Set GOMP_OFFLOAD_CAP_SHARED_MEM is the
	devices supports USM.
2024-05-29 15:14:38 +02:00
..
config openmp: Change to using a hashtab to lookup offload target addresses for indirect function calls 2024-03-22 18:09:40 +00:00
plugin libgomp: Enable USM for some nvptx devices 2024-05-29 15:14:38 +02:00
testsuite libgomp: Add gfx90c, 1036 and 1103 declare variant tests 2024-05-02 11:56:16 +02: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. 2024-01-03 12:19:35 +01:00
acinclude.m4 libgomp: fix typo in mold linker detection 2022-06-28 10:35:32 +02:00
aclocal.m4 libgomp: Regenerate configure files with automake 1.15.1 2020-10-02 12:08:47 +02:00
affinity-fmt.c Update copyright years. 2024-01-03 12:19:35 +01:00
affinity.c Update copyright years. 2024-01-03 12:19:35 +01:00
alloc.c Update copyright years. 2024-01-03 12:19:35 +01:00
allocator.c Update copyright years. 2024-01-03 12:19:35 +01:00
atomic.c Update copyright years. 2024-01-03 12:19:35 +01:00
barrier.c Update copyright years. 2024-01-03 12:19:35 +01:00
basic-allocator.c Update copyright years. 2024-01-03 12:19:35 +01:00
ChangeLog Daily bump. 2024-05-09 10:58:01 +00:00
ChangeLog.graphite
config.h.in Refactor '-ldl' handling for libgomp proper and plugins 2022-05-12 15:11:30 +02:00
configure libgomp: Fix up FLOCK fallback handling [PR113192] 2024-01-10 13:32:02 +01:00
configure.ac libgomp: Fix up FLOCK fallback handling [PR113192] 2024-01-10 13:32:02 +01:00
configure.tgt libgomp: Define config_path for hppa*-*-linux* 2024-02-11 20:23:14 +00:00
critical.c Update copyright years. 2024-01-03 12:19:35 +01:00
env.c Update copyright years. 2024-01-03 12:19:35 +01:00
error.c Update copyright years. 2024-01-03 12:19:35 +01:00
fortran.c Update copyright years. 2024-01-03 12:19:35 +01:00
hashtab.h Update copyright years. 2024-01-03 12:19:35 +01:00
icv-device.c Update copyright years. 2024-01-03 12:19:35 +01:00
icv.c Update copyright years. 2024-01-03 12:19:35 +01:00
iter_ull.c Update copyright years. 2024-01-03 12:19:35 +01:00
iter.c Update copyright years. 2024-01-03 12:19:35 +01:00
libgomp_f.h.in Update copyright years. 2024-01-03 12:19:35 +01:00
libgomp_g.h Update copyright years. 2024-01-03 12:19:35 +01:00
libgomp-plugin.c Update copyright years. 2024-01-03 12:19:35 +01:00
libgomp-plugin.h Update copyright years. 2024-01-03 12:19:35 +01:00
libgomp.h OpenACC 2.7: Adjust acc_map_data/acc_unmap_data interaction with reference counters 2024-04-16 09:04:11 +00:00
libgomp.map OpenMP/Fortran: Implement omp allocators/allocate for ptr/allocatables 2023-12-08 15:18:25 +01:00
libgomp.spec.in
libgomp.texi libgomp: Enable USM for some nvptx devices 2024-05-29 15:14:38 +02:00
lock.c Update copyright years. 2024-01-03 12:19:35 +01:00
loop_ull.c Update copyright years. 2024-01-03 12:19:35 +01:00
loop.c Update copyright years. 2024-01-03 12:19:35 +01:00
Makefile.am build: Derive object names in make_sunver.pl 2024-05-07 13:14:05 +02:00
Makefile.in build: Derive object names in make_sunver.pl 2024-05-07 13:14:05 +02:00
oacc-async.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-cuda.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-host.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-init.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-int.h Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-mem.c OpenACC 2.7: Adjust acc_map_data/acc_unmap_data interaction with reference counters 2024-04-16 09:04:11 +00:00
oacc-parallel.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-plugin.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-plugin.h Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-profiling.c Update copyright years. 2024-01-03 12:19:35 +01:00
oacc-target.c GCN libgomp port 2019-11-13 12:38:04 +00:00
omp_lib.f90.in Update copyright years. 2024-01-03 12:19:35 +01:00
omp_lib.h.in Update copyright years. 2024-01-03 12:19:35 +01:00
omp.h.in Update copyright years. 2024-01-03 12:19:35 +01:00
openacc_lib.h OpenACC: Add Fortran routines acc_{alloc,free,hostptr,deviceptr,memcpy_{to,from}_device*} 2024-02-27 17:30:38 +01:00
openacc.f90 OpenACC: Add Fortran routines acc_{alloc,free,hostptr,deviceptr,memcpy_{to,from}_device*} 2024-02-27 17:30:38 +01:00
openacc.h Update copyright years. 2024-01-03 12:19:35 +01:00
ordered.c Update copyright years. 2024-01-03 12:19:35 +01:00
parallel.c Update copyright years. 2024-01-03 12:19:35 +01:00
priority_queue.c Update copyright years. 2024-01-03 12:19:35 +01:00
priority_queue.h Fix up duplicated words mostly in comments, part 1 2024-04-02 13:39:11 +02:00
scope.c Update copyright years. 2024-01-03 12:19:35 +01:00
sections.c Update copyright years. 2024-01-03 12:19:35 +01:00
secure_getenv.h Update copyright years. 2024-01-03 12:19:35 +01:00
single.c Update copyright years. 2024-01-03 12:19:35 +01:00
splay-tree.c Update copyright years. 2024-01-03 12:19:35 +01:00
splay-tree.h Update copyright years. 2024-01-03 12:19:35 +01:00
target-indirect.c Update copyright years. 2024-01-03 12:19:35 +01:00
target.c libgomp: Enable USM for some nvptx devices 2024-05-29 15:14:38 +02:00
task.c Update copyright years. 2024-01-03 12:19:35 +01:00
taskloop.c Update copyright years. 2024-01-03 12:19:35 +01:00
team.c Update copyright years. 2024-01-03 12:19:35 +01:00
teams.c Update copyright years. 2024-01-03 12:19:35 +01:00
work.c Update copyright years. 2024-01-03 12:19:35 +01:00