[all-commits] [llvm/llvm-project] 621baf: [Libomptarget] Move target table handling out of t...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Jan 22 09:06:58 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 621bafd5c14cc324612e32c8123ac1ebf1c0530b
https://github.com/llvm/llvm-project/commit/621bafd5c14cc324612e32c8123ac1ebf1c0530b
Author: Joseph Huber <huberjn at outlook.com>
Date: 2024-01-22 (Mon, 22 Jan 2024)
Changed paths:
M openmp/libomptarget/include/Shared/APITypes.h
M openmp/libomptarget/include/Shared/PluginAPI.h
M openmp/libomptarget/include/Shared/PluginAPI.inc
M openmp/libomptarget/include/device.h
M openmp/libomptarget/include/rtl.h
M openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
M openmp/libomptarget/plugins-nextgen/common/include/GlobalHandler.h
M openmp/libomptarget/plugins-nextgen/common/include/PluginInterface.h
M openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
M openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp
M openmp/libomptarget/plugins-nextgen/generic-elf-64bit/src/rtl.cpp
M openmp/libomptarget/src/PluginManager.cpp
M openmp/libomptarget/src/device.cpp
M openmp/libomptarget/src/omptarget.cpp
Log Message:
-----------
[Libomptarget] Move target table handling out of the plugins (#77150)
Summary:
This patch removes the bulk of the handling of the
`__tgt_offload_entries` out of the plugins itself. The reason for this
is because the plugins themselves should not be handling this
implementation detail of the OpenMP runtime. Instead, we expose two new
plugin API functions to get the points to a device pointer for a global
as well as a kernel type.
This required introducing a new type to represent a binary image that
has been loaded on a device. We can then use this to load the addresses
as needed. The creation of the mapping table is then handled just in
`libomptarget` where we simply look up each address individually. This
should allow us to expose these operations more generically when we
provide a separate API.
More information about the All-commits
mailing list