[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:
@@ -467,10 +467,6 @@ class DeepseekV32Attention(MLAAttention):
|
|||||||
index_rope_interleave=self._index_rope_interleave,
|
index_rope_interleave=self._index_rope_interleave,
|
||||||
)
|
)
|
||||||
|
|
||||||
if attn_metadata is None:
|
|
||||||
output.zero_()
|
|
||||||
return
|
|
||||||
|
|
||||||
if self.indexer is not None:
|
if self.indexer is not None:
|
||||||
sparse_attn_indexer(
|
sparse_attn_indexer(
|
||||||
q_c,
|
q_c,
|
||||||
@@ -492,6 +488,10 @@ class DeepseekV32Attention(MLAAttention):
|
|||||||
True, # skip_topk_buffer_clear (fused_norm_rope already did it)
|
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]
|
num_actual = attn_metadata.num_actual_tokens # type: ignore[attr-defined]
|
||||||
kv_cache = self.kv_cache
|
kv_cache = self.kv_cache
|
||||||
if self._fp8_kv_needs_view:
|
if self._fp8_kv_needs_view:
|
||||||
|
|||||||
Reference in New Issue
Block a user