Skip to content

[Refactor] Nixl util using lazy init - #41392

Merged
yewentao256 merged 9 commits into
mainfrom
wentao-refactor-nixl-util
May 9, 2026
Merged

yewentao256 merged 9 commits into
mainfrom
wentao-refactor-nixl-util

Conversation

@yewentao256

Copy link
Copy Markdown
Member

Summary

  • make vllm.distributed.nixl_utils resolve optional NIXL / RIXL symbols lazily
  • avoid triggering NIXL-related import side effects during module import
  • update EPLB NIXL access to fetch symbols through nixl_utils at runtime
  • avoid duplicate logs
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available
INFO 04-29 21:05:22 [nixl_utils.py:32] NIXL is available

Signed-off-by: yewentao256 <zhyanwentao@126.com>

@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 repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@yewentao256 yewentao256 added the ready ONLY add when PR is ready to merge/full CI is needed label Apr 30, 2026
@mergify

mergify Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Hi @yewentao256, the pre-commit checks have failed. Please run:

uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy failing?
mypy is run differently in CI. If the failure is related to this check, please use the following command to run it locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10

@mergify mergify Bot added the kv-connector label Apr 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the nixl_utils module to implement lazy loading of NIXL and RIXL dependencies using getattr. This change ensures that these modules are only imported upon access and that necessary environment variables are configured immediately prior to loading. The eplb_communicator.py file was updated to use the new module-level access pattern. I have no feedback to provide as there were no review comments to evaluate.

yewentao256 and others added 3 commits May 6, 2026 09:46
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
yewentao256 and others added 2 commits May 8, 2026 22:37
Signed-off-by: yewentao256 <zhyanwentao@126.com>
@yewentao256
yewentao256 merged commit f80aa53 into main May 9, 2026
74 checks passed
@yewentao256
yewentao256 deleted the wentao-refactor-nixl-util branch May 9, 2026 21:46
weifang231 pushed a commit to weifang231/eb-vllm that referenced this pull request May 13, 2026
Signed-off-by: yewentao256 <zhyanwentao@126.com>
mfylcek pushed a commit to mfylcek/vllm that referenced this pull request May 19, 2026
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants