[TLE] Add warp-specialized pipeline support#592
Merged
Conversation
5ac138b to
66c4056
Compare
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 adds the TLE pipe / warp-specialized pipeline stack for the
triton_v3.6.xbranch. It introduces typedtle.pipeendpoints,tle.gpu.warp_specializeintegration, NVWS/mbarrier lowering, multi-reader pipe support, WGMMA scheduling/lifetime analysis, TMA store commit/wait support, and the sparse MLA TLE-pipe / TLE-FlashMLA prefill tutorial and benchmark path.The branch has been merged with the latest
origin/triton_v3.6.xbefore opening the PR. The diff does not includethird_party/triton_shared.What Changed
1. TLE pipe API and warp-specialized frontend
tle.pipesupport with writer/reader endpoints, stagedacquire/commit/wait/release, optional reader names, field subsets, close/check-close handling, and one-shot pipe use cases.tle.gpu.warp_specializeusage so warp functions receive restricted pipe reader/writer endpoints and can express producer/consumer roles through frontend semantics.2. Pipe lowering and synchronization
3. WGMMA/TMA lowering and scheduling
warp_group_dot_commitandwarp_group_dot_waitat real accumulator-consumption and operand-lifetime boundaries.gdescoperands.4. Sparse MLA / FlashMLA-style examples and docs
python/tutorials/tle/deepseek_v32/02-sparse-mla.pywith TLE-pipe and TLE-FlashMLA prefill providers.tle.mdandtle_cn.mdwith the pipe API contract, warp-specialization semantics, examples, and benchmark data.5. Regression coverage
third_party/tle/test/GPU/for pipe ops, pipe-to-NVWS/mbarrier lowering, multi-reader/released-field behavior, participant arrive, subview-aware membar, WGMMA descriptor lowering, WGMMA accumulator scheduling, TMA store commit/wait handling, and local-pointer optimizations.Performance
Environment recorded in
tle.md:python/tutorials/tle/deepseek_v32/02-sparse-mla.py --mode bench --warmup 200 --rep 500B=1,S=4096,H=128,HKV=1,DQK=576,DV=512,topk=2048Latency in milliseconds:
Summary:
tle.md.Validation
origin/triton_v3.6.x:conda run -n flagtree ninja -C build/cmake.linux-x86_64-cpython-3.10conda run -n flagtree lit -v build/cmake.linux-x86_64-cpython-3.10/third_party/tle/test/GPU/test_tle_{arrive_barrier_release_fence,lower_pipe_to_nvws,lower_pipe_to_nvws_errors,lower_pipe_to_nvws_warpspec,pipe_to_mbarrier,optimize_dot_operands_wgmma_view,wgmma_accumulator_fence_lowering,wgmma_pipeline_accumulator_chain,wgmma_pipeline_serialized_warning,wgmma_shared_operand_fence,allocate_shared_memory_alias,arrive_barrier_errors,async_copy_cache_policy,membar_static_subviews,pipe_participant_commit,wgmma_descriptor_lowering}.mlirPYTHONPATH=/root/repos/flagtree/python TRITON_CACHE_DIR=/tmp/tle_merge36_check conda run -n flagtree python python/tutorials/tle/deepseek_v32/02-sparse-mla.py --mode test --B 1 --S 80 --SKV 1024 --H 64 --HKV 1 --DQK 320 --DV 256 --topk 512 --skip-tle-pipe-check --skip-tle-flashmla-prefill-checkgit diff --checkpassed.