You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[OpenMP][Offload][Runtime] Add map types and map behaviour tweaks for descriptor and descriptor base address
This PR seeks to add some new modifications to the OpenMP offload runtime for Fortran descriptor types
with the behaviour being flipped on by new map type modifiers OMP_*_DESCRIPTOR and OMP_*_BASE_ADDR.
In particular it modifies the runtime to use shared memory for small descriptor allocations where
feasible (with the size breakpoint being modifiable). It also tweaks some of the mapping behaviour
around shadow pointer map back from device and always mapping for descriptors, in the latter if
a descriptor has been marked as always, we skip over the data pointer (first 8-bytes) so as not to
overwrite or otherwise modify the pointer, we leave all pointer control to the additional BASE_ADDR
mapping. The former makes sure our host pointer address is not null before we map back shadow pointers
for base addresses, with the intent to avoid re-allocation of deallocated host data from device data.
This can occur when a large allocation of a derived type with multiple allocatable components has been
mapped back in pieces and dealloacated, it's possible without these changes for the previously
deallocated pieces to be reallocated (or at least the descriptor to be tricked into thinking it's
allocated, breaking certain runtime functions around presence checking) by the shadow pointers in
map backs of subsequent components.
Co-author: Matthew Curtis <[email protected]>
0 commit comments