[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>
This commit is contained in:
@@ -531,6 +531,15 @@ class DeepseekV4Attention(nn.Module, AttentionLayerBase, ABC):
|
||||
"instead."
|
||||
)
|
||||
swa_bounded_replay = False
|
||||
if swa_bounded_replay and current_platform.is_rocm():
|
||||
logger.warning_once(
|
||||
"SWA bounded replay is off on ROCm (the sparse SWA metadata "
|
||||
"builders forward replay_start, but the window clamp it relies "
|
||||
"on lives in the FlashInfer and FlashMLA prefill kernels, so "
|
||||
"the padded slots fault); the sliding-window cache takes part "
|
||||
"in prefix caching instead."
|
||||
)
|
||||
swa_bounded_replay = False
|
||||
self.swa_cache_layer = DeepseekV4SWACache(
|
||||
head_dim=self.head_dim,
|
||||
window_size=self.window_size,
|
||||
|
||||
Reference in New Issue
Block a user