[Bugfix][ROCm][DSv4.1] Disable SWA bounded replay on ROCm (#57906)
Signed-off-by: Fangzhou Ai <fangzhou.ai@amd.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Fangzhou Ai committed
Sep 21, 2026 at 06:29 UTC
04c1f4a407962a37d01b573f3a2aba91dd2ed3a9
1 file changed
+9
vllm/models/deepseek_v41/attention.py
+9
@@ -531,6 +531,15 @@ class DeepseekV4Attention(nn.Module, AttentionLayerBase, ABC):
531
"instead."
532
)
533
swa_bounded_replay = False
534
+ if swa_bounded_replay and current_platform.is_rocm():
535
+ logger.warning_once(
536
+ "SWA bounded replay is off on ROCm (the sparse SWA metadata "
537
+ "builders forward replay_start, but the window clamp it relies "
538
+ "on lives in the FlashInfer and FlashMLA prefill kernels, so "
539
+ "the padded slots fault); the sliding-window cache takes part "
540
+ "in prefix caching instead."
541
+ )
542
+ swa_bounded_replay = False
543
self.swa_cache_layer = DeepseekV4SWACache(
544
head_dim=self.head_dim,
545
window_size=self.window_size,