[AMD] [GLM-5.3-Flash Day 0] Enable zero-RoPE TileLang DSA on gfx950 - #38547
Open
Raiden-Makoto wants to merge 4 commits into
Open
Raiden-Makoto wants to merge 4 commits into
Raiden-Makoto wants to merge 4 commits into
Conversation
Raiden-Makoto
requested review from
BBuf,
DarkSharpness,
HaiShaw,
HydraQYH,
Ying1123,
alphabetc1,
celve,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
xiezhq-hermann,
yizhang2077 and
yuan-luo
as code owners
September 8, 2026 17:26
Raiden-Makoto
marked this pull request as draft
September 8, 2026 18:04
Raiden-Makoto
marked this pull request as ready for review
September 8, 2026 19:28
Raiden-Makoto
force-pushed
the
RM/glm53-rocm-tilelang-zero-rope
branch
from
September 8, 2026 19:37
e1be1e9 to
eab6b47
Compare
Compile out zero-width tail work and generalize FP8 TileLang/cache layouts so GLM's 256+0 geometry is covered without changing the existing 512+64 path.
Raiden-Makoto
force-pushed
the
RM/glm53-rocm-tilelang-zero-rope
branch
from
September 8, 2026 19:42
eab6b47 to
54624dd
Compare
This was referenced Sep 11, 2026
Closed
6 tasks
Contributor
Author
|
/rerun-failed-ci |
This was referenced Sep 14, 2026
Open
Contributor
Author
|
/rerun-failed-ci |
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
Replacement for #37653, which GitHub closed when its deleted support base was merged into main.
GLM-5.3-Flash sparse DSA uses a 256-wide NoPE latent with a zero-width RoPE tail. The HIP TileLang BF16 partial kernel still emits zero-extent tail allocation/copy/gather/GEMM work, while the HIP FP8 kernel and scaled cache helpers are specialized for the existing DeepSeek-style 512+64 layout.
This PR enables GLM's 256+0 geometry without changing the established 512+64 behavior.
d_v=512)d_v=256and retains four ford_v=512512 FP8 + 16 scale + 128 RoPE)256 FP8 + 8 scale + 0 RoPE)Scope
Four production files:
tilelang_kernel.py: compile out HIP BF16 zero-tail work and specialize the HIP FP8 kernel for either 256+0 or 512+64.quant_k_cache.py: infer or accept the NoPE width, derive the number of 128-element scale tiles, and permit an empty RoPE tensor.dequant_k_cache.py: recognize 264-byte and 656-byte packed rows and use their derived dimensions in direct, paged, and gather/dequant/requant paths.memory_pool.py: document the dimension-derived scaled layout and optional RoPE payload at the existing write sites.One MI35x test file directly covers the TileLang kernels and scaled cache helpers. No model loading, server launch, accuracy benchmark, scheduler/backend policy, dense MHA path, mHC path, MoE path, or CUDA TileLang FP8 behavior is changed.
The FP8 kernel keeps the existing 512+64 allocation, GEMM, accumulation, normalization, and store order. The 256+0 specialization emits only the first two 128-wide tiles and no tail operations.
Test plan
Combined main-based integration (
RM/glm53-day0-main-integrationtested at9d0d62b744; current integration head4e2f84ff3c; TP8/TP4 validation predates the above-cap guard, whose below-cap path is unchanged, pinned AITERd9e5ef7ce0, fresh caches): TP8 GSM8K 97.50% in 87.0s with 0.00% errors; TP4 GSM8K 96.97% in 320.2s with 0.00% errors. Decode CUDA graphs were enabled in both runs.Recovery base:
main@30e7a3072d.Recovery validation on MI355X: scoped pre-commit passed; all 4 BF16/FP8 TileLang and cache-layout test groups passed.
Docker:
rocm/sgl-dev:v0.5.18-rocm720-mi35x-20260830.Hardware: one MI350X (
gfx950).Base:
xinyuan/glm-5.3-flash-support@545bd6f839.The same new test file was run in both arms; the four production files are the only variables.
Direct GLM geometry coverage:
[tokens, 64, 256], KV[slots, 1, 256], output BF16[tokens, 64, 256];-1to 2112;256+0) and 656-byte (512+64) scaled-cache round trips and repeated-page gathers;register_amd_ci(suite="stage-b-test-1-gpu-small-amd-mi35x")python/sglang/jit_kernel/tests/test_triton_store_cache_local.py.CI States
Latest PR Test (Base): 🚫 Run #34768837546
Latest PR Test (Extra): ❌ Run #34768837462
Latest PR Test (AMD ROCm 10): ❌ Run #34768837528