Hi folks!
The SimpleKernelTimer is very handy for quick profilings, but I find the output hard to read when profiling regions are nested. Consider the following code example:
Kokkos::Profiling::pushRegion("MyKokkosApp");
Kokkos::Profiling::pushRegion("Initialization");
// ...
Kokkos::Profiling::popRegion();
Kokkos::Profiling::pushRegion("Solve");
// ...
Kokkos::Profiling::pushRegion("Foo");
// ...
Kokkos::Profiling::popRegion();
// ...
Kokkos::Profiling::pushRegion("Bar");
// ...
for (int i=0; i < N; ++i){
Kokkos::Profiling::pushRegion("BarLoop");
// ...
Kokkos::Profiling::popRegion();
}
// ...
Kokkos::Profiling::popRegion();
// ...
Kokkos::Profiling::popRegion();
Kokkos::Profiling::popRegion();
The output show currently shows all the regions as one big flat list, which is hard to analyze. It be much clearer if the formatting took into account the hierarchical structure of the regions. The output could look something like the following:
(Type) Total Time, Call Count, Avg. Time per Call, %Total Time in Kernels, %Total Program Time
-------------------------------------------------------------------------
Regions:
+ MyKokkosApp
| (REGION) ...
| + Solve
| | (REGION) ...
| | + Bar
| | | (REGION) ...
| | | - BarLoop
| | | (REGION) ...
| | | - Other
| | | (REGION) ...
| | - Foo
| | (REGION) ...
| | - Other
| | (REGION) ...
| - Initialization
| (REGION) ...
| - Other
| (REGION) ...
What do you think of this?
Hi folks!
The
SimpleKernelTimeris very handy for quick profilings, but I find the output hard to read when profiling regions are nested. Consider the following code example:The output show currently shows all the regions as one big flat list, which is hard to analyze. It be much clearer if the formatting took into account the hierarchical structure of the regions. The output could look something like the following:
What do you think of this?