Caliper
Caliper copied to clipboard
Caliper support for builtin Kokkos Tools (continued)
@ibaned @crtrott This is continuation/extension of https://github.com/LLNL/Caliper/pull/397 by @DavidPoliakoff
Status
- Done:
- [x] Support for configuration string in
cali::get_event_set()
- [x] Minor fixes
- [x] Support for configuration string in
- Done by @DavidPoliakoff in https://github.com/LLNL/Caliper/pull/397:
- [x] Expose Kokkos
EventSet
viacali::get_event_set()
for flexible KokkosTools integration.
- [x] Expose Kokkos
Example
See full example that connects Caliper to Kokkos via KokkosTools - using proposed EventSet
-based approach:
int main(int argc, char *argv[]) {
auto eventSet = KokkosTools::get_event_set("caliper",
"runtime-report(profile.kokkos)");
Kokkos::Tools::Experimental::set_callbacks(eventSet);
Kokkos::initialize(argc, argv);
// ... run app ... //
Kokkos::finalize();
return 0;
}
Should cali::get_event_set()
be exposed in a Caliper header ?
If so, which one would be the best for that ?
Hi @MikolajZuzek , thanks for working on this.
Should
cali::get_event_set()
be exposed in a Caliper header ? If so, which one would be the best for that ?
If it only ever needs to be called from the Kokkos library we can probably just extern
it. If it needs to be in a header it's probably best of in its own, like cali_kokkos.h
.
For the functions themselves: I think it would be better to name them cali::get_kokkos_event_set
and cali::set_kokkos_cali_config()
to make it more explicit that they're for Kokkos.
Hi @daboehme!
Thank you for your answer and suggestions. My apologies for the delay on this reply.
I renamed the functions to what you've suggested, rebased this PR on current master
and added some fixes for MSVC.
Let me convert this PR to draft for now: I guess it'll only make sense to merge it together or after https://github.com/kokkos/kokkos-tools/pull/131.
Let me convert this PR to draft for now: I guess it'll only make sense to merge it together or after kokkos/kokkos-tools#131.
Ok, sounds good. Let me know when this is ready to go in.