Conversation
Signed-off-by: Summer Yang <girasoleyang@gmail.com>
GirasoleY
force-pushed
the
k3-direct-dcp-final-layout-oss-pr
branch
from
August 14, 2026 01:48
e18b262 to
888f83d
Compare
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
GirasoleY
marked this pull request as ready for review
September 9, 2026 23:42
GirasoleY
requested review from
Harry-Chen,
LucasWilkinson,
MatthewBonanni and
khluu
as code owners
September 9, 2026 23:42
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the direct DCP prefill KV path's rank-major gather, local materialization, and Python reorganization with a multicast publisher that writes valid rows directly into the compact request-major MLA layout.
kv_candk_peplanes using per-chunk destination-row metadata.Buffer lifetime
The returned tensors alias symmetric memory. Within an ubatch, consumption stays on the same stream. A gather on the alternate slot is the all-rank rendezvous that makes the previous slot reusable; after the final context chunk, the tensor-parallel output collective is the post-consumption rendezvous before the next layer/forward resets to slot 0. DBO ubatches own disjoint slot pairs.
The distributed test covers both transitions without an explicit barrier in the critical sequence, including asymmetric delayed consumption.
Validation
888f83d3; 14/14 context-map tests and the focused four-rank direct-KV publication/lifetime test passed. The PR remains a draft for maintainer review.Paired benchmark evidence
On the pinned Kimi-K3 prototype tree (
0a131869, tree47c98e9), using identical 8-GPU TP8+EP8+model-SP engines with replicated shared experts and the same controlled 60K–180K prefill workload:At the 1.15-QPS boundary, DCP8 was 127 ms behind TP8 at P50 while exposing about 7.5x the KV-token capacity. This PR deliberately excludes the benchmark harness, scheduler observability, connector changes, MRV2 block-table fix, and DeepGEMM compatibility fix from that tested tree.
Scope
This builds on the merged DCP implementation from #50484 and preserves the current fused Kimi-K3 chunked-context K/V packing path. No scheduler, model-weight, or benchmark-only changes are included.