gcc/include
Tobias Burnus bf4a5efa80 OpenMP: Add get_device_from_uid/omp_get_uid_from_device routines
Those TR13/OpenMP 6.0 routines permit a reproducible offloading to
a specific device by mapping an OpenMP device number to a
unique ID (UID). The GPU device UIDs should be universally unique,
the one for the host is not.

gcc/ChangeLog:

	* omp-general.cc (omp_runtime_api_procname): Add
	get_device_from_uid and omp_get_uid_from_device routines.

include/ChangeLog:

	* cuda/cuda.h (cuDeviceGetUuid): Declare.
	(cuDeviceGetUuid_v2): Add prototype.

libgomp/ChangeLog:

	* config/gcn/target.c (omp_get_uid_from_device,
	omp_get_device_from_uid): Add stub implementation.
	* config/nvptx/target.c (omp_get_uid_from_device,
	omp_get_device_from_uid): Likewise.
	* fortran.c (omp_get_uid_from_device_,
	omp_get_uid_from_device_8_): New functions.
	* libgomp-plugin.h (GOMP_OFFLOAD_get_uid): Add prototype.
	* libgomp.h (struct gomp_device_descr): Add 'uid' and 'get_uid_func'.
	* libgomp.map (GOMP_6.0): New, includind the new UID routines.
	* libgomp.texi (OpenMP Technical Report 13): Mark UID routines as 'Y'.
	(Device Information Routines): Document new UID routines.
	(Offload-Target Specifics): Document UID format.
	* omp.h.in (omp_get_device_from_uid, omp_get_uid_from_device):
	New prototype.
	* omp_lib.f90.in (omp_get_device_from_uid, omp_get_uid_from_device):
	New interface.
	* omp_lib.h.in: Likewise.
	* plugin/cuda-lib.def: Add cuDeviceGetUuid and cuDeviceGetUuid_v2 via
	CUDA_ONE_CALL_MAYBE_NULL.
	* plugin/plugin-gcn.c (GOMP_OFFLOAD_get_uid): New.
	* plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_uid): New.
	* target.c (str_omp_initial_device): New static var.
	(STR_OMP_DEV_PREFIX): Define.
	(gomp_get_uid_for_device, omp_get_uid_from_device,
	omp_get_device_from_uid): New.
	(gomp_load_plugin_for_device): DLSYM_OPT the function 'get_uid'.
	(gomp_target_init): Set the device's 'uid' field to NULL.
	* testsuite/libgomp.c/device_uid.c: New test.
	* testsuite/libgomp.fortran/device_uid.f90: New test.
2024-09-20 09:25:33 +02:00
..
cuda OpenMP: Add get_device_from_uid/omp_get_uid_from_device routines 2024-09-20 09:25:33 +02:00
gdb Update copyright years. 2024-01-03 12:19:35 +01:00
ansidecl.h Update copyright years. 2024-01-03 12:19:35 +01:00
btf.h btf: Protect BTF_KIND_INFO against invalid kind 2024-08-09 08:55:23 -07:00
ChangeLog Daily bump. 2024-09-14 00:16:52 +00:00
ChangeLog-9103
ChangeLog.jit
collectorAPI.h Update copyright years. 2024-01-03 12:19:35 +01:00
COPYING
COPYING3
ctf.h Update copyright years. 2024-01-03 12:19:35 +01:00
demangle.h c++, demangle: Implement https://github.com/itanium-cxx-abi/cxx-abi/issues/148 non-proposal 2024-01-13 10:23:53 +01:00
dwarf2.def Update copyright years. 2024-01-03 12:19:35 +01:00
dwarf2.h Update copyright years. 2024-01-03 12:19:35 +01:00
dyn-string.h Update copyright years. 2024-01-03 12:19:35 +01:00
environ.h Update copyright years. 2024-01-03 12:19:35 +01:00
fibheap.h Update copyright years. 2024-01-03 12:19:35 +01:00
filenames.h Update copyright years. 2024-01-03 12:19:35 +01:00
floatformat.h Update copyright years. 2024-01-03 12:19:35 +01:00
fnmatch.h Update copyright years. 2024-01-03 12:19:35 +01:00
gcc-c-fe.def Fix PR libcc1/113977 2024-02-29 08:50:06 -07:00
gcc-c-interface.h Fix PR libcc1/113977 2024-02-29 08:50:06 -07:00
gcc-cp-fe.def Update copyright years. 2024-01-03 12:19:35 +01:00
gcc-cp-interface.h Fix PR libcc1/113977 2024-02-29 08:50:06 -07:00
gcc-interface.h Update copyright years. 2024-01-03 12:19:35 +01:00
getopt.h Update copyright years. 2024-01-03 12:19:35 +01:00
gomp-constants.h Fortran: Fixes to OpenMP 'interop' directive parsing support 2024-09-13 16:48:57 +02:00
hashtab.h Update copyright years. 2024-01-03 12:19:35 +01:00
hsa_ext_amd.h
hsa_ext_image.h
hsa.h libgomp: Enable USM for AMD APUs and MI200 devices 2024-05-29 15:29:06 +02:00
leb128.h Update copyright years. 2024-01-03 12:19:35 +01:00
libcollector.h Update copyright years. 2024-01-03 12:19:35 +01:00
libfcollector.h Update copyright years. 2024-01-03 12:19:35 +01:00
libiberty.h Update copyright years. 2024-01-03 12:19:35 +01:00
longlong.h [committed] Adding missing prototype for __clzhi2 to xstormy port 2024-01-09 10:21:28 -07:00
lto-symtab.h Update copyright years. 2024-01-03 12:19:35 +01:00
md5.h Update copyright years. 2024-01-03 12:19:35 +01:00
objalloc.h Update copyright years. 2024-01-03 12:19:35 +01:00
obstack.h Update copyright years. 2024-01-03 12:19:35 +01:00
partition.h Update copyright years. 2024-01-03 12:19:35 +01:00
plugin-api.h Update copyright years. 2024-01-03 12:19:35 +01:00
safe-ctype.h Update copyright years. 2024-01-03 12:19:35 +01:00
sha1.h Update copyright years. 2024-01-03 12:19:35 +01:00
simple-object.h Update copyright years. 2024-01-03 12:19:35 +01:00
sort.h Update copyright years. 2024-01-03 12:19:35 +01:00
spincount.h 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
symcat.h Update copyright years. 2024-01-03 12:19:35 +01:00
timeval-utils.h Update copyright years. 2024-01-03 12:19:35 +01:00
vtv-change-permission.h Update copyright years. 2024-01-03 12:19:35 +01:00
xregex2.h Update copyright years. 2024-01-03 12:19:35 +01:00
xregex.h
xtensa-config.h Update copyright years. 2024-01-03 12:19:35 +01:00
xtensa-dynconfig.h Update copyright years. 2024-01-03 12:19:35 +01:00