[Model][Perf] Enable Inkling SplitKV on SM90 - #53317
Open
NVShreyas wants to merge 1 commit into
Open
Conversation
Use the existing adaptive FA4 split heuristic on Hopper instead of forcing global Inkling attention to run unsplit. Assisted-by: OpenAI Codex Signed-off-by: Shreyas Misra <shreyasm@nvidia.com>
NVShreyas
requested review from
AndreasKaratzas,
DarkLight1337 and
ywang96
as code owners
August 21, 2026 20:50
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.
Purpose
Inkling's global FA4 relative-attention path currently forces
num_splits=1on SM90. For TP8 decode, that leaves too few CTAs to occupy an H200 when the
runtime batch is small.
This PR removes the SM90 unsplit override and lets Hopper use the existing
adaptive SplitKV heuristic. Local attention remains unsplit. The unit coverage
now checks the resulting SM90 schedule for the production TP8-local shape with
Q=1 and Q=2.
This does not duplicate #51416. That PR adds general SM90 FA4 Dense/MLA
integration and does not modify Inkling's specialized relative-attention op or
its split heuristic.
H200 microbenchmark
The existing Inkling FA4 forward-plus-combine path was measured on one H200 with the TP8-local shape: 4 query heads, 1 KV head, head dimension 128,
BF16, batch 1, and Q in {1, 2}. Each arm used two opposite-order rounds, three
warmups per round, and ten timed samples per round.
This supports the existing
max_splits=128cap and CTA targets on SM90.All microbenchmark outputs passed the unsplit-reference correctness gate. The
worst absolute difference was 0.0002441 and the worst relative L2 was 0.003123.
End-to-end serving
Configuration:
thinkingmachines/Inkling-Small-NVFP4, H200x8 TP8, 64K ISL(6.4K new + 57.6K reused), 400 OSL, MTP with synthetic acceptance length 1.80,
and concurrency 32.
Two full concurrency sweeps also compared the existing adaptive heuristic
against a workload-specific tuned split table:
geometric mean.
throughput geometric mean.
These comparisons support using the existing general heuristic instead of a
model/workload-specific split table.
Test Plan
.venv/bin/python -m pytest \ tests/models/inkling/test_fa4_rel_attention.py -k 'num_splits' -vThe commit hooks also ran Ruff check/format, mypy, SPDX, forbidden-import, and
repository policy checks on the change.
Test Result
AI assistance was used to prepare the code, tests, benchmark analysis, and PR
description.
Essential Elements of an Effective PR Description Checklist