[Ops] Rewrite NPU chunk_scaled_dot_kkt_fwd#1023
Open
OsirisDuan wants to merge 2 commits into
Open
Conversation
OsirisDuan
force-pushed
the
260714/chunk_scaled_dot_kkt_fwd_kernel_perf_opti
branch
from
July 16, 2026 09:35
7fa48f0 to
6135b98
Compare
OsirisDuan
force-pushed
the
260714/chunk_scaled_dot_kkt_fwd_kernel_perf_opti
branch
from
July 17, 2026 10:08
6135b98 to
3800d90
Compare
Contributor
Author
|
@zheliuyu Please review this PR. |
zheliuyu
reviewed
Jul 17, 2026
Comment on lines
+33
to
+42
| @triton.autotune( | ||
| configs=[ | ||
| triton.Config({'BK': BK}, num_warps=num_warps, num_stages=num_stages) | ||
| for BK in [32, 64, 128] | ||
| for num_warps in [2, 4, 8] | ||
| for num_stages in [2, 3, 4] | ||
| ], | ||
| key=['H', 'HV', 'K', 'BT', 'IS_VARLEN'], | ||
| **autotune_cache_kwargs, | ||
| ) |
Contributor
There was a problem hiding this comment.
blocking: full [BT,BT] + autotune BK≤128 drops the UB-aware sizing used elsewhere (#1001). Fine if faster, but please clamp/filter configs or confirm the UB envelope on 910B/C so we don’t hit intermittent UB/compile failures outside the bench shapes.
Contributor
There was a problem hiding this comment.
nit: on triton-ascend, num_warps/num_stages are ignored (see Ascend docs /
"[WARNING] Please DO NOT tune arg ..."). Prefer autotuning BK only (and maybe
multibuffer) to avoid a 3×3 wasted search.
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.
summary
Ascend core occupancy.
of iterating BC=16 subchunks, reducing tl.dot launches.
sizing to @triton.autotune over BK={32,64,128}.
unit-stride block pointers. Drop _launch_kkt_kernel and _get_bk helpers.
benchmark
python benchmarks/ops/run.py --op chunk_gdn