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 13, 20:45 UTC
[NIXL][XPU] Pin NIXL version to 0.7.0 (#27849)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
liuzhenwei committed
Nov 4, 2025 at 11:28 UTC
14a125a06df7275923fe9748f67e27e449412d1f
1 file changed
+29
-2
tools/install_nixl_from_source_ubuntu.py
+29
-2
@@ -3,9 +3,11 @@
3
# install_prerequisites.py
4
import argparse
5
import glob
6
+import json
7
import os
8
import subprocess
9
import sys
10
+import urllib.request
11
12
# --- Configuration ---
13
WHEELS_CACHE_HOME = os.environ.get("WHEELS_CACHE_HOME", "/tmp/wheels_cache")
@@ -18,6 +20,20 @@ NIXL_REPO_URL = "https://github.com/ai-dynamo/nixl.git"
20
21
22
# --- Helper Functions ---
23
+def get_latest_nixl_version():
24
+ """Helper function to get latest release version of NIXL"""
25
+ try:
26
+ nixl_release_url = "https://api.github.com/repos/ai-dynamo/nixl/releases/latest"
27
+ with urllib.request.urlopen(nixl_release_url) as response:
28
+ data = json.load(response)
29
+ return data.get("tag_name", "0.7.0")
30
+ except Exception:
31
+ return "0.7.0"
32
+
33
+
34
+NIXL_VERSION = os.environ.get("NIXL_VERSION", get_latest_nixl_version())
35
+
36
+
37
def run_command(command, cwd=".", env=None):
38
"""Helper function to run a shell command and check for errors."""
39
print(f"--> Running command: {' '.join(command)} in '{cwd}'", flush=True)
@@ -37,7 +53,7 @@ def is_pip_package_installed(package_name):
53
def find_nixl_wheel_in_cache(cache_dir):
54
"""Finds a nixl wheel file in the specified cache directory."""
55
# The repaired wheel will have a 'manylinux' tag, but this glob still works.
40
- search_pattern = os.path.join(cache_dir, "nixl*.whl")
56
+ search_pattern = os.path.join(cache_dir, f"nixl*{NIXL_VERSION}*.whl")
57
wheels = glob.glob(search_pattern)
58
if wheels:
59
# Sort to get the most recent/highest version if multiple exist
@@ -146,6 +162,10 @@ def build_and_install_prerequisites(args):
162
print("\n[2/3] Building NIXL wheel from source...", flush=True)
163
if not os.path.exists(NIXL_DIR):
164
run_command(["git", "clone", NIXL_REPO_URL, NIXL_DIR])
165
+ else:
166
+ run_command(["git", "fetch", "--tags"], cwd=NIXL_DIR)
167
+ run_command(["git", "checkout", NIXL_VERSION], cwd=NIXL_DIR)
168
+ print(f"--> Checked out NIXL version: {NIXL_VERSION}", flush=True)
169
170
build_env = os.environ.copy()
171
build_env["PKG_CONFIG_PATH"] = os.path.join(ucx_install_path, "lib", "pkgconfig")
@@ -203,7 +223,14 @@ def build_and_install_prerequisites(args):
223
{os.path.basename(newly_built_wheel)}. Now installing...",
224
flush=True,
225
)
206
- install_command = [sys.executable, "-m", "pip", "install", newly_built_wheel]
226
+ install_command = [
227
+ sys.executable,
228
+ "-m",
229
+ "pip",
230
+ "install",
231
+ "--no-deps", # w/o "no-deps", it will install cuda-torch
232
+ newly_built_wheel,
233
+ ]
234
if args.force_reinstall:
235
install_command.insert(-1, "--force-reinstall")
236