[Openmp-commits] [PATCH] D95282: [OpenMP] Add source location information to the libomptarget profile
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 27 19:28:44 PST 2021
jdoerfert added inline comments.
================
Comment at: openmp/libomptarget/src/omptarget.cpp:217
TargetDataFuncPtrTy target_data_function) {
+ TIMESCOPE_WITH_IDENT(loc);
DP("Calling the mapper function " DPxMOD "\n", DPxPTR(arg_mapper));
----------------
grokos wrote:
> I see some inconsistency here. `targetDataMapper` is an internal libomptarget function (not an API function) and yet it is getting profiled. Same for `targetDataContiguous` and `targetDataNonContiguous`. The other 3 internal data-related functions `targetDataBegin`, `targetDataEnd` and `targetDataUpdate` are not. Is this intentional?
Kind of.
There are a few options:
1) Simply profile the interface. We did this at first. The problem is the `omp target` entry point does 3 things and it is not too helpful to merge the results of h2d, kernel, and d2h, into a single number (IMHO).
2) Profile the interface and some internal functions. This is not a bad solution but it is unclear what we gain by also profiling the interface at that point.
3) What I tried to do here is to pick the functions that correspond to conceptual tasks, like h2d/d2h, kernel execution (which is not a function but scope with name in `target` below), ..., and then profile those.
Long story short, we can discuss this in the meeting at some point and I'm happy for improvement patches :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95282/new/
https://reviews.llvm.org/D95282
More information about the Openmp-commits
mailing list