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 (3.6 TLE migration for TopK/cumsum paths) and completes the sparse MLA forward work for the 3.6 branch. It includes the TLE sparse MLA tutorial/benchmark entry, WGMMA descriptor/fence support, TLE-owned staging and tile-style pipeline passes, and the native Triton hooks needed by those TLE paths under
#ifdef __TLE__.What’s Added
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 forward paths.topk_lengthsupport so sparse MLA can skip invalid or shorter top-k regions instead of always iterating the full statictopk.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. TLE staging and tile-style pipeline passes
triton-tle-optimize-local-pointer-async-storesto rewrite eligibleglobal load -> local pointer storestaging into directttg.async_copy_global_to_localover memdesc subviews.triton-tle-promote-local-store-stagingto expose safe loop-local staging as pipelineablelocal_allocpatterns.triton-tle-tile-style-pipeline-scheduleandtriton-tle-materialize-tile-style-pipelinefor TileLang-style preload/use scheduling on selected TLE loops.4. Native Triton hooks guarded for TLE
#ifdef __TLE__:#ifdef __TLE__, so static loops withtrip_count <= num_stagescan still expand with the needed peeled/predicated stages.5. Regression coverage
third_party/tle/test/GPU/for WGMMA descriptor views, WGMMA shared operand fences, local pointer async stores, local-store staging promotion, tile-style pipeline scheduling/materialization, chained-dot A/B-vs-C detection, short static loop pipelining, and async-wait preservation.Performance
Environment
CUDA_VISIBLE_DEVICES=6Sparse MLA Forward Prefill
Configuration for all rows:
B=1,S=4096,H=128,HKV=1,DQK=576,DV=512,topk=2048,topk_length=2048for every query/KV group.Additional condition check:
B=1,S=1024,SKV=4096,topk=512gives TLE0.595 msvs Triton0.786 ms(1.32x).S=4096,topk=2048, and fulltopk_length=2048; it should not be compared directly against the earlier small-case result.topk_lengthvaries by query position; forSKV=32768, the measured averagetopk_lengthwas1535.8, not2048.Correctness checks passed in the local prefill benchmark runs for TLE against the Triton sparse MLA output.
Validation
5 passed in 3.79s.