Open
Conversation
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
This PR builds on PR #489 and completes the sparse MLA forward optimization work for the
triton_v3.6.xbranch. It adds the TLE sparse MLA tutorial/benchmark path, TLE-owned shared-memory staging and tile-style pipeline materialization, WGMMA descriptor/fence support, and the native Triton hooks required by those TLE paths under#ifdef __TLE__.What Changed
1. Sparse MLA forward tutorial and benchmark coverage
python/tutorials/tle/deepseek_v32/02-sparse-mla.pywith Triton, TLE, TileLang, TileLang-pipelined, TileLang-seesaw, and FlashMLA-compatible sparse MLA forward providers.topk_lengthsupport so sparse MLA can skip shorter sparse regions instead of always iterating the full statictopk.num_warpsandnum_stagesinstead of autotune for this tutorial path.2. WGMMA descriptor view and shared operand fencing
tle.memdesc_wgmma_viewas a descriptor-only view for existing shared-memory tiles consumed by WGMMA.tle.wgmma_shared_operand_fenceto order generic-proxy shared writes before WGMMA async-proxy reads.local_load(existing_smem)operands can be reused directly as WGMMA shared operands instead of forcing extra register/materialization paths.3. Tile-style staging and pipeline materialization
4. TLE-guarded native Triton hooks
#ifdef __TLE__so D/C-accumulator-only dot users do not trigger the flash-attention chained-dot heuristic.#ifdef __TLE__.#ifdef __TLE__that materializes the initial C accumulator beforewgmma.fence, preventing ptxas from seeing non-WGMMA accumulator definitions inside the WGMMA pipeline stage.5. Regression coverage
third_party/tle/test/GPU/for WGMMA descriptor views, WGMMA shared operand fences, tile-style pipeline scheduling/materialization, short/dynamic loop handling, and the WGMMA accumulator-before-fence lowering rule.Performance
Environment
CUDA_VISIBLE_DEVICES=61Sparse MLA Forward Prefill
Configuration for all rows:
B=1,S=4096,H=128,HKV=1,DQK=576,DV=512,topk=2048,topk_length=2048.Interpretation:
SKV.Validation
0 bytesstack frame, spill stores, and spill loads.