Skip to content
Closed
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d50b516
feat(router): add gated decode-to-prefill KV reuse
yifjiang Oct 18, 2026
552a60b
style(router): apply repository Black formatting
yifjiang Oct 18, 2026
02a16b6
test(router): keep dispatch assertions outside async lock lifetime
yifjiang Oct 18, 2026
b3f5193
test(router): initialize event source in deadline fixture
yifjiang Oct 18, 2026
fdc19dc
test(router): model separate prefill and decode runtime identities
yifjiang Oct 18, 2026
589469e
fix(router): preserve topology policy for cross-role KV hints
yifjiang Oct 19, 2026
85b0478
docs(router): mark direct GPU KV transfer as TODO
yifjiang Oct 20, 2026
f56c5fb
Add opt-in GPU retained-cache decode-to-prefill reuse
yifjiang Oct 20, 2026
2063973
Clarify GPU inventory requirement in router configuration
yifjiang Oct 20, 2026
c5695be
Separate retained GPU inventory lifetime from native cache resets
yifjiang Oct 20, 2026
28d8bac
Balance GPU IPC ownership and preserve native cache on retained-tier …
yifjiang Oct 20, 2026
3031551
Release IPC consumers and copy handler callbacks before interpreter exit
yifjiang Oct 20, 2026
02126d6
fix: preserve retained GPU inventory across native cache resets
yifjiang Oct 20, 2026
af51cd2
docs: describe retained GPU decode-to-prefill contracts
yifjiang Oct 20, 2026
aa4fba6
test: distinguish canonical and legacy GPU clear domains
yifjiang Oct 20, 2026
48eeeaa
test: fix LLM test imports and optional GPU collection
yifjiang Oct 20, 2026
49f2005
fix: index retained GPU prefixes for load-only prefill routing
yifjiang Oct 20, 2026
49929dc
test: isolate migration tracing capture from sibling subscribers
yifjiang Oct 20, 2026
8d7c662
docs: explain GPU tier and connector registration requirements
yifjiang Oct 20, 2026
d0cd1b8
feat(vllm): retain GPU KV in FABRIC memory for MNNVL reuse
yifjiang Oct 22, 2026
aa8918d
fix(vllm): keep MNNVL unit collection independent of GPU packages
yifjiang Oct 22, 2026
b46025c
feat(kv): retain TP2 rank banks on current public main
yifjiang Oct 31, 2026
fbe18fe
test(kv-router): update donor fixtures for current identities
yifjiang Oct 31, 2026
6679c70
test(router): build transfer hosts through current routing API
yifjiang Oct 31, 2026
1c60802
test(vllm): guard TP2 bank collection without optional frameworks
yifjiang Oct 31, 2026
a95de6e
style(kv-router): format transfer-source test imports
yifjiang Oct 31, 2026
889e54d
Merge latest public main for TP2 MNNVL validation
yifjiang Oct 31, 2026
0c8cea0
fix(router): bound transfer hashing and scope target residency
yifjiang Oct 31, 2026
be2fbeb
Merge remote-tracking branch 'refs/remotes/codex-public-review/main' …
yifjiang Oct 31, 2026
ef93ba1
Merge latest public main for full-prefix reuse validation
yifjiang Nov 1, 2026
0bced56
Merge latest public main after validated prefix-reuse measurements
yifjiang Nov 2, 2026
b1d65d2
Merge latest public main for review readiness
yifjiang Nov 3, 2026
b336e3e
fix: preserve retained GPU cache lifetime boundaries
yifjiang Nov 3, 2026
befc29b
docs: clarify multimodal exclusion overflow lifetime
yifjiang Nov 3, 2026
c166676
test(vllm): run retained GPU logic tests in pre-merge CI
yifjiang Nov 3, 2026
c30449b
Merge public main and preserve root-only donor lookup
yifjiang Nov 3, 2026
4aeb4d0
Merge latest public main for review readiness
yifjiang Nov 3, 2026
bb1d4b6
fix: separate retained GPU framework keys from router hashes
yifjiang Nov 3, 2026
6aed1b9
style(vllm): order offload key imports consistently
yifjiang Nov 3, 2026
447fbf4
test(router): respect deferred cleanup in child reuse race
yifjiang Nov 3, 2026
13d668b
Merge latest public main for review validation
yifjiang Nov 3, 2026
59e5ce0
ci: reclaim completed test programs before feature benchmarks
yifjiang Nov 3, 2026
5c75e96
fix(kvbm): keep native port discovery on loopback
yifjiang Nov 3, 2026
e699b64
Merge latest public main for review validation
yifjiang Nov 3, 2026
bf3821f
Merge latest public main for review follow-up
yifjiang Nov 3, 2026
55a6774
fix(router): preserve inactive reuse wire and TP2 domains
yifjiang Nov 3, 2026
60eee13
Merge public main for matching TP support
yifjiang Nov 3, 2026
39646a9
feat(kvbm): support arbitrary matching raw TP sizes
yifjiang Nov 3, 2026
e064d63
style: apply allocated matching TP formatting
yifjiang Nov 3, 2026
50da69e
test(kvbm): model aggregate strides in multi-rank fixture
yifjiang Nov 3, 2026
9aba2b1
Merge latest public main including upstream SGLang media fix
yifjiang Nov 3, 2026
70a1963
Merge public main and preserve retained-prefix prefill dispatch
yifjiang Nov 4, 2026
903275c
Merge public main and preserve captured reuse configuration
yifjiang Nov 4, 2026
c4db2af
Format captured-environment regression as required by CI
yifjiang Nov 4, 2026
db84746
Align live-retune tests with reuse fields and supported router parsing
yifjiang Nov 4, 2026
333db26
Format planner roundtrip assertion as required by CI
yifjiang Nov 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ frontend:

rust:
- '.github/workflows/pre-merge.yml'
- 'scripts/ci/**'
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/pre-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,19 @@ jobs:
# Have an explicit step to build tests first to separate time spent on build vs execution.
- name: Compile Tests
working-directory: ${{ matrix.dir }}
run: cargo test --locked --no-run
run: |
if [ "${{ matrix.dir }}" = "." ]; then
set -o pipefail
set +e
cargo test --locked --no-run --message-format=json-render-diagnostics \
| tee "$RUNNER_TEMP/completed-rust-test-artifacts.jsonl"
compile_status=("${PIPESTATUS[@]}")
if [ "${compile_status[0]}" -ne 0 ]; then
exit "${compile_status[0]}"
fi
exit "${compile_status[1]}"
fi
cargo test --locked --no-run
- name: Run Doc Tests
working-directory: ${{ matrix.dir }}
run: cargo doc --no-deps && cargo test --locked --doc
Expand Down Expand Up @@ -527,6 +539,19 @@ jobs:
if: matrix.dir == 'lib/bindings/python'
working-directory: ${{ matrix.dir }}
run: cargo test --locked --features ais-forward-pass -- --nocapture
- name: Reclaim completed Rust test executables
if: matrix.dir == '.'
working-directory: ${{ matrix.dir }}
run: |
set -euo pipefail
python3 -m unittest discover -s scripts/ci -p test_reclaim_completed_test_executables.py
reclaim_metadata="$RUNNER_TEMP/reclaim-cargo-metadata.json"
cargo metadata --locked --no-deps --format-version 1 > "$reclaim_metadata"
workspace_root="$(python3 -c 'import json, sys; from pathlib import Path; print(json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))["workspace_root"])' "$reclaim_metadata")"
target_dir="$(python3 -c 'import json, sys; from pathlib import Path; print(json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))["target_directory"])' "$reclaim_metadata")"
python3 scripts/ci/reclaim_completed_test_executables.py \
--cargo-messages "$RUNNER_TEMP/completed-rust-test-artifacts.jsonl" \
--workspace "$workspace_root" --target-dir "$target_dir"
- name: Compile feature-gated benchmark entrypoints
if: matrix.dir == '.'
working-directory: ${{ matrix.dir }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@
"enable_session_prefix_index",
"shared_cache_type",
"router_predicted_ttl_secs",
"enable_decode_to_prefill_reuse",
"enable_decode_to_prefill_gpu_reuse",
"transfer_source_lookup_budget_ms",
"minimum_transfer_prefix_blocks",
"minimum_estimated_ttft_saving_ms",
"transfer_source_estimated_block_us",
"transfer_source_gpu_estimated_block_us",
"transfer_source_prefill_token_us",
)

# Authoritative field list — used by kv_router_kwargs() to extract values.
Expand Down Expand Up @@ -213,6 +221,14 @@ class KvRouterConfigBase(ConfigBase):
conditional_disagg_prefill_busy_threshold: Optional[float] = None
conditional_disagg_decode_busy_threshold: Optional[float] = None
router_predicted_ttl_secs: Optional[float] = None
enable_decode_to_prefill_reuse: bool = False
enable_decode_to_prefill_gpu_reuse: bool = False
transfer_source_lookup_budget_ms: int = 5
minimum_transfer_prefix_blocks: int = 1
minimum_estimated_ttft_saving_ms: float = 0.0
transfer_source_estimated_block_us: Optional[float] = None
transfer_source_gpu_estimated_block_us: float | None = None
transfer_source_prefill_token_us: Optional[float] = None
load_aware: bool = False

@cached_property
Expand Down Expand Up @@ -603,6 +619,78 @@ def add_arguments(self, parser) -> None:
),
arg_type=str,
)
add_negatable_bool_argument(
g,
flag_name="--router-decode-to-prefill-reuse",
env_var="DYN_ROUTER_DECODE_TO_PREFILL_REUSE",
dest="enable_decode_to_prefill_reuse",
default=False,
help=(
"Experimental decode-to-prefill KV reuse. Requires a certified "
"router_hint_transfer_domain, local KV events, and calibrated "
"transfer-source cost bounds."
),
)
add_negatable_bool_argument(
g,
flag_name="--router-decode-to-prefill-gpu-reuse",
env_var="DYN_ROUTER_DECODE_TO_PREFILL_GPU_REUSE",
dest="enable_decode_to_prefill_gpu_reuse",
default=False,
help=(
"Experimental direct decode-GPU to prefill-GPU KV reuse. "
"Requires GPU-only pin/transport endpoints, certified layout, "
"ready gpu_direct KV events, and separately calibrated GPU costs. "
"Does not enable the CPU offload transfer path."
),
)
for name, arg_type, default, help_text in (
(
"transfer_source_lookup_budget_ms",
int,
5,
"Maximum donor lookup time in milliseconds.",
),
(
"minimum_transfer_prefix_blocks",
int,
1,
"Minimum extra reusable blocks beyond the existing prefix.",
),
(
"minimum_estimated_ttft_saving_ms",
float,
0.0,
"Minimum estimated TTFT saving in milliseconds.",
),
(
"transfer_source_estimated_block_us",
float,
None,
"Measured upper bound per missing block, including acquisition, copy, onboarding, donor contention, and incremental P-to-D cost.",
),
(
"transfer_source_gpu_estimated_block_us",
float,
None,
"Separately measured direct GPU acquisition/transfer cost per missing block in microseconds; CPU copy/onboarding costs do not qualify it.",
),
(
"transfer_source_prefill_token_us",
float,
None,
"Measured conservative prefill time saved per reused token in microseconds.",
),
):
add_argument(
g,
flag_name="--router-" + name.replace("_", "-"),
env_var="DYN_ROUTER_" + name.upper(),
dest=name,
arg_type=arg_type,
default=default,
help=help_text,
)
add_negatable_bool_argument(
g,
flag_name="--router-conditional-disagg",
Expand Down
5 changes: 5 additions & 0 deletions components/src/dynamo/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@

# TODO: Rename these constants and wire values with the matching KVCC names.
KV_HINT_TRANSFER_CAPABILITY_KEY = "router_hint"
KV_HINT_TRANSFER_DOMAIN_RUNTIME_KEY = "router_hint_transfer_domain"
KV_HINT_TRANSFER_WORKER_TYPE_RUNTIME_KEY = "router_hint_worker_type"
KV_HINT_TRANSFER_SOURCE_CONTROL_ENDPOINTS_RUNTIME_KEY = (
"router_hint_source_control_endpoints"
)
KV_HINT_GPU_DIRECT_CAPABILITY_KEY = "router_hint_gpu_direct"
KV_HINT_GPU_SOURCE_CONTROL_ENDPOINTS_RUNTIME_KEY = (
"router_hint_gpu_source_control_endpoints"
)


class DisaggregationMode(Enum):
Expand Down
Loading
Loading