[Feature] Unified memory: support decode context parallelism for Kimi-Linear (#36890)

This commit is contained in:
Cheng Wan
2026-09-01 12:44:26 -07:00
committed by GitHub
parent 3315356cc0
commit 0b1ce3d140
20 changed files with 671 additions and 105 deletions
@@ -70,6 +70,9 @@ def _armed_source(v2p, swa_map):
)
src.is_translating = True
src._translate_full = lambda t, out=None: v2p[t.to(torch.int64)]
# The WRITE loc has its own translate because under DCP it arrives widened;
# at dcp_size == 1 it is the read translate, so arm it with the same fake.
src._translate_write_full = src._translate_full
# Phase 2 derives from kernel-facing values through p2v + the swa v2p; arm
# the inverse of the fake v2p (ps=1, both multipliers 1: kernel == physical,
# and the expected swa loc for virtual t is swa_map[t]).