[Openmp-commits] [PATCH] D113833: [OpenMP][WIP] Refactor global handling in plugins
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Nov 13 13:54:10 PST 2021
JonChesterfield added a comment.
Discussed a bit offline. I'd like to keep the capability to read/write to symbols in the device images, without first having to load the image onto the device and then call into cuda/hsa/etc to access the values that were originally in host memory. readGlobalFromImage exists in this patch, writeGlobalToImage would be very similar in implementation.
Comment at: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:1231
// the device_State array is either large value in bss or a void* that
// needs to be assigned to a pointer to an array of size device_state_bytes
The memory optimisation that allocated omptarget_nvptx_device_State one per process instead of once per device image is obsolete with the new runtime
Comment at: openmp/libomptarget/plugins/common/GlobalHandler/GlobalHandler.h:91
+/// Helper class to do the heavy lifting when it comes to moving globals between
+/// host and device. Through the DeviceInterfaceTy we access memcpyDtoH and
Confusing naming here - coping globals / copying from global symbols?
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the Openmp-commits