[Intel GPU] Upgrade pytorch xpu version to 2.10 (#20254)

Signed-off-by: P V R K Jyothendra Varma <polisetty.v.r.k.jyothendra.varma@intel.com>
This commit is contained in:
Polisetty V R K Jyothendra Varma
2026-03-11 07:17:25 +05:30
committed by GitHub
parent 16ec4f3a4a
commit b2dd104ade
3 changed files with 19 additions and 10 deletions

View File

@@ -3,7 +3,7 @@
# Usage: docker build --build-arg UBUNTU_VERSION=24.04 --build-arg PYTHON_VERSION=3.10 -t sglang:xpu_kernel -f xpu.Dockerfile --no-cache . # Usage: docker build --build-arg UBUNTU_VERSION=24.04 --build-arg PYTHON_VERSION=3.10 -t sglang:xpu_kernel -f xpu.Dockerfile --no-cache .
# Use Intel deep learning essentials base image with Ubuntu 24.04 # Use Intel deep learning essentials base image with Ubuntu 24.04
FROM intel/deep-learning-essentials:2025.2.2-0-devel-ubuntu24.04 FROM intel/deep-learning-essentials:2025.3.2-0-devel-ubuntu24.04
# Avoid interactive prompts during package install # Avoid interactive prompts during package install
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
@@ -48,7 +48,7 @@ RUN --mount=type=secret,id=github_token \
cd /home/sdp && \ cd /home/sdp && \
. /home/sdp/miniforge3/bin/activate && \ . /home/sdp/miniforge3/bin/activate && \
conda activate py${PYTHON_VERSION} && \ conda activate py${PYTHON_VERSION} && \
pip3 install torch==2.9.0+xpu torchao torchvision torchaudio pytorch-triton-xpu==3.5.0 --index-url https://download.pytorch.org/whl/xpu pip3 install torch==2.10.0+xpu torchao torchvision torchaudio triton-xpu==3.6.0 --index-url https://download.pytorch.org/whl/xpu
RUN --mount=type=secret,id=github_token \ RUN --mount=type=secret,id=github_token \
cd /home/sdp && \ cd /home/sdp && \

View File

@@ -30,7 +30,7 @@ conda create -n sgl-xpu python=3.12 -y
conda activate sgl-xpu conda activate sgl-xpu
# Set PyTorch XPU as primary pip install channel to avoid installing the larger CUDA-enabled version and prevent potential runtime issues. # Set PyTorch XPU as primary pip install channel to avoid installing the larger CUDA-enabled version and prevent potential runtime issues.
pip3 install torch==2.9.0+xpu torchao torchvision torchaudio pytorch-triton-xpu==3.5.0 --index-url https://download.pytorch.org/whl/xpu pip3 install torch==2.10.0+xpu torchao torchvision torchaudio triton-xpu==3.6.0 --index-url https://download.pytorch.org/whl/xpu
pip3 install xgrammar --no-deps # xgrammar will introduce CUDA-enabled triton which might conflict with XPU pip3 install xgrammar --no-deps # xgrammar will introduce CUDA-enabled triton which might conflict with XPU
# Clone the SGLang code # Clone the SGLang code
@@ -43,7 +43,7 @@ cd python
cp pyproject_xpu.toml pyproject.toml cp pyproject_xpu.toml pyproject.toml
# Install SGLang dependent libs, and build SGLang main package # Install SGLang dependent libs, and build SGLang main package
pip install --upgrade pip setuptools pip install --upgrade pip setuptools
pip install -v . pip install -v . --extra-index-url https://download.pytorch.org/whl/xpu
``` ```
### Install Using Docker ### Install Using Docker

View File

@@ -15,10 +15,10 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"torch==2.9.0", "torch==2.10.0+xpu",
"torchcodec==0.9.1 ; sys_platform != 'linux' or (sys_platform == 'linux' and platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')", # torchcodec does not exist in those systems. torch==2.9.0 on XPU uses 0.9.1 "torchcodec==0.10.0 ; sys_platform != 'linux' or (sys_platform == 'linux' and platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')", # torchcodec does not exist in those systems. torch==2.10.0 on XPU uses 0.10.0
"av ; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'armv7l')", "av ; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'armv7l')",
"torchaudio==2.9.0", "torchaudio==2.10.0+xpu",
"torchvision", "torchvision",
"sgl-kernel @ git+https://github.com/sgl-project/sgl-kernel-xpu.git", "sgl-kernel @ git+https://github.com/sgl-project/sgl-kernel-xpu.git",
"IPython", "IPython",
@@ -73,25 +73,32 @@ dependencies = [
[project.optional-dependencies] [project.optional-dependencies]
tracing = [ tracing = [
"opentelemetry-sdk",
"opentelemetry-api", "opentelemetry-api",
"opentelemetry-exporter-otlp", "opentelemetry-exporter-otlp",
"opentelemetry-exporter-otlp-proto-grpc", "opentelemetry-exporter-otlp-proto-grpc",
"opentelemetry-sdk",
] ]
test = [ test = [
"accelerate", "accelerate",
"bitsandbytes",
"expecttest", "expecttest",
"jsonlines", "jsonlines",
"lm-eval[api]>=0.4.9.2",
"matplotlib", "matplotlib",
"pandas", "pandas",
"parameterized",
"peft", "peft",
"pytest", "pytest",
"sentence_transformers", "sentence_transformers",
"tabulate", "tabulate",
] ]
all = []
dev = ["sglang[test]"] dev = ["sglang[test]"]
all = [
"sglang[tracing]",
]
[project.urls] [project.urls]
"Homepage" = "https://github.com/sgl-project/sglang" "Homepage" = "https://github.com/sgl-project/sglang"
"Bug Tracker" = "https://github.com/sgl-project/sglang/issues" "Bug Tracker" = "https://github.com/sgl-project/sglang/issues"
@@ -130,4 +137,6 @@ exclude = [
[tool.setuptools_scm] [tool.setuptools_scm]
root = ".." root = ".."
version_file = "sglang/_version.py" version_file = "sglang/_version.py"
git_describe_command = ["git", "describe", "--tags", "--long", "--match", "v*"] git_describe_command = ["bash", "-c", "git tag --list --sort=-version:refname 'v*.*.*' | head -1 | xargs git describe --tags --long"]
# Allow editable installs even when .git metadata is not available.
fallback_version = "0.0.0.dev0"