[Bug] Fix sparse attention issue for GLM5.2 non-torch compile path (#47083)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
Wentao Ye
2026-06-29 15:45:53 -07:00
committed by GitHub
parent 8632c884dc
commit 75698e60b3
+4 -4
View File
@@ -467,10 +467,6 @@ class DeepseekV32Attention(MLAAttention):
index_rope_interleave=self._index_rope_interleave,
)
if attn_metadata is None:
output.zero_()
return
if self.indexer is not None:
sparse_attn_indexer(
q_c,
@@ -492,6 +488,10 @@ class DeepseekV32Attention(MLAAttention):
True, # skip_topk_buffer_clear (fused_norm_rope already did it)
)
if attn_metadata is None:
output.zero_()
return
num_actual = attn_metadata.num_actual_tokens # type: ignore[attr-defined]
kv_cache = self.kv_cache
if self._fp8_kv_needs_view: