A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 4, 03:45 UTC
[Misc] Delay EPLB Nixl import until needed (#41805)
Signed-off-by: NickLucche <nlucches@redhat.com>
Nicolò Lucchesi committed
May 7, 2026 at 18:43 UTC
9d6500b89d12f4d62ef9f2ab7292823b4255217c
1 file changed
+4
-4
vllm/distributed/eplb/eplb_communicator.py
+4
-4
@@ -23,10 +23,6 @@ from vllm.distributed.device_communicators.pynccl import PyNcclCommunicator
23
from vllm.distributed.device_communicators.pynccl_wrapper import (
24
ncclDataTypeEnum,
25
)
26
-from vllm.distributed.nixl_utils import (
27
- NixlWrapper,
28
- nixl_agent_config,
29
-)
26
from vllm.distributed.parallel_state import (
27
GroupCoordinator,
28
get_pp_group,
@@ -41,6 +37,8 @@ logger = init_logger(__name__)
37
38
def has_nixl() -> bool:
39
"""Whether the optional NIXL / RIXL package is available."""
40
+ from vllm.distributed.nixl_utils import NixlWrapper
41
+
42
return NixlWrapper is not None
43
44
@@ -235,6 +233,8 @@ class NixlEplbCommunicator(EplbCommunicator):
233
expert_weights: Sequence[torch.Tensor],
234
cuda_stream: torch.cuda.Stream | None = None,
235
) -> None:
236
+ from vllm.distributed.nixl_utils import NixlWrapper, nixl_agent_config
237
+
238
assert expert_weights, "NixlEplbCommunicator requires non-empty expert_weights."
239
if NixlWrapper is None:
240
raise RuntimeError("NIXL/ RIXL is unavailable.")