You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GLM-5 (GlmMoeDsaForCausalLM) with MXFP4 quantization crashes during the decode phase on ROCm MI355x (gfx950) with 8 GPUs. The model loads and prefills successfully, but decode consistently fails with either ZeroDivisionError or Memory access fault.
Root Cause
GLM-5 has 64 attention heads and 32 sparse indexer heads (index_n_heads=32). At TP=8, the MLA decode kernel receives 8 heads per GPU, but AITER's sparse MLA kernels require num_heads >= 16:
MLA decode kernel: mla_decode_stage1_asm_fwd only supports gqa >= 16. With TP=8, gqa=8 triggers RuntimeError: get_heuristic_kernel_mla: cannot get heuristic kernel! gqa:8
Even with TP=4 (16 heads per GPU, satisfying the >= 16 requirement for the MLA kernel), a Memory access fault persists during decode, suggesting additional issues in the sparse attention indexer's forward_hip path.
Environment
GPU: 8x AMD MI355X (gfx950)
ROCm: 7.2.1
vLLM: main branch (latest)
Model: GLM-5-MXFP4 (zai-org/GLM-5-MXFP4 or equivalent Quark checkpoint)
Summary
GLM-5 (GlmMoeDsaForCausalLM) with MXFP4 quantization crashes during the decode phase on ROCm MI355x (gfx950) with 8 GPUs. The model loads and prefills successfully, but decode consistently fails with either
ZeroDivisionErrororMemory access fault.Root Cause
GLM-5 has 64 attention heads and 32 sparse indexer heads (
index_n_heads=32). At TP=8, the MLA decode kernel receives 8 heads per GPU, but AITER's sparse MLA kernels requirenum_heads >= 16:mla_decode_stage1_asm_fwdonly supportsgqa >= 16. With TP=8,gqa=8triggersRuntimeError: get_heuristic_kernel_mla: cannot get heuristic kernel! gqa:8deepgemm_fp8_paged_mqa_logits_stage1computesTileQCount = heads // ChunkQwith defaultChunkQ=64. Whenheads < 64,TileQCount=0causesZeroDivisionErroratSplitKV = (max(1, TotalCuCount // TileQCount) + 4) // 5 * 5 * WavePerEUEven with TP=4 (16 heads per GPU, satisfying the
>= 16requirement for the MLA kernel), aMemory access faultpersists during decode, suggesting additional issues in the sparse attention indexer's forward_hip path.Environment
zai-org/GLM-5-MXFP4or equivalent Quark checkpoint)num_attention_heads=64,index_n_heads=32,kv_lora_rank=512,n_routed_experts=256Reproduction
Then send any chat completion request - prefill succeeds but decode crashes.
Error Traces
ZeroDivisionError (TP=8, indexer path)
Memory access fault (TP=4 or TP=8, during decode)
Related
gqa:8crash)Proposed Fix
Two complementary approaches (both needed):
heads < 16(implemented infix/rocm-glm5-mxfp4-optimizationsbranch)