Repository navigation
[PD][mori] Align prefill transfer control plane for unified control plane - #36160
Conversation
Align Mori prefill-side KV transfer with Mooncake/NIXL: enqueue room-keyed TransferKVChunk work units, run submit/wait/notify in MoriKVManager._process_transfer_chunk, and thin MoriKVSender to enqueue-only + status poll. Keeps early-send wait_event on the chunk and centralizes decode notification in the manager for a shared control-plane extraction path. Co-authored-by: Cursor <cursoragent@cursor.com>
|
A few comments: 1. Could this be dropped? Right now only Also, in NIXL the sender and receiver implementations of 2. The dict is only ever initialized, read, and set to
Previously this was Could we clear it in 3. Duplicate decode notification on the SLA path
sla_tripped = True
self._conclude_room_failure(room, f"KV transfer exceeded SLA {sla_ms}ms")
return StatusCode.IN_PROGRESSand the caller treats any non- rc = self._wait_transfer_completion(statuses, room)
if rc != StatusCode.SUCCESS:
self._conclude_room_failure(room, self._collect_transfer_failure_reason(statuses))
returnSo |
jambow0320
left a comment
There was a problem hiding this comment.
LGTM. Left a couple of minor comments inline.
| def abort(self): | ||
| self._finalize_failure("Aborted by AbortReq.") | ||
| super().abort() |
There was a problem hiding this comment.
Can we drop this override? def abort(self): super().abort() is equivalent to not defining it at all.
One thing worth flagging: it also drops the decode notification. Previously abort() went through _finalize_failure("Aborted by AbortReq.") and pushed Failed to decode; CommonKVSender.abort() only records locally, so a prefill-side abort now leaves decode waiting out SGLANG_DISAGGREGATION_WAITING_TIMEOUT (300s). mori was the only backend that had this.
Fine to land as-is — I'm adding a unified peer notification to CommonKVSender.abort() which will restore it for all three backends.
| def clear(self) -> None: | ||
| with self.kv_mgr._room_notify_lock: | ||
| super().clear() | ||
| self.kv_mgr._room_status_notified.pop(self.bootstrap_room, None) |
There was a problem hiding this comment.
Could we narrow the lock to just the pop?
def clear(self) -> None:
super().clear()
with self.kv_mgr._room_notify_lock:
self.kv_mgr._room_status_notified.pop(self.bootstrap_room, None)CommonKVSender.clear() pops kv_mgr.transfer_infos, which is guarded by transfer_lock everywhere else in this file, and _notify_decode_for_room already takes _room_notify_lock → transfer_lock. No deadlock today, but the ordering can be break later.
|
/tag-and-rerun-ci |
|
/rerun-failed-ci |
Merging main after sgl-project#36160 landed re-added `_room_status_notified` and `_room_notify_lock` to `MoriKVManager.__init__` while every user of them stayed deleted, leaving dead state and an F821 on the `Dict` import that went with them.
changes for requests of #34510
PR changes :
Motivation
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #32890274134
Latest PR Test (Extra): ✅ Run #32970353352
Latest PR Test (AMD ROCm 7.2): ❌ Run #32890274261