Skip to content

[Refactor] Nixl util using lazy init#41392

Open
yewentao256 wants to merge 8 commits intomainfrom
wentao-refactor-nixl-util
Open

[Refactor] Nixl util using lazy init#41392
yewentao256 wants to merge 8 commits intomainfrom
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>
Copy link
Copy Markdown

@claude claude Bot left a comment

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
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 30, 2026

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
Copy link
Copy Markdown
Contributor

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

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>
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