Skip to content

[Bugfix][NIXL] Include transfer mode (push/pull) in the compatibility hash - #50620

Merged
DarkLight1337 merged 2 commits into
vllm-project:mainfrom
tzulingk:fix/nixl-push-pull-compat
Aug 14, 2026
Merged

[Bugfix][NIXL] Include transfer mode (push/pull) in the compatibility hash#50620
DarkLight1337 merged 2 commits into
vllm-project:mainfrom
tzulingk:fix/nixl-push-pull-compat

Conversation

@tzulingk

@tzulingk tzulingk commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Overview:

Include the NIXL transfer mode (push vs pull) in the connector so a push (WRITE) connector and a pull (READ) connector can never be paired, and so an external router can distinguish them. Follow-up to #49230 (now merged), addressing review feedback from @iyastreb (#49230 thread, this PR's thread).

Details:

The push (NixlPushConnector, WRITE) and pull (NixlConnector, READ) connectors use incompatible transfer protocols, but nothing prevented them from being paired across prefill/decode, and the transfer mode wasn't visible to an external router.

Compatibility hash (worker side):

  • NixlBaseConnectorWorker._TRANSFER_MODE = "pull", overridden to "push" in NixlPushConnectorWorker, threaded into compute_nixl_compatibility_hash.
  • Add transfer_mode to the compatibility-hash factors so mismatched connectors are rejected early at handshake with a clear message.
  • Bump the NIXL connector version 6 → 7 and document the new factor.

Router support (scheduler side):

  • NixlBaseConnectorScheduler._TRANSFER_MODE = "pull", overridden to "push" in NixlPushConnectorScheduler.
  • Emit transfer_mode in the kv_transfer_params returned by both the pull and push request_finished paths, so an external router can route pull vs push producers. Consumed by vllm-project/router#187.

Not a duplicate: this transfer-mode work was split out of #49230 (which fixed the speculative-config factors) to keep that PR scoped; no other open PR addresses mixing push/pull connectors.

Tests run:

  • .venv/bin/python -m pytest tests/v1/kv_connector/unit/test_nixl_connector.py -k "transfer_mode_changes_compatibility_hash or scheduler_advertises_transfer_mode or speculative_config_compatibility_hash" -qpassed.
  • pre-commit run --files <the 8 changed files> — all applicable hooks passed.
  • GPU-dependent handshake tests were not run locally (macOS, no CUDA); relying on CI.

AI assistance was used to investigate, implement, and test this change. Every changed line was reviewed by the human submitter before submission.

Where should the reviewer start?

  • vllm/distributed/kv_transfer/kv_connector/v1/nixl/metadata.pycompute_nixl_compatibility_hash (new transfer_mode factor + version bump).
  • base_worker.py / push_worker.py — worker _TRANSFER_MODE.
  • base_scheduler.py / pull_scheduler.py / push_scheduler.py — scheduler _TRANSFER_MODE emitted into kv_transfer_params.
  • tests/v1/kv_connector/unit/test_nixl_connector.py — hash test, scheduler-mode test, and the pull kv_transfer_params assertion.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment /ci run whenever CI signals are needed.

Once the PR is approved or has the ready label, the PR author can also use /ci run or /ci retry. New commits do not start CI automatically.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

Agent Guidelines

IMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban.

🚀

@mergify

mergify Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Documentation preview: https://vllm--50620.org.readthedocs.build/en/50620/

@mergify mergify Bot added documentation Improvements or additions to documentation bug Something isn't working kv-connector labels Jul 31, 2026
Comment thread vllm/distributed/kv_transfer/kv_connector/v1/nixl/metadata.py
@tzulingk
tzulingk force-pushed the fix/nixl-push-pull-compat branch from c93ed3f to b260168 Compare August 3, 2026 19:06
@tlrmchlsmth
tlrmchlsmth enabled auto-merge (squash) August 13, 2026 02:24
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 13, 2026
@tlrmchlsmth

Copy link
Copy Markdown
Member

/ci run

@tlrmchlsmth tlrmchlsmth added ready ONLY add when PR is ready to merge/full CI is needed and removed ready ONLY add when PR is ready to merge/full CI is needed labels Aug 13, 2026
@github-actions

Copy link
Copy Markdown

@tzulingk, CI is now available for this PR.

  • /ci run starts a CI build.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /ci cancel cancels scheduled or running CI builds for this PR branch.

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83649 for commit aa50d198f755.

tzulingk and others added 2 commits August 13, 2026 19:21
… hash

The push (WRITE) and pull (READ) NIXL connectors use incompatible transfer
protocols, but nothing currently prevents a push connector and a pull connector
from completing a handshake with each other. Add the transfer mode to the NIXL
compatibility hash so mismatched connectors are rejected early with a clear
message instead of failing later during transfer.

- `NixlBaseConnectorWorker._TRANSFER_MODE = "pull"`, overridden to `"push"` in
  `NixlPushConnectorWorker`; threaded into `compute_nixl_compatibility_hash`.
- Bump NIXL connector version 5 -> 6.
- Add a unit test and a docs note under "What must match".

Follow-up to vllm-project#49230 (addresses review feedback from @iyastreb). Note: vllm-project#49230
also bumps the connector version to 6; whichever of the two lands second should
renumber to 7.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Tzu-Ling <tzulingk@nvidia.com>
Advertise the connector's transfer mode (push vs pull) in the
kv_transfer_params returned by the scheduler, so an external router can
distinguish a pull (READ) producer from a push (WRITE) one
(see vllm-project/router#187).

- Add `_TRANSFER_MODE` to the scheduler classes (base = "pull", overridden to
  "push" in `NixlPushConnectorScheduler`).
- Emit `transfer_mode` in the `kv_transfer_params` dict from both the pull and
  push `request_finished` paths.
- Test the pull path end-to-end and the schedulers' advertised modes.

Addresses review feedback from @iyastreb.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Tzu-Ling <tzulingk@nvidia.com>
auto-merge was automatically disabled August 14, 2026 00:22

Head branch was pushed to by a user without write access

@tzulingk
tzulingk force-pushed the fix/nixl-push-pull-compat branch from aa50d19 to 7edf762 Compare August 14, 2026 00:22
@tzulingk

Copy link
Copy Markdown
Contributor Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #83813 for commit 7edf76276e0b.

@DarkLight1337
DarkLight1337 merged commit 653cc6f into vllm-project:main Aug 14, 2026
40 checks passed
Alessandra005 pushed a commit to Alessandra005/vllm that referenced this pull request Aug 17, 2026
… hash (vllm-project#50620)

Signed-off-by: Tzu-Ling <tzulingk@nvidia.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Alessandra005 <aurib032@fiu.edu>
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
… hash (vllm-project#50620)

Signed-off-by: Tzu-Ling <tzulingk@nvidia.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
wyettzeng pushed a commit to wyettzeng/vllm that referenced this pull request Aug 21, 2026
… hash (vllm-project#50620)

Signed-off-by: Tzu-Ling <tzulingk@nvidia.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Wyett <wyettzeng@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation kv-connector ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants