fix(ep-bench): strip C++ template args in kineto kernel-name match - #856
Merged
Binyang Li (Binyang2014) merged 1 commit intoJul 27, 2026
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
The kineto per-kernel attribution in _kineto_kernel_us matched the "dispatch"/"combine" substring against the full demangled kernel name. The rank-major combineKernel is templated on DispatchLayout (combineKernel<.., DispatchLayout::RANK_MAJOR>), so its name contains the substring "dispatch" and was wrongly summed into the dispatch bucket. This only surfaced under --cuda-graph, where the combine kernel also appears in the dispatch profiling pass, doubling the reported dispatch kernel time (e.g. 16->32 us at 1 node). Match on the function name with template arguments stripped (text before the first "<") so DispatchLayout / CombineMode template params no longer collide.
Jie Zhang (jeseszhang1010)
force-pushed
the
qinghuazhou/patch_ep_bench_kineto_layout
branch
from
July 27, 2026 22:45
69a2da8 to
2186c42
Compare
Binyang Li (Binyang2014)
approved these changes
Jul 27, 2026
Binyang Li (Binyang2014)
deleted the
qinghuazhou/patch_ep_bench_kineto_layout
branch
July 27, 2026 23:34
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes EP kineto benchmarking’s per-kernel attribution by ensuring the dispatch/combine bucket matching is performed against the function name only, not the full demangled kernel name that may include C++ template arguments. This prevents templated combine kernels (e.g., templated on DispatchLayout::RANK_MAJOR) from being incorrectly counted as “dispatch” due to template-argument substrings, which was inflating dispatch time under --cuda-graph.
Changes:
- Strip C++ template arguments from
e.keyby taking the substring before the first"<"when matching kernel names. - Add inline documentation explaining the mis-bucketing scenario and why the stripping is safe for these kernels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The kineto per-kernel attribution in _kineto_kernel_us matched the "dispatch"/"combine" substring against the full demangled kernel name. The rank-major combineKernel is templated on DispatchLayout (combineKernel<.., DispatchLayout::RANK_MAJOR>), so its name contains the substring "dispatch" and was wrongly summed into the dispatch bucket. This only surfaced under --cuda-graph, where the combine kernel also appears in the dispatch profiling pass, doubling the reported dispatch kernel time (e.g. 16->32 us at 1 node). Match on the function name with template arguments stripped (text before the first "<") so DispatchLayout / CombineMode template params no longer collide.