Skip to content

Add native SM100 d192/d128 SDPA fprop kernel for DSv3 MLA - #488

Merged
vedaanta merged 1 commit into
NVIDIA:developfrom
adshen:adshen/d192-mla-sm100-gh
Aug 5, 2026
Merged

Add native SM100 d192/d128 SDPA fprop kernel for DSv3 MLA#488
vedaanta merged 1 commit into
NVIDIA:developfrom
adshen:adshen/d192-mla-sm100-gh

Conversation

@adshen

@adshen adshen commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Before submitting

  • I agree to license this contribution under the terms of LICENSE.txt.
  • I ran pre-commit run and committed any formatting changes.

Affected area

FE OSS kernels or CuTeDSL

Summary

This PR adds a native SM100/Blackwell FROST DSL SDPA forward kernel for the DSv3 MLA logical shape:

  • D_QK = 192
  • D_V = 128
  • BF16 and FP16 input/output
  • Dense prefill path using the CGA2 classic pipeline

The implementation extends the existing SM100 d=128 classic forward pipeline for the logical 192/128 shape instead of selecting a padded d=256 flavor.

The change:

  • Adds prefill_d192_d128_f16_sm100.py.
  • Adds CfgD192 and make_cfg_d192.
  • Adds a d192/d128 engine capability row and API flavor route.
  • Adds d192/d128 correctness and graph-analyzer coverage.
  • Allocates a stable engine-ID offset for the d192/d128 route.
  • Keeps the existing d128, d256, and d512 kernels unchanged.
  • Keeps d192/d128 wait and scheduling tuning local to the new kernel.

Why

DSv3 MLA uses Q/K head dimension 192 and V/O head dimension 128. Selecting the existing d256 envelope performs unnecessary padded work. A native logical-shape kernel reduces duration while preserving high compute utilization.

For top-left causal S=8192, the native kernel reaches 87.09% Compute SOL and 820.0 useful TFLOPS. Against an exact d256 padded-work proxy, it is approximately 1.50x faster by both duration and useful TFLOPS.

Related issues

None.

API and compatibility impact

  • No new public Python or C++ API.
  • Adds a new internal FROST engine flavor for D_QK=192, D_V=128 on SM100.
  • Existing d128, d256, and d512 routing and kernel implementations are unchanged.
  • Unsupported graph shapes continue to fall through to existing eligible engines.
  • Requires the existing CuTeDSL optional dependency path. Performance measurements below used CUTLASS DSL 4.7.0a0.

Testing

Formatting and syntax:

pre-commit run --files \
  python/cudnn/sdpa/fwd/api_dsl.py \
  python/cudnn/sdpa/fwd/config_sm100.py \
  python/cudnn/sdpa/fwd/engine.py \
  python/cudnn/sdpa/fwd/engines.py \
  python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py \
  test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py \
  test/python/sdpa/frost/test_sdpa_graph_analyzer.py

Result: passed. The new kernel was also checked with python3 -m py_compile.

Targeted test coverage:

pytest test/python/sdpa/frost/test_sdpa_graph_analyzer.py::test_probe_envelope_mixed_dims_pick_covering_flavor
pytest test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py -k d192_d128

Local SM100 validation results:

  • Graph analyzer plus FP16/BF16 dense/causal execution: 5/5 passed.
  • Expanded BF16/FP16 top-left, bottom-right, and no-mask matrix: 18/18 passed.
  • The expanded matrix includes non-tile-aligned sequence lengths.
  • The selected execution flavor was [192, 128].
  • GQA/MQA, SWA/padding/sinks, and THD/varlen were not part of the expanded performance audit and continue to use existing routing constraints.

Post-port verification from a clean editable build of this GitHub branch:

  • The two targeted commands above passed: 5/5.
  • The Blackwell FROST gate scope was also run locally with four pytest workers: test/python/sdpa/frost test/python/test_mhas_v2.py.
  • FROST SDPA result: 357 passed, 36 skipped, 0 failed. The d192/d128 FROST route executed 54 graphs.
  • test_mhas_v2.py result on the local cuDNN 9.21.1 backend: 1862 passed, 907 skipped, 116 failed. All failures were native FP8/MXFP8 backward cases outside this forward-kernel diff. Validation against the current development backend is pending the repository CI bot run.

Performance methodology

  • GPU: NVIDIA GB100, SM100.
  • CUTLASS DSL: 4.7.0a0.
  • Data type: BF16.
  • Shape: B=2, Hq=128, Hkv=128, D_QK=192, D_V=128.
  • Nsight Compute: base clock control, launch skip 3, five measured launches per row.
  • Observed SM clock: approximately 0.842-0.846 GHz.
  • Absolute durations should not be compared with measurements taken at higher SM clocks.
  • All 12 native rows were rerun from the final executable source. The 8192 rows also received independent 15-launch confirmations.

Native d192/d128 SOL by mask and size

mask S_q x S_kv NCU duration (us) Compute SOL % useful TFLOPS Memory SOL % observed SM clock (GHz)
top_left 2048x2048 605.89 71.63 567.4 24.88 0.842494
top_left 4096x4096 1914.39 81.04 718.1 25.13 0.844062
top_left 4096x8192 1912.75 81.05 718.7 25.05 0.844523
top_left 8192x8192 6705.18 87.09 820.0 24.78 0.844778
bottom_right 2048x2048 610.30 71.27 563.3 24.95 0.841870
bottom_right 4096x4096 1921.86 80.72 715.3 26.46 0.844645
bottom_right 4096x8192 4863.84 88.22 847.8 24.34 0.845300
bottom_right 8192x8192 6731.40 86.86 816.8 24.69 0.844461
no_mask 2048x2048 844.88 81.60 813.4 26.78 0.842525
no_mask 4096x4096 3140.58 87.43 875.2 25.90 0.845509
no_mask 4096x8192 6096.22 90.02 901.8 24.45 0.845652
no_mask 8192x8192 12168.19 90.24 903.6 24.45 0.845123

Comparison against an exact d256 proxy

Before this change, logical 192/128 used a d256 envelope. The controlled reference below is a separate exact 256/256 run used as a padded-work proxy, not a direct logical 192/128 fallback execution. For DSv3 useful work, (192 + 128) / (256 + 256) = 0.625 of the proxy work is useful.

For top-left causal S=8192:

implementation selected flavor NCU duration (us) raw Compute SOL % useful SOL % useful TFLOPS
exact d256 proxy 256 10054.18 88.27 55.17 546.9
native d192/d128 192 6705.18 87.09 87.09 820.0

The native d192/d128 path is approximately 1.50x faster for this case by both duration and useful TFLOPS. This is a proxy estimate rather than a direct fallback A/B measurement.

Existing exact-shape kernel reference

These rows are not direct apples-to-apples comparisons because the logical head dimensions differ. They provide context for current SM100 FROST forward SOL at S=8192.

kernel logical D_QK/D_V mask S NCU duration (us) Compute SOL % Memory SOL % observed SM clock (GHz)
d128 existing 128/128 top_left 8192 7107.26 70.81 16.31 0.845617
d128 existing 128/128 bottom_right 8192 7152.97 70.47 16.24 0.845366
d128 existing 128/128 no_mask 8192 12454.32 75.81 17.37 0.845729
d256 existing 256/256 top_left 8192 10054.18 88.27 26.74 0.846004
d256 existing 256/256 bottom_right 8192 9985.62 88.80 26.71 0.846018
d256 existing 256/256 no_mask 8192 18153.50 94.73 26.36 0.845069
d512 existing 512/512 top_left 8192 26346.53 69.66 37.68 0.844959
d512 existing 512/512 bottom_right 8192 26306.23 69.78 37.75 0.844902
d512 existing 512/512 no_mask 8192 48453.82 73.00 38.43 0.844599

Optimization notes

The final 15-launch 8192x8192 confirmations were:

  • Top-left: 87.097443% Compute SOL / 6.705419 ms.
  • Bottom-right: 86.861660% Compute SOL / 6.729591 ms.
  • No-mask: 90.255379% Compute SOL / 12.165702 ms.

Deep profiling reported zero local/shared spills for all three mask paths, 128 registers per thread, and approximately 25% achieved occupancy. The gains below are context-dependent and are not additive.

Applied optimization Compute SOL evidence Retained gain
Replace the local inline-PTX wait with generic CuTeDSL wait lowering 75.6858% -> 80.2006% +4.5148 pt
Use the no-time mbarrier_wait_parity(..., TRY) loop instead of the timed generic wait 84.484424% -> 85.747026% +1.2626 pt
Pass the phase directly instead of warp-uniformizing it 85.055622% -> 85.747026% +0.6914 pt
Force the D192 scheduler to LPT instead of NATURAL 82.275626% -> 85.747026% +3.4714 pt
Use the D128-derived causal register split 192/88 instead of 200/72 85.179120% -> 85.741305% +0.5622 pt
Increase the TMA-LDG producer-loop unroll from 3 to 6 85.449759% -> 85.741305% +0.2915 pt
Add the sched_res_busy_xu64 region together with --ptxas-options -uumn 84.008995% -> 84.402966% +0.3940 pt (coupled pair)
Extend the XU region from P-only work to online max/alpha/stat plus P exp2/store 85.468947% -> 85.880816% +0.4119 pt
Use 4x LDTM.x32 for causal unmasked segments while retaining 2x LDTM.x64 for pure no-mask causal: 84.868992% -> 85.880816%; no-mask x32/x64: 41.750872% -> 86.205275% +1.0118 pt causal; avoids 470M no-mask spill requests
Run one full-row max tree after concatenation instead of four chunk-local max trees 85.279139% -> 85.880816% +0.6017 pt
Use FenceInterference rather than FenceCode for P chunk-0 publication 86.881162% -> 87.094033% +0.2129 pt; 0.338% faster
Keep FenceCode on P chunk-1 publication no-mask: 89.811894% -> 89.850968%; bottom-right: 86.760661% -> 86.859571% +0.0391 / +0.0989 pt
Fence both steady-state BMM2-done publications 86.195711% -> 87.097443% +0.9017 pt; 1.195% faster
Specialize pure no-mask softmax/correction registers from 192/88 to 216/40 89.150040% -> 90.255379% +1.1053 pt; 1.235% faster

Final-context leave-one-out checks confirmed the dual BMM2-done fences and the no-mask 216/40 register split. A previously promising BMM1-done fence was removed after the BMM2 fences subsumed its gain, and no-mask producer unroll 7 was removed after the 216/40 split made unroll 6 faster again. The no-mask route retains the x64 zero-spill lowering and uses 216/40; causal paths use 192/88.

Port the validated d192/d128 FROST kernel, routing, configuration, scheduler fixes, and correctness coverage onto GitHub develop.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

SM100 SDPA flavor selection now supports (D_QK, D_V) envelopes. The PR adds a d192/d128 configuration, engine specification, CUTLASS DSL kernel, launcher support, and coverage tests for dense and causal FP16/BF16 execution.

Changes

SM100 d192/d128 SDPA support

Layer / File(s) Summary
Asymmetric flavor and configuration
python/cudnn/sdpa/fwd/api_dsl.py, python/cudnn/sdpa/fwd/config_sm100.py
Flavor selection now uses QK/V dimension envelopes. CfgD192 validates and constructs the d192/d128 configuration.
Engine naming and registration
python/cudnn/sdpa/fwd/engine.py, python/cudnn/sdpa/fwd/engines.py
Engine names encode asymmetric dimensions. SM100 coverage includes the d192/d128 engine with a fixed identifier offset.
d192/d128 kernel execution
python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py
The new kernel supports dense and THD inputs, masks, TMA transfers, collective MMA, online softmax, correction, normalization, and compilation validation.
Engine and kernel validation
test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py, test/python/sdpa/frost/test_sdpa_graph_analyzer.py
Tests cover dense and causal FP16/BF16 execution and verify native d192/d128 engine selection.

Estimated code review effort: 5 (Critical) | ~90 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SDPA_Test
  participant EngineSelection
  participant SDPA_API
  participant D192Kernel
  participant ReferenceSDPA
  SDPA_Test->>EngineSelection: request d_qk=192, d_v=128
  EngineSelection->>SDPA_API: select d192/d128 flavor
  SDPA_API->>D192Kernel: compile and launch kernel
  D192Kernel-->>SDPA_Test: return O and LSE
  SDPA_Test->>ReferenceSDPA: compute reference output
  ReferenceSDPA-->>SDPA_Test: return expected output
Loading

Possibly related PRs

Suggested labels: cat-feature, orig-nv-eng

Suggested reviewers: anerudhan

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 53.13% 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
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: adding a native SM100 d192/d128 SDPA forward kernel for DSv3 MLA.
Description check ✅ Passed The description covers all required sections with clear scope, rationale, compatibility impact, related issues, testing results, and performance data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py (2)

1539-1539: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove the unused local and mark the unused decode result.

Line 1539 assigns P_COLS_PER_CHUNK in _softmax_warp_group, but the function never reads it. The value is recomputed inside _softmax_kv_body at line 1312. Line 1687 also unpacks head_idx, which _softmax_warp_group never uses; Ruff reports RUF059 for it.

♻️ Proposed cleanup
-    CHUNK = 64
-    P_COLS_PER_CHUNK = CHUNK // 2
     stats_off = LAYOUT.STATS_OFF + sub_tile_id * LAYOUT.STATS_STRIDE

Apply this at line 1687 and at line 1553:

-        q_super_idx, head_idx, batch_idx = _dispatch_decode_payload(
+        q_super_idx, _head_idx, batch_idx = _dispatch_decode_payload(

Note: CHUNK is also unused in _softmax_warp_group once P_COLS_PER_CHUNK is removed. Verify before deleting both.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py` at line 1539,
Remove the unused P_COLS_PER_CHUNK local from _softmax_warp_group, then remove
CHUNK from that function’s parameters if it is no longer referenced. Update the
unpacking around the decode result at line 1687 to mark head_idx as
intentionally unused, preserving all other values and behavior.

Source: Linters/SAST tools


1389-1409: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Add a validation for the softmax chunk count.

CfgD192 inherits TILE_N = 128 and N_BMM2_CHUNKS = 2, so the current configuration covers all columns. The validators do not enforce N_BMM2_CHUNKS * 64 == TILE_N. Add this invariant to the applicable validators or derive N_BMM2_CHUNKS from TILE_N to prevent future configurations from silently omitting columns.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py` around lines
1389 - 1409, Add validation in the applicable configuration validators for the
softmax coverage invariant that N_BMM2_CHUNKS multiplied by 64 equals TILE_N,
including CfgD192. Alternatively, derive N_BMM2_CHUNKS directly from TILE_N,
ensuring every configured column is covered and no future configuration can
silently omit columns.
test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py (1)

226-243: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Gate the test on the cuDNN backend version. The module-level pytestmark already skips non-SM100 devices. _require_dsl() only checks imports. Skip when cudnn.backend_version() < 91200 before calling cudnn.pygraph(...).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py` around lines 226 - 243,
Update test_dsl_sm100_d192_d128 to query cudnn.backend_version() and skip when
it is below 91200, placing this guard before the _run_dsl_graph path invokes
cudnn.pygraph. Keep the existing _require_dsl() and test coverage unchanged for
supported cuDNN versions.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py`:
- Around line 1736-1739: Update the comment immediately above O_CHUNK in the
prefill kernel to accurately describe the configured value of 8 and its
reduction from the prior value, while preserving the explanation about
shortening the alpha-rescale live range and avoiding correction-warp register
spills.
- Around line 2125-2126: Update the alignment error message in the d192 envelope
validation to report both element sizes consistently with the checks: use
CFG.BPE for d_qk and CFG.BPE_O for d_v, rather than labeling and printing only
CFG.BPE.

---

Nitpick comments:
In `@python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py`:
- Line 1539: Remove the unused P_COLS_PER_CHUNK local from _softmax_warp_group,
then remove CHUNK from that function’s parameters if it is no longer referenced.
Update the unpacking around the decode result at line 1687 to mark head_idx as
intentionally unused, preserving all other values and behavior.
- Around line 1389-1409: Add validation in the applicable configuration
validators for the softmax coverage invariant that N_BMM2_CHUNKS multiplied by
64 equals TILE_N, including CfgD192. Alternatively, derive N_BMM2_CHUNKS
directly from TILE_N, ensuring every configured column is covered and no future
configuration can silently omit columns.

In `@test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py`:
- Around line 226-243: Update test_dsl_sm100_d192_d128 to query
cudnn.backend_version() and skip when it is below 91200, placing this guard
before the _run_dsl_graph path invokes cudnn.pygraph. Keep the existing
_require_dsl() and test coverage unchanged for supported cuDNN versions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b0ebd6d4-1732-4ca7-8371-35af19b148ce

📥 Commits

Reviewing files that changed from the base of the PR and between b7ddaae and 75c0b27.

📒 Files selected for processing (7)
  • python/cudnn/sdpa/fwd/api_dsl.py
  • python/cudnn/sdpa/fwd/config_sm100.py
  • python/cudnn/sdpa/fwd/engine.py
  • python/cudnn/sdpa/fwd/engines.py
  • python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py
  • test/python/sdpa/frost/test_sdpa_fwd_dsl_sm100.py
  • test/python/sdpa/frost/test_sdpa_graph_analyzer.py

Comment on lines +1736 to +1739
# O_CHUNK=16 (halved from 32) shortens the alpha-rescale live range —
# at 32, DSL regalloc spilled correction-warp regs to the stack.
O_CHUNK = 8
N_CHUNKS_O = CFG.TILE_O // O_CHUNK

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the stale O_CHUNK comment.

The comment states O_CHUNK=16 (halved from 32), but line 1738 sets O_CHUNK = 8. O_CHUNK controls the alpha-rescale live range and the register pressure of the correction warps. A wrong value in the comment misleads later tuning.

📝 Proposed fix
-    # O_CHUNK=16 (halved from 32) shortens the alpha-rescale live range —
-    # at 32, DSL regalloc spilled correction-warp regs to the stack.
+    # O_CHUNK=8 shortens the alpha-rescale live range — at larger chunk
+    # sizes DSL regalloc spilled correction-warp regs to the stack.
     O_CHUNK = 8
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# O_CHUNK=16 (halved from 32) shortens the alpha-rescale live range —
# at 32, DSL regalloc spilled correction-warp regs to the stack.
O_CHUNK = 8
N_CHUNKS_O = CFG.TILE_O // O_CHUNK
# O_CHUNK=8 shortens the alpha-rescale live range — at larger chunk
# sizes DSL regalloc spilled correction-warp regs to the stack.
O_CHUNK = 8
N_CHUNKS_O = CFG.TILE_O // O_CHUNK
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py` around lines
1736 - 1739, Update the comment immediately above O_CHUNK in the prefill kernel
to accurately describe the configured value of 8 and its reduction from the
prior value, while preserving the explanation about shortening the alpha-rescale
live range and avoiding correction-warp register spills.

Comment on lines +2125 to +2126
if (d_qk * CFG.BPE) % 16 != 0 or (d_v * CFG.BPE_O) % 16 != 0:
raise ValueError(f"d192 envelope: d_qk*BPE and d_v*BPE must be 16-byte multiples (TMA global-stride rule); got ({d_qk}, {d_v}) at BPE={CFG.BPE}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Report the correct element size in the alignment error.

Line 2125 validates d_qk with CFG.BPE and d_v with CFG.BPE_O. The message on line 2126 names only BPE and prints CFG.BPE. If CFG.BPE_O != CFG.BPE, the reported value does not match the check that failed.

📝 Proposed fix
     if (d_qk * CFG.BPE) % 16 != 0 or (d_v * CFG.BPE_O) % 16 != 0:
-        raise ValueError(f"d192 envelope: d_qk*BPE and d_v*BPE must be 16-byte multiples (TMA global-stride rule); got ({d_qk}, {d_v}) at BPE={CFG.BPE}")
+        raise ValueError(
+            f"d192 envelope: d_qk*BPE and d_v*BPE_O must be 16-byte multiples (TMA global-stride rule); "
+            f"got ({d_qk}, {d_v}) at BPE={CFG.BPE}, BPE_O={CFG.BPE_O}"
+        )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (d_qk * CFG.BPE) % 16 != 0 or (d_v * CFG.BPE_O) % 16 != 0:
raise ValueError(f"d192 envelope: d_qk*BPE and d_v*BPE must be 16-byte multiples (TMA global-stride rule); got ({d_qk}, {d_v}) at BPE={CFG.BPE}")
if (d_qk * CFG.BPE) % 16 != 0 or (d_v * CFG.BPE_O) % 16 != 0:
raise ValueError(
f"d192 envelope: d_qk*BPE and d_v*BPE_O must be 16-byte multiples (TMA global-stride rule); "
f"got ({d_qk}, {d_v}) at BPE={CFG.BPE}, BPE_O={CFG.BPE_O}"
)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/cudnn/sdpa/fwd/kernels/prefill_d192_d128_f16_sm100.py` around lines
2125 - 2126, Update the alignment error message in the d192 envelope validation
to report both element sizes consistently with the checks: use CFG.BPE for d_qk
and CFG.BPE_O for d_v, rather than labeling and printing only CFG.BPE.

@adshen

adshen commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@cudnn-ci-bot check

@cudnn-ci-bot

Copy link
Copy Markdown

Backend pipeline not launched

Reason: @adshen is not allowlisted to run this bot.

Ask an allowlisted maintainer to comment @cudnn-ci-bot check.

@vedaanta

vedaanta commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

@cudnn-ci-bot run

@cudnn-ci-bot

Copy link
Copy Markdown

🚀 Running mirror pipeline

Branch: cudnn-gh/pr-488-75c0b27
Pipeline: 61264254

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.

3 participants