From 14949379e490dde7d578bd1b653f368323c82a80 Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Fri, 31 Oct 2025 01:22:58 +0000 Subject: [PATCH 1/7] [NIXL][XPU] pin nixl version Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index 742aab6b0de7..8e069565f4d0 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -9,6 +9,7 @@ # --- Configuration --- WHEELS_CACHE_HOME = os.environ.get("WHEELS_CACHE_HOME", "/tmp/wheels_cache") +NIXL_VERSION = os.environ.get("NIXL_VERSION", "0.7.0") ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) UCX_DIR = os.path.join("/tmp", "ucx_source") NIXL_DIR = os.path.join("/tmp", "nixl_source") @@ -37,7 +38,7 @@ def is_pip_package_installed(package_name): def find_nixl_wheel_in_cache(cache_dir): """Finds a nixl wheel file in the specified cache directory.""" # The repaired wheel will have a 'manylinux' tag, but this glob still works. - search_pattern = os.path.join(cache_dir, "nixl*.whl") + search_pattern = os.path.join(cache_dir, f"nixl*{NIXL_VERSION}*.whl") wheels = glob.glob(search_pattern) if wheels: # Sort to get the most recent/highest version if multiple exist @@ -146,6 +147,7 @@ def build_and_install_prerequisites(args): print("\n[2/3] Building NIXL wheel from source...", flush=True) if not os.path.exists(NIXL_DIR): run_command(["git", "clone", NIXL_REPO_URL, NIXL_DIR]) + run_command(["git", "checkout", NIXL_VERSION], cwd=NIXL_DIR) build_env = os.environ.copy() build_env["PKG_CONFIG_PATH"] = os.path.join(ucx_install_path, "lib", "pkgconfig") From 90288c0e535ff7d147009895b163e22f35f1c13d Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Fri, 31 Oct 2025 02:25:44 +0000 Subject: [PATCH 2/7] fetch code Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index 8e069565f4d0..e2f4ddbe5cff 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -147,6 +147,8 @@ def build_and_install_prerequisites(args): print("\n[2/3] Building NIXL wheel from source...", flush=True) if not os.path.exists(NIXL_DIR): run_command(["git", "clone", NIXL_REPO_URL, NIXL_DIR]) + else: + run_command(["git", "fetch", "--tags"], cwd=NIXL_DIR) run_command(["git", "checkout", NIXL_VERSION], cwd=NIXL_DIR) build_env = os.environ.copy() From 31c4c36f22c18297b3eeb08789d4a841ddc03126 Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Fri, 31 Oct 2025 06:43:04 +0000 Subject: [PATCH 3/7] fetch latest release version Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index e2f4ddbe5cff..01065465c759 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -6,10 +6,11 @@ import os import subprocess import sys +import json +import urllib.request # --- Configuration --- WHEELS_CACHE_HOME = os.environ.get("WHEELS_CACHE_HOME", "/tmp/wheels_cache") -NIXL_VERSION = os.environ.get("NIXL_VERSION", "0.7.0") ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) UCX_DIR = os.path.join("/tmp", "ucx_source") NIXL_DIR = os.path.join("/tmp", "nixl_source") @@ -19,6 +20,17 @@ # --- Helper Functions --- +def get_latest_nixl_version(): + """Helper function to get latest release version of NIXL""" + try: + nixl_release_url = "https://api.github.com/repos/ai-dynamo/nixl/releases/latest" + with urllib.request.urlopen(nixl_release_url) as response: + data = json.load(response) + return data.get("tag_name", "0.7.0") + except Exception: + return "0.7.0" +NIXL_VERSION = os.environ.get("NIXL_VERSION", get_latest_nixl_version()) + def run_command(command, cwd=".", env=None): """Helper function to run a shell command and check for errors.""" print(f"--> Running command: {' '.join(command)} in '{cwd}'", flush=True) @@ -150,6 +162,7 @@ def build_and_install_prerequisites(args): else: run_command(["git", "fetch", "--tags"], cwd=NIXL_DIR) run_command(["git", "checkout", NIXL_VERSION], cwd=NIXL_DIR) + print(f"--> Checked out NIXL version: {NIXL_VERSION}", flush=True) build_env = os.environ.copy() build_env["PKG_CONFIG_PATH"] = os.path.join(ucx_install_path, "lib", "pkgconfig") From 827a15796dc852238fe355cab768263f2a01798a Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Mon, 3 Nov 2025 01:27:50 +0000 Subject: [PATCH 4/7] make precommit happy Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index 01065465c759..534b1649bad6 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -3,10 +3,10 @@ # install_prerequisites.py import argparse import glob +import json import os import subprocess import sys -import json import urllib.request # --- Configuration --- From 5f486a199b7e9e8fd07a7edc240ecd485eb5bfb8 Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Mon, 3 Nov 2025 01:28:17 +0000 Subject: [PATCH 5/7] make precommit happy Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index 534b1649bad6..486e3a65a264 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -29,8 +29,11 @@ def get_latest_nixl_version(): return data.get("tag_name", "0.7.0") except Exception: return "0.7.0" + + NIXL_VERSION = os.environ.get("NIXL_VERSION", get_latest_nixl_version()) + def run_command(command, cwd=".", env=None): """Helper function to run a shell command and check for errors.""" print(f"--> Running command: {' '.join(command)} in '{cwd}'", flush=True) From 03cf995ce440913e101ec2c4d1a07c56526b4460 Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Mon, 3 Nov 2025 07:47:58 +0000 Subject: [PATCH 6/7] add no-deps Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index 486e3a65a264..a8b0d2126f4a 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -223,7 +223,14 @@ def build_and_install_prerequisites(args): {os.path.basename(newly_built_wheel)}. Now installing...", flush=True, ) - install_command = [sys.executable, "-m", "pip", "install", newly_built_wheel] + install_command = [ + sys.executable, + "-m", + "pip", + "install", + "--no-deps", + newly_built_wheel, + ] if args.force_reinstall: install_command.insert(-1, "--force-reinstall") From 086e61da4e2562b45d7b5f2ad98a7a5dce2be4f0 Mon Sep 17 00:00:00 2001 From: zhenwei-intel Date: Tue, 4 Nov 2025 02:08:47 +0000 Subject: [PATCH 7/7] add comment Signed-off-by: zhenwei-intel --- tools/install_nixl_from_source_ubuntu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install_nixl_from_source_ubuntu.py b/tools/install_nixl_from_source_ubuntu.py index a8b0d2126f4a..4a20b6b7bb8f 100644 --- a/tools/install_nixl_from_source_ubuntu.py +++ b/tools/install_nixl_from_source_ubuntu.py @@ -228,7 +228,7 @@ def build_and_install_prerequisites(args): "-m", "pip", "install", - "--no-deps", + "--no-deps", # w/o "no-deps", it will install cuda-torch newly_built_wheel, ] if args.force_reinstall: