Skip to content

Update MLA decode example - #3357

Open
Observer007 wants to merge 2 commits into
NVIDIA:mainfrom
Observer007:fix/mla-fp8-register-split
Open

Update MLA decode example#3357
Observer007 wants to merge 2 commits into
NVIDIA:mainfrom
Observer007:fix/mla-fp8-register-split

Conversation

@Observer007

@Observer007 Observer007 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Port the 4.6 Blackwell MLA decode updates to the public CuTeDSL examples.

This includes:

  • FP8 MLA decode: update to the 16-warp schedule with separate QK/PV MMA issue warps, two softmax warp groups, and the balanced 152/152/56 register split.
  • FP16 MLA decode: port the 4.6 schedule/spec-decoding updates, including fold_sq, seq_len_q-aware QK tiler K selection, reduced load_kv_stage for multi-query
    decode, and corrected causal-mask tile count.
  • MLA scheduler helper: add split_pv plumbing and fix non-persistent coordinate decoding.
  • Public-tree cleanup: use public cute.blackwell... imports and remove internal release-marker comments / SM107-only branches from Blackwell examples.

Validation

Validated with public nvidia-cutlass-dsl==4.6.0a0 wheels on B200, core clock locked at 802 MHz.

CUDA 12.9

  • Confirmed _cutlass_ir.cu12 loaded:
    • CUDA_VERSION DSLCudaVersion(major=12, minor=9)
  • py_compile passed for MLA FP8/FP16 files.
  • FP16 correctness:
    • b=4, s_q=1, s_k=1024, persistent, reference check passed.
  • FP16 perf:
    • b=296, s_q=1, s_k=8192, h=128, l=512, r=64, persistent
    • 751.56 us
  • FP8 perf:
    • same b=296 configuration, persistent
    • 438.68 us

CUDA 13.3

  • Confirmed _cutlass_ir.cu13 loaded:
    • CUDA_VERSION DSLCudaVersion(major=13, minor=3)
  • FP16 correctness:
    • b=4, s_q=1, s_k=1024, persistent, reference check passed.
  • FP16 perf:
    • b=296, s_q=1, s_k=8192, h=128, l=512, r=64, persistent
    • 751.36 us
  • FP8 perf:
    • same b=296 configuration, persistent
    • 424.80 us

Port the 4.6 MLA FP8 decode schedule to the public CuTeDSL example. The kernel now uses two softmax warp groups, splits QK and PV MMA issue across separate warps, and keeps the balanced 152/152/56 register split that avoids local spills in the cu12/cu13 generated code while preserving the cu13 performance path.

Update the MLA static scheduler helper for split_pv plumbing and the corrected non-persistent coordinate decode required by the folded/fanned-out schedule.

Example validated on B200 with nvidia-cutlass-dsl 4.6.0a0, CUDA_VERSION 13.3: py_compile for mla_decode_fp8.py and mla_helpers.py; b=4 s_k=1024 persistent reference check passed; b=296 s_q=1 s_k=8192 h=128 l=512 r=64 persistent skip-ref perf averaged 424.65 us over 20 iterations at 802 MHz core clock.
Port the 4.6 Blackwell MLA FP16 decode updates onto the public CuTeDSL example. This brings over the fold_sq/spec-decoding path, the seq_len_q-aware QK tiler K selection, reduced load_kv staging for multi-query decode, and the corrected causal-mask tile count.

Public-tree cleanup keeps the example import path under cute.blackwell and removes internal release-marker comments plus the sm107-only branch from the Blackwell example.

Validated with nvidia-cutlass-dsl 4.6.0a0 public wheels on B200 locked at 802 MHz: py_compile; FP16 b=4 s_k=1024 persistent reference check on CUDA 12.9 and 13.3; FP16 b=296 s_q=1 s_k=8192 persistent skip-ref perf was 751.56 us on CUDA 12.9 and 751.36 us on CUDA 13.3. Rechecked FP8 b=296 persistent on the same branch: 438.68 us on CUDA 12.9 and 424.80 us on CUDA 13.3.
@Observer007 Observer007 changed the title Update MLA FP8 decode example Update MLA decode example Jun 30, 2026
@github-actions

Copy link
Copy Markdown

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant