aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.cc
diff options
context:
space:
mode:
authorTobias Burnus <tburnus@baylibre.com>2025-03-21 21:39:42 +0100
committerTobias Burnus <tburnus@baylibre.com>2025-03-21 21:39:42 +0100
commit41b9c3b848c8cbe9cb4b9d923c4e569767284e28 (patch)
tree91fddf3a8975985f76266718c3db72e2d0a62cd0 /gcc/alias.cc
parent78592fdbdc18013387d9854805b5cbf6d19c2110 (diff)
downloadgcc-41b9c3b848c8cbe9cb4b9d923c4e569767284e28.zip
gcc-41b9c3b848c8cbe9cb4b9d923c4e569767284e28.tar.gz
gcc-41b9c3b848c8cbe9cb4b9d923c4e569767284e28.tar.bz2
libgomp/plugin: Add initial interop support to nvptx + gcn
The interop directive operates on an opaque object that represents a foreign runtime. This commit adds support for this to the two offloading plugins. For nvptx, it supports cuda, cuda_driver and hip; the latter is AMD's version of CUDA which for Nvidia devices boils down to normal CUDA. Thus, at the end for this limited use, cuda/cuda_driver/hip are all the same - and for plugin-nvptx.c, the they differ only in terms of what gets fr_id, fr_name and get_interop_type_desc return. For gcn, it supports hip and hsa. Regarding get-mapped-ptr-1.c: That's actually a fix for the GOMP_interop commit r15-8654-g99e2906ae255fc that added GOMP_DEVICE_DEFAULT_OMP_61 alias omp_default_device, which is a conforming device number. But that test used -5 as check for a non-conforming device number. libgomp/ChangeLog: * plugin/plugin-gcn.c (_LIBGOMP_PLUGIN_INCLUDE): Define. (struct hsa_runtime_fn_info): Add two queue functions. (hipError_t, hipCtx_t, hipStream_s, hipStream_t): New types. (struct hip_runtime_fn_info): New. (hip_runtime_lib, hip_fns): New global vars. (init_environment_variables): Handle hip_runtime_lib. (init_hsa_runtime_functions): Load the two queue functions. (init_hip_runtime_functions, GOMP_OFFLOAD_interop, GOMP_OFFLOAD_get_interop_int, GOMP_OFFLOAD_get_interop_ptr, GOMP_OFFLOAD_get_interop_str, GOMP_OFFLOAD_get_interop_type_desc): New. * plugin/plugin-nvptx.c (_LIBGOMP_PLUGIN_INCLUDE): Define. (GOMP_OFFLOAD_interop, GOMP_OFFLOAD_get_interop_int, GOMP_OFFLOAD_get_interop_ptr, GOMP_OFFLOAD_get_interop_str, GOMP_OFFLOAD_get_interop_type_desc): New. * testsuite/libgomp.c/interop-fr-1.c: New test. * testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c: Use -6 not -5 as non-conforming device number.
Diffstat (limited to 'gcc/alias.cc')
0 files changed, 0 insertions, 0 deletions