axom
axom copied to clipboard
Adds annotations API and macros to axom
Summary
- This PR is a feature
- It adds an
annotations
API to support profiling in Axom - It relies on caliper for performance profiling and adiak for capturing metadata
- It replaces the old performance profiling macros (
AXOM_PERF_MARK_{SECTION,FUNCTION}
) with new ones-
AXOM_ANNOTATE_BEGIN(name)
-- begins an annotation region -
AXOM_ANNOTATE_END(name)
-- ends an annotation region -
AXOM_ANNOTATE_SCOPE(name)
-- begins an annotation region that will automatically end at the end of the current scope -
AXOM_ANNOTATE_METADATA(key,value,category)
-- adds a key/value pair of metadata to the run - Note: Due to how
AXOM_PERF_MARK_SECTION
was implemented, this adds a bunch of whitespace changes. I'd suggest reviewing with GitHub's "Hide Whitespace"
-
- It incorporates annotations into a few quest examples --
quest_containment
,shaping
andquest_marching_cubes
- We can add these to more of axom in follow-up PRs.
- Also adds simple RAII wrapper classes for intializing/finalizing MPI (
axom::utilities::raii::MPIWrapper
) and the annotations (axom::utilities::raii::AnnotationsWrapper
) and incorporates them into a few examples.- We can add these to more of axom in follow-up PRs.
- Resolves #142
TODO:
- [ ] Check if
core
still needs an explicit dependency onnvToolsExt
, of if this dependency now comes fromcaliper
(when available) - [ ] Add examples of annotations output
- [ ] ... with
report
service, - [ ] ... with the
counts
service - [ ] ... with the
nvtx
service
- [ ] ... with
- [ ] I got this running with the
roctx
service, but had trouble viewing the results (w/ chrome's profiler and with perfetto). We should probably resolve this in a follow up PR. I added a[email protected]
host-config on rzvernal to see if a newer version would help, but it did not.
I will add a follow-up documentation PR after these changes have been reviewed/accepted.