[Openmp-commits] [PATCH] D157996: [OpenMP][OMPT] Fix reported target pointer for data alloc callback
Michael Halkenhäuser via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 15 10:03:35 PDT 2023
mhalk added a comment.
If using `void**` as solution is despised, we could add an `updateArguments` method to `InterfaceRAII`.
That would replace the current tuple holding the arguments with a new, provided one.
void updateArguments(ArgsTy... NewArgs) {
Arguments = std::make_tuple(NewArgs...);
}
We would then call `updateArguments`, after the actual data allocation.
So, the EMI callback where `endpoint=2` will have the actual pointer value available.
void *DeviceTy::allocData(int64_t Size, void *HstPtr, int32_t Kind) {
[...]
TargetPtr = RTL->data_alloc(RTLDeviceID, Size, HstPtr, Kind);
OMPT_IF_BUILT(TargetDataAllocRAII.updateArguments(
RTLDeviceID, HstPtr, TargetPtr, Size,
/* CodePtr */ OMPT_GET_RETURN_ADDRESS(0));)
return TargetPtr;
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157996/new/
https://reviews.llvm.org/D157996
More information about the Openmp-commits
mailing list