[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:
committed by
GitHub
parent
16ec4f3a4a
commit
b2dd104ade
@@ -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 .
|
||||
|
||||
# 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
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
@@ -48,7 +48,7 @@ RUN --mount=type=secret,id=github_token \
|
||||
cd /home/sdp && \
|
||||
. /home/sdp/miniforge3/bin/activate && \
|
||||
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 \
|
||||
cd /home/sdp && \
|
||||
|
||||
@@ -30,7 +30,7 @@ conda create -n sgl-xpu python=3.12 -y
|
||||
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.
|
||||
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
|
||||
|
||||
# Clone the SGLang code
|
||||
@@ -43,7 +43,7 @@ cd python
|
||||
cp pyproject_xpu.toml pyproject.toml
|
||||
# Install SGLang dependent libs, and build SGLang main package
|
||||
pip install --upgrade pip setuptools
|
||||
pip install -v .
|
||||
pip install -v . --extra-index-url https://download.pytorch.org/whl/xpu
|
||||
```
|
||||
|
||||
### Install Using Docker
|
||||
|
||||
@@ -15,10 +15,10 @@ classifiers = [
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"torch==2.9.0",
|
||||
"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
|
||||
"torch==2.10.0+xpu",
|
||||
"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')",
|
||||
"torchaudio==2.9.0",
|
||||
"torchaudio==2.10.0+xpu",
|
||||
"torchvision",
|
||||
"sgl-kernel @ git+https://github.com/sgl-project/sgl-kernel-xpu.git",
|
||||
"IPython",
|
||||
@@ -73,25 +73,32 @@ dependencies = [
|
||||
|
||||
[project.optional-dependencies]
|
||||
tracing = [
|
||||
"opentelemetry-sdk",
|
||||
"opentelemetry-api",
|
||||
"opentelemetry-exporter-otlp",
|
||||
"opentelemetry-exporter-otlp-proto-grpc",
|
||||
"opentelemetry-sdk",
|
||||
]
|
||||
test = [
|
||||
"accelerate",
|
||||
"bitsandbytes",
|
||||
"expecttest",
|
||||
"jsonlines",
|
||||
"lm-eval[api]>=0.4.9.2",
|
||||
"matplotlib",
|
||||
"pandas",
|
||||
"parameterized",
|
||||
"peft",
|
||||
"pytest",
|
||||
"sentence_transformers",
|
||||
"tabulate",
|
||||
]
|
||||
all = []
|
||||
|
||||
dev = ["sglang[test]"]
|
||||
|
||||
all = [
|
||||
"sglang[tracing]",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
"Homepage" = "https://github.com/sgl-project/sglang"
|
||||
"Bug Tracker" = "https://github.com/sgl-project/sglang/issues"
|
||||
@@ -130,4 +137,6 @@ exclude = [
|
||||
[tool.setuptools_scm]
|
||||
root = ".."
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user