Skip to content

Caliper: Annotate kernels separately - #695

Merged
MrBurmark merged 23 commits into
developfrom
multi-kernel-regions
Aug 10, 2026
Merged

Caliper: Annotate kernels separately#695
MrBurmark merged 23 commits into
developfrom
multi-kernel-regions

Conversation

@michaelmckinsey1

@michaelmckinsey1 michaelmckinsey1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • This PR is additional Caliper regions for RAJAPerf kernels that have multiple kernel launches.
  • It does the following (modify list as needed):
    • Adds additional Caliper regions at the request of @pearce8
  • There is currently no synchronize for these regions for asynchronous GPU kernels. But these should be profiled with CUDA/HIP events anyway, which do not need CPU synchronization to measure GPU time.
  • RAJA::launch or RAJA::forall kernels are annotated using the RAJA Caliper plugin
  • add function types to be able to filter out kernels instead of type=function -> type=subkernel [1]
  • Update documentation for naming convention

Examples

Polybench_JACOBI_1D has one launch per rep for poly_jacobi_1D_1 and one for poly_jacobi_1D_2. So its tree will now profile each separately:
image

POLYBENCH_FLOYD_WARSHALL, HALO_PACKING, HALO_EXCHANGE all have variable amount of launches, so we will append _k instead of adding k regions to the tree
image

image image

All kernels with only 1 launch per rep are unchanged.

[1] how to filter subkernels at runtime

raja-perf.exe --atcc "exclude_attributes=subkernel"

Then subkernels will be excluded:
image

Caveat for this method is that if profiling API functions, like HIP or MPI the subkernel regions will no longer be excluded if they have API functions.

@michaelmckinsey1 michaelmckinsey1 self-assigned this Jun 24, 2026
@michaelmckinsey1
michaelmckinsey1 requested a review from pearce8 June 26, 2026 19:49
@michaelmckinsey1 michaelmckinsey1 changed the title [WIP] Annotate kernels separately Annotate kernels separately Jun 26, 2026
@michaelmckinsey1
michaelmckinsey1 marked this pull request as ready for review June 26, 2026 19:49
@michaelmckinsey1
michaelmckinsey1 marked this pull request as draft June 26, 2026 21:04
@michaelmckinsey1

Copy link
Copy Markdown
Contributor Author

made a draft because need to add different types to these regions so we can filter them with caliper

Comment thread src/apps/ENERGY-Cuda.cpp
@michaelmckinsey1
michaelmckinsey1 requested a review from artv3 July 7, 2026 22:37
@michaelmckinsey1 michaelmckinsey1 changed the title Annotate kernels separately Caliper: Annotate kernels separately Jul 7, 2026
@michaelmckinsey1
michaelmckinsey1 marked this pull request as ready for review July 8, 2026 18:00

@rhornung67 rhornung67 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @michaelmckinsey1

@michaelmckinsey1 michaelmckinsey1 added this to the July 2026 Release milestone Jul 28, 2026
@michaelmckinsey1

michaelmckinsey1 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@MrBurmark @artv3 @rhornung67
I added one new commit since this was approved adebe6c. I noticed while testing for many different variants there were missing annotations. For example, the RAJA variant would be annotated but not Base and Lambda. This commit did not annotate any new kernels. This happened because I was using an LLM to apply the annotations and apparently, despite giving manual examples and describing that there are different variants, it has a really difficult time identifying that the annotations should be applied uniformly across the variants (this surprised me since I thought it would be trivial).

Also it is now rebased on #700

Comment thread docs/sphinx/dev_guide/kernel_class_impl.rst Outdated
Comment thread docs/sphinx/dev_guide/kernel_class_impl.rst Outdated
@MrBurmark
MrBurmark enabled auto-merge August 7, 2026 18:20
@MrBurmark
MrBurmark merged commit 338cfeb into develop Aug 10, 2026
23 checks passed
@MrBurmark
MrBurmark deleted the multi-kernel-regions branch August 11, 2026 16:27
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.

4 participants