15-v1_attention_backends_mla_sparse_swa.py.diff 1.1 KB

12345678910111213141516171819202122
  1. --- baked-ours/v1/attention/backends/mla/sparse_swa.py 2026-09-10 20:13:20.000000000 +0200
  2. +++ baked/v1/attention/backends/mla/sparse_swa.py 2026-09-11 10:13:47.000000000 +0200
  3. @@ -121,6 +121,9 @@
  4. alignment=576 if uses_fp8_ds_mla_layout else 512,
  5. model_version="deepseek_v4",
  6. kv_quant_mode=get_kv_quant_mode(self.cache_config.cache_dtype),
  7. + # DCP: the 128-token window is tiny; every rank keeps all of it
  8. + # (no sharding), so SWA needs no cross-rank combine.
  9. + dcp_replicated=True,
  10. )
  11. def forward(self): ...
  12. @@ -411,6 +414,9 @@
  13. reorder_batch_threshold: int | None = None
  14. _cudagraph_support: ClassVar[AttentionCGSupport] = AttentionCGSupport.UNIFORM_BATCH
  15. supports_draft_decode_metadata_update = True
  16. + # DSpark's non-causal multi-token decode only touches the replicated SWA
  17. + # caches (no cross-rank combine), so it is supported under DCP.
  18. + supports_non_causal_multi_token_dcp: ClassVar[bool] = True
  19. def __init__(self, *args, **kwargs):
  20. super().__init__(*args, **kwargs)