Repository navigation
Conversation
Secondary-tier KV is only portable across TP sizes when canonical_layout is on and every layer is certified parallelism-agnostic. Log a startup warning from TieringOffloadingSpec.get_manager() when canonical_layout is off, and when it is on but certification fails (e.g. hybrid models), so users sharing a tier across TP sizes see that it is not portable. Follow-up to vllm-project#62283. Signed-off-by: cipheraxat <[email protected]>
Say secondary-tier KV is "only valid for" engines with the same parallel configuration: until vllm-project#55191 lands, a cross-TP read on the V1 runner loads wrong KV rather than missing. Name the parallel configuration in the canonical warning too, since the static check also fails for DCP/PCP > 1 or world_size != tp_size. Add a unit test covering the warning conditions. Signed-off-by: cipheraxat <[email protected]>
Secondary-tier KV is shareable across TP sizes only when canonical_layout is on and the layout is certified parallelism-agnostic, so a single check covers both the direct-layout and the uncertified-canonical cases. Assert that exactly one warning is logged. Signed-off-by: cipheraxat <[email protected]>
With canonical_layout on, the static portability check also fails for PP, DCP or PCP > 1, so say so instead of blaming only the KV cache layers. Signed-off-by: cipheraxat <[email protected]>
6 tasks done
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
…dary-tier-canonical Signed-off-by: cipheraxat <[email protected]> # Conflicts: # tests/v1/kv_offload/test_factory.py
6 tasks done
Etelis
reviewed
Nov 10, 2026
Comment on lines
+466
to
+469
| if secondary_tiers and not ( | ||
| self.config.canonical_layout | ||
| and self.config.parallel.is_parallelism_agnostic | ||
| ): |
Member
There was a problem hiding this comment.
Can we skip this warning when self.config.replicated_layout is true? FileMapper already allows fully replicated MLA to share direct-layout blocks across TP sizes, so saying that sharing requires canonical_layout=true is incorrect here. Please add that case to the existing test matrix.
FileMapper already lets fully replicated MLA share direct-layout blocks across TP sizes, so the advice to set canonical_layout is wrong there. Add the replicated case to the warning test matrix. Signed-off-by: cipheraxat <[email protected]>
Contributor
Author
Member
|
/ci-run |
|
✅ @cipheraxat, CI is now available for this PR.
|
Contributor
Author
|
/ci run |
|
✅ Triggered Buildkite CI #101473 for commit |
Etelis
approved these changes
Nov 10, 2026
Etelis
left a comment
Member
There was a problem hiding this comment.
Runs on my end as expected so it LGTM.
Contributor
Author
|
/ci retry |
|
✅ Queued 1 failed job(s) for retry in Buildkite CI #101473. |
javieratomic
added a commit
to javieratomic/vllm
that referenced
this pull request
Nov 11, 2026
…e-mirror main now asks each connector class how it reaches the device KV cache (KVConnectorBase_V1.kv_cache_access, vllm-project#66605), instead of matching connector names in KVTransferConfig. The mirror's decision moves there: OffloadingConnector.kv_cache_access returns the new KVCacheAccess.REGISTERS_ACROSS_NODES when its spec registers the KV cache in an engine whose workers span nodes, and KVTransferConfig.kv_cache_access, given the engine's parallel_config, turns that flag into REGISTERS or drops it. MultiConnector combines its children through the factory, so the mirror is also found inside nested MultiConnectors. main's test of the topology warning (vllm-project#62566) replaces SharedOffloadRegion with a MagicMock, whose created_file attribute is truthy, so the mirror's check that the scheduler joined rank 0's region raised for its two-worker case. The mock now reports a joined region. Signed-off-by: Javier López <[email protected]> Co-Authored-By: Claude Fable 5.2 <[email protected]> # Conflicts: # vllm/config/kv_transfer.py # vllm/config/vllm.py
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.
Overview
Log a startup warning when
TieringOffloadingSpec's secondary-tier KV is tied to the engine's parallel configuration, so engines with a different TP size will never hit it. This is the first follow-up listed in #62283.On current main this is a diagnostic only. #63373 removed Model Runner V1 and with it the path that read head-sharded KV written at another TP size (#62283). Topology-bound blocks now keep TP in their
FileMappernamespace, and cross-TP lookups miss. #55191 adds a two-GPU regression test for that isolation. What's still missing is anything at startup that tells the user their shared tier is per-topology.Related: #62283, #63373 (MRV1 removal), #55191 (cross-TP isolation regression test), #61822 (
canonical_layoutdocs).Claims
replicated_layoutis off), andcanonical_layoutis off, or it's on but the layers can't all be certified as parallelism-agnostic (for example Mamba/GDN hybrids), or PP, DCP or PCP is > 1.FileMapperalready lets it share direct-layout blocks across TP sizes.Validation
pre-commit run --files vllm/v1/kv_offload/tiering/spec.py tests/v1/kv_offload/test_factory.py: all hooks pass.pytest tests/v1/kv_offload/test_factory.py tests/v1/kv_connector/unit/offloading_connector/test_config.py tests/v1/kv_offload/tiering/test_tiering_offloading.py: 216 passed, 1 skipped (macOS, CPU).test_tiering_spec_warns_when_secondary_tiers_are_topology_bounddrives the realget_manager()with theexampletier. It fakes only the/dev/shmregion and the primary tier, as thecreate_workertests in that file do. It has 6 cases and asserts that exactly one warning is logged, or none:canonical_layoutis_parallelism_agnosticreplicated_layoutMutation checks against it:
replicated_layoutterm): the replicated MLA case fails.spec.pyfrommain: 3 cases fail.is_parallelism_agnostic: the "direct layout flagged agnostic" case fails.canonical_layout: the "canonical, uncertified" case fails.CI runs it in the "V1 KV Offload" step (
pytest -v -s v1/kv_offload).End-to-end on one L4 (Colab, base
04631c4915, an earlier revision that logged one message per case; the trigger conditions for these rows are unchanged). I ranvllm serve <model> --max-model-len 2048withOffloadingConnector,spec_name: TieringOffloadingSpec,cpu_bytes_to_use: 2 GiBandsecondary_tiers: [{"type": "fs", "root_dir": "/tmp/kvfs"}]. For each case I waited for/health, sent one completion, and counted warning lines. I didn't run the replicated MLA case end-to-end, because it needs TP ≥ 2 on an MLA model. The unit test covers it.canonical_layouttrue(all_layers_portable=True)true(all_layers_portable=False)The current message:
Details
fs/obj/p2ptier gets no cross-TP hits, and nothing at startup says why. Withcanonical_layouton, a model whose layers can't be certified (for example Mamba/GDN layers, which fall back to the opaque mapping) also keeps TP in its namespace, and only anall_layers_portable=Falseinfo line hints at it.TieringOffloadingSpec.get_manager(), next to the existing "Created TieringOffloadingManager" log. It runs once per engine on the scheduler side, whereas__init__also runs in the workers.secondary_tiers and not (replicated_layout or (canonical_layout and is_parallelism_agnostic)). It mirrors the namespace rule inFileMapper.from_spec, which drops TP when the layout is replicated or parallelism-agnostic. On current main,is_parallelism_agnosticis already False whenevercanonical_layoutis off. The explicitcanonical_layoutterm costs nothing and keeps the warning right if that gate changes. Withcanonical_layouton,is_parallelism_agnosticis also False for DCP > 1 orworld_size != tp_size(PP or PCP > 1), so the message names "no PP, DCP or PCP" alongside the layer requirement.exampletier (in-process memory) and thekvcrtier don't share KV across engines through theFileMappernamespace, but still get the warning. The advice is harmless there, and excluding them would mean hardcoding tier names in the spec.warning, as the issue asks. Happy to switch toinfoif it's too noisy for single-topology deployments.canonical_layoutin the KV offloading usage guide.tiering/spec.py.Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.