Skip to content

frost(sdpa): port #585 LPT schedulers to the SM107 fp8 sibling; defaults must obey declared knob domains - #656

Open
vedaanta wants to merge 1 commit into
NVIDIA:developfrom
vedaanta:sdpa-knob-domain-honesty
Open

frost(sdpa): port #585 LPT schedulers to the SM107 fp8 sibling; defaults must obey declared knob domains#656
vedaanta wants to merge 1 commit into
NVIDIA:developfrom
vedaanta:sdpa-knob-domain-honesty

Conversation

@vedaanta

@vedaanta vedaanta commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Fixes #653.

Two changes that are one rule: a scheduler the served kernel cannot decode must be unreachable — whether requested or defaulted.

1. The #585 port (the bug fix)

#585 landed the LPT/LPT_L2 tile schedulers in prefill_d128_fp8_sm100.py, but the hunk-symmetric port to the SM107 sibling was never done. The adapter's auto causal sched policy picks SCHED_LPT_L2, the sibling's decode guard refuses, and every causal/masked per-tensor FP8 graph on cc10.7 failed plan build (29 of 33 suite cases). Ported position-for-position with the SM100 file: qh_per_kh/seqlen_kv threaded through the five warp groups and appended at all ten scheduler decode call sites.

2. Domain honesty end to end

  • Both fp8 kernel files declare SUPPORTED_SCHED_POLICIES — decode truth at the source.
  • The adapter gains _sm100_sched_domain(); check_support now admits explicit NATURAL/LPT/LPT_L2 requests (was NATURAL-only — under-declared while the lowering auto-picked LPT), and the causal defaulting heuristic clamps its pick into the served route's domain, falling back to NATURAL. A default may never be a value the route could not honor as an explicit request — the invariant that turns this bug class into a clean fallback.
  • The three SM100-family engine rows declare the true request domain {NATURAL, LPT, LPT_L2} (previously {NATURAL} — dishonest in both directions). SM120 rows untouched.
  • frost/README knob-channel section documents the rule.

3. Sibling-lockstep fences (test_sdpa_fp8_sibling_parity.py)

Third silent-drift incident for this kernel pair (#574 signature skew, #602 amax ABI, #585/#653). The fences: source-scan tests (no GPU/DSL — run in any CI) assert every decode call site carries the LPT args and the sched-domain constants match; module tests assert compile() signatures in lockstep, kernel domains == adapter table, and CFG divergence is exactly the intentional Rubin set {TILE_K_HW_BMM1, TILE_K_HW_BMM2, STAGES_KV}. Negative-tested: removing one call site's args turns the fence red.

Testing

  • SM100 (cc10.0): 40 passed — 5 parity + 2 routing + 33 fp8 e2e (unchanged behavior; LPT paths exercised as before).
  • Rubin (cc10.7, w2u1g board): 33/33 fp8 e2e — the suite that fails 29/33 at develop tip — plus 7/7 parity+routing. Causal/BR/SWA per-tensor FP8 now runs LPT-scheduled on sm107 silicon.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Expanded scheduler support for SM100 and SM107 FP8 attention routes, including natural, LPT, and L2-grouped LPT policies.
    • Improved causal scheduling fallback when a selected policy is unavailable.
    • Added SM107 FP8 configuration support for dense processing and grouped-query attention.
  • Bug Fixes

    • Prevented invalid route-specific defaults from causing undecodable plans.
  • Tests

    • Added parity checks to keep sibling FP8 routes, scheduling options, and configurations synchronized.

…ing; defaults must obey declared knob domains (fixes NVIDIA#653)

Two changes that are one rule: a scheduler the served kernel cannot decode
must be impossible to reach — whether requested or defaulted.

1. NVIDIA#585 port (fixes NVIDIA#653): the LPT/LPT_L2 tile schedulers landed in
   prefill_d128_fp8_sm100.py but the hunk-symmetric port to the SM107
   sibling was never done, so the adapter's auto causal sched policy picked
   SCHED_LPT_L2 and every causal/masked per-tensor FP8 graph on cc10.7
   failed plan build (29 of 33 suite cases). Ported: qh_per_kh/seqlen_kv
   threaded through the five warp groups and appended at all ten scheduler
   decode call sites, mirroring the SM100 file position for position.

2. Domain honesty end to end:
   - Both fp8 kernel files declare SUPPORTED_SCHED_POLICIES (decode truth
     at the source).
   - The adapter gains _sm100_sched_domain(); check_support now admits
     explicit NATURAL/LPT/LPT_L2 requests (was NATURAL-only — under-
     declared), and the causal defaulting heuristic CLAMPS its pick into
     the served route's domain, falling back to NATURAL. A default may
     never be a value the route could not honor as an explicit request.
   - The three SM100-family engine rows declare the true request domain
     {NATURAL, LPT, LPT_L2} (previously {NATURAL} while the lowering
     auto-picked LPT — dishonest in both directions). SM120 rows untouched.
   - frost/README knob-channel section documents the rule.

3. Sibling-lockstep fences (test_sdpa_fp8_sibling_parity.py): source-scan
   tests (no GPU/DSL needed) assert every decode call site carries the LPT
   args and the sched-domain constants match; module tests assert compile()
   signatures in lockstep (NVIDIA#574's fence), kernel domains == adapter table,
   and CFG divergence is exactly the intentional Rubin set
   {TILE_K_HW_BMM1, TILE_K_HW_BMM2, STAGES_KV}. Negative-tested: removing
   one call site's args turns the fence red.

SM100 box: 40 passed (5 parity + 2 routing + 33 fp8 e2e). Rubin board
validation of the causal suite to follow on the PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vedaanta vedaanta added cat-bug Reports of incorrect behavior, crashes, regressions, or unexpected results. orig-nv-eng Reported or requested by NVIDIA engineering. mod-cutedsl CuTeDSL kernels, generated kernels, examples, or related integration work. mod-frost labels Aug 19, 2026
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a7aaa40a-8d64-404e-a387-69de0ee27203

📥 Commits

Reviewing files that changed from the base of the PR and between f2638ba and f418fd8.

📒 Files selected for processing (6)
  • python/cudnn/frost/README.md
  • python/cudnn/sdpa/fwd/api_dsl.py
  • python/cudnn/sdpa/fwd/engines.py
  • python/cudnn/sdpa/fwd/kernels/prefill_d128_fp8_sm100.py
  • python/cudnn/sdpa/fwd/kernels/prefill_d128_fp8_sm107.py
  • test/python/sdpa/frost/test_sdpa_fp8_sibling_parity.py

Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

SM100 and SM107 FP8 SDPA routes now support matching natural, LPT, and LPT_L2 scheduler domains. The SM107 kernel receives required decode parameters across its execution paths. GPU-independent tests enforce sibling parity and routing consistency.

Changes

FP8 scheduler parity

Layer / File(s) Summary
Scheduler domains and engine capabilities
python/cudnn/sdpa/fwd/api_dsl.py, python/cudnn/sdpa/fwd/engines.py
SM100 route validation and engine specifications now support natural, LPT, and LPT_L2 policies. Causal compilation falls back to natural scheduling when needed.
Sibling kernel declarations and decode propagation
python/cudnn/sdpa/fwd/kernels/prefill_d128_fp8_sm100.py, python/cudnn/sdpa/fwd/kernels/prefill_d128_fp8_sm107.py
Both kernels declare matching scheduler domains. The SM107 kernel propagates qh_per_kh and seqlen_kv through tile decoding and warp-group dispatch paths.
Parity contract and validation
python/cudnn/frost/README.md, test/python/sdpa/frost/test_sdpa_fp8_sibling_parity.py
The documented contract covers route-specific defaults and synchronized domains. Tests check decode arguments, scheduler domains, compile signatures, adapter routing, and approved configuration differences.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: ⚪ Minimal · up to f418f

The PR ports the scheduler behavior, aligns declared domains and defaults, and adds parity coverage; no actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

Suggested reviewers: aneureka

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the SM107 FP8 scheduler port and scheduler-domain default fix.
Description check ✅ Passed The description explains the changes, rationale, related issue, API impact implicitly, and detailed test results, but omits template headings and checklist items.
Linked Issues check ✅ Passed The PR ports LPT and LPT_L2 scheduling to SM107, threads required arguments, and reports successful cc10.7 causal, BR, and SWA validation for issue #653.
Out of Scope Changes check ✅ Passed The adapter, engine, documentation, and sibling-parity test changes directly support scheduler-domain consistency and the SM107 fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@Anerudhan

Copy link
Copy Markdown
Collaborator

Needs conflict resolution/CI etc.

@Anerudhan Anerudhan added this to the Frontend 1.29.0 milestone Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat-bug Reports of incorrect behavior, crashes, regressions, or unexpected results. mod-cutedsl CuTeDSL kernels, generated kernels, examples, or related integration work. mod-frost orig-nv-eng Reported or requested by NVIDIA engineering.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frost(sdpa): SM107 fp8 sibling missing the #585 LPT_L2 scheduler port — all causal fp8 declines on Rubin

2 participants