Skip to content

Improve readability of kernel logger output - #352

Draft
Adrien-Tab wants to merge 2 commits into
kokkos:developfrom
Adrien-Tab:update-kernel-logger
Draft

Adrien-Tab wants to merge 2 commits into
kokkos:developfrom
Adrien-Tab:update-kernel-logger

Conversation

@Adrien-Tab

@Adrien-Tab Adrien-Tab commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Attempt to improve the readability of the kernel logger output

Reuse code from PR #276 to convert deviceId into an execution space name and instance number.

Example output from the Wiki case
KokkosP: Kernel Logger Library Initialized (sequence is 0, version: 20240906)
KokkosP: Entering profiling region: Initialization
KokkosP: Initialization
KokkosP:    Allocate<Host> name: A pointer: 0x7f3293dad040 size: 80000000
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 0
KokkosP:      Kokkos::View::initialization [A] via memset
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 1
KokkosP:      Kokkos::Impl::hostspace_parallel_zeromemset
KokkosP:    Execution of kernel 1 is completed.
KokkosP:    Execution of kernel 0 is completed.
KokkosP: Initialization
KokkosP:    Executing fence on device (OpenMP Instance 1) with unique execution identifier 2
KokkosP:      Kokkos::View::initialization via memset
KokkosP:    Execution of fence 2 is completed.
KokkosP: Initialization
KokkosP:    Allocate<Host> name: B pointer: 0x7f328f161040 size: 80000000
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 3
KokkosP:      Kokkos::View::initialization [B] via memset
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 4
KokkosP:      Kokkos::Impl::hostspace_parallel_zeromemset
KokkosP:    Execution of kernel 4 is completed.
KokkosP:    Execution of kernel 3 is completed.
KokkosP: Initialization
KokkosP:    Executing fence on device (OpenMP Instance 1) with unique execution identifier 5
KokkosP:      Kokkos::View::initialization via memset
KokkosP:    Execution of fence 5 is completed.
KokkosP: Initialization
KokkosP:    Allocate<Host> name: C pointer: 0x7f328a515040 size: 80000000
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 6
KokkosP:      Kokkos::View::initialization [C] via memset
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 7
KokkosP:      Kokkos::Impl::hostspace_parallel_zeromemset
KokkosP:    Execution of kernel 7 is completed.
KokkosP:    Execution of kernel 6 is completed.
KokkosP: Initialization
KokkosP:    Executing fence on device (OpenMP Instance 1) with unique execution identifier 8
KokkosP:      Kokkos::View::initialization via memset
KokkosP:    Execution of fence 8 is completed.
KokkosP: Initialization
KokkosP:    Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 9
KokkosP:      main(int, char**)::<lambda(const int&)>
KokkosP:    Execution of kernel 9 is completed.
KokkosP: Exiting profiling region: Initialization
KokkosP: Entering profiling region: MainLoop
KokkosP: Entering profiling region: Iteration
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 10
KokkosP:         AXPB
KokkosP:       Execution of kernel 10 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-reduce kernel on device (OpenMP Instance 1) with unique execution identifier 11
KokkosP:         Dot
KokkosP:       Execution of kernel 11 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing fence on device (OpenMP Instance 1) with unique execution identifier 12
KokkosP:         Kokkos::parallel_reduce: fence due to result being value, not view
KokkosP:       Execution of fence 12 is completed.
KokkosP: Exiting profiling region: Iteration
KokkosP: Entering profiling region: Iteration
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 13
KokkosP:         AXPB
KokkosP:       Execution of kernel 13 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-reduce kernel on device (OpenMP Instance 1) with unique execution identifier 14
KokkosP:         Dot
KokkosP:       Execution of kernel 14 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing fence on device (OpenMP Instance 1) with unique execution identifier 15
KokkosP:         Kokkos::parallel_reduce: fence due to result being value, not view
KokkosP:       Execution of fence 15 is completed.
KokkosP: Exiting profiling region: Iteration
KokkosP: Entering profiling region: Iteration
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 16
KokkosP:         AXPB
KokkosP:       Execution of kernel 16 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-reduce kernel on device (OpenMP Instance 1) with unique execution identifier 17
KokkosP:         Dot
KokkosP:       Execution of kernel 17 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing fence on device (OpenMP Instance 1) with unique execution identifier 18
KokkosP:         Kokkos::parallel_reduce: fence due to result being value, not view
KokkosP:       Execution of fence 18 is completed.
KokkosP: Exiting profiling region: Iteration
KokkosP: Entering profiling region: Iteration
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 19
KokkosP:         AXPB
KokkosP:       Execution of kernel 19 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-reduce kernel on device (OpenMP Instance 1) with unique execution identifier 20
KokkosP:         Dot
KokkosP:       Execution of kernel 20 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing fence on device (OpenMP Instance 1) with unique execution identifier 21
KokkosP:         Kokkos::parallel_reduce: fence due to result being value, not view
KokkosP:       Execution of fence 21 is completed.
KokkosP: Exiting profiling region: Iteration
KokkosP: Entering profiling region: Iteration
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-for kernel on device (OpenMP Instance 1) with unique execution identifier 22
KokkosP:         AXPB
KokkosP:       Execution of kernel 22 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing parallel-reduce kernel on device (OpenMP Instance 1) with unique execution identifier 23
KokkosP:         Dot
KokkosP:       Execution of kernel 23 is completed.
KokkosP: MainLoop
KokkosP:    Iteration
KokkosP:       Executing fence on device (OpenMP Instance 1) with unique execution identifier 24
KokkosP:         Kokkos::parallel_reduce: fence due to result being value, not view
KokkosP:       Execution of fence 24 is completed.
KokkosP: Exiting profiling region: Iteration
KokkosP: Exiting profiling region: MainLoop
Result: 23749996437501672161280.000000
KokkosP: Executing fence on device (OpenMP All Instances) with unique execution identifier 25
KokkosP:   Kokkos::HostSpace::impl_deallocate before free
KokkosP: Execution of fence 25 is completed.
KokkosP: Deallocate<Host> name: C pointer: 0x7f328a515040 size: 80000000
KokkosP: Executing fence on device (OpenMP All Instances) with unique execution identifier 26
KokkosP:   Kokkos::HostSpace::impl_deallocate before free
KokkosP: Execution of fence 26 is completed.
KokkosP: Deallocate<Host> name: B pointer: 0x7f328f161040 size: 80000000
KokkosP: Executing fence on device (OpenMP All Instances) with unique execution identifier 27
KokkosP:   Kokkos::HostSpace::impl_deallocate before free
KokkosP: Execution of fence 27 is completed.
KokkosP: Deallocate<Host> name: A pointer: 0x7f3293dad040 size: 80000000
KokkosP: Kokkos library finalization called.

Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
Signed-off-by: Adrien Taberner <adrien.taberner@cea.fr>
@Adrien-Tab
Adrien-Tab marked this pull request as draft October 9, 2026 07:25
@Adrien-Tab Adrien-Tab changed the title Imrove redabilty of kernel logger output. Improve readability of kernel logger output Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant