Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e1a7539
[XPU] upgrade sglang xpu backend to PyTorch 2.14
arathi-hlab Sep 29, 2026
dedab7b
[XPU] docs: install dev and diffusion extras in source build
arathi-hlab Sep 29, 2026
f4e20de
[XPU] install source sgl-kernel-xpu via pyproject_xpu.toml
arathi-hlab Sep 30, 2026
895784f
[XPU] drop --no-build-isolation and SG_LANG_KERNEL_TARGET for source …
arathi-hlab Sep 30, 2026
e2efade
Allow PyTorch 2.14 for the Rust TreeCore extension
arathi-hlab Sep 30, 2026
91e45e3
[Rust] Fix TreeCore extension build against PyTorch 2.14
pavansivaram Oct 1, 2026
54f6500
Merge upstream/main into update_pt214
pavansivaram Oct 7, 2026
4e3abf9
Merge branch 'main' into update_pt214
pavansivaram Oct 7, 2026
ee68843
Move to 2026.1.2 based U24.04 Image
pavansivaram Oct 7, 2026
2a4c9a3
Merge branch 'main' into update_pt214
pavansivaram Oct 7, 2026
cccda6c
Merge branch 'main' into update_pt214
pavansivaram Oct 7, 2026
da0833f
Merge branch 'main' into update_pt214
arathi-hlab Oct 7, 2026
190d8ec
Update driver version to avoid kernel failures with latest version
pavansivaram Oct 8, 2026
3b8dce4
Merge branch 'main' into update_pt214
pavansivaram Oct 8, 2026
365c232
Update torchcodec to 0.17.0
pavansivaram Oct 8, 2026
d060f3e
Merge branch 'main' into update_pt214
pavansivaram Oct 8, 2026
df91767
Merge branch 'main' into update_pt214
pavansivaram Oct 9, 2026
2b3368d
Merge branch 'main' into update_pt214
pavansivaram Oct 11, 2026
c72ad20
Bump sgl-kernel-xpu whl version to 0.4.0
pavansivaram Oct 11, 2026
d325ac1
Merge branch 'main' into update_pt214
arathi-hlab Oct 12, 2026
5ee1907
Merge branch 'main' into update_pt214
arathi-hlab Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 12 additions & 22 deletions docker/xpu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# docker build -t sglang:xpu -f xpu.Dockerfile --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} --build-arg no_proxy=${no_proxy} --no-cache .

# Use Intel deep learning essentials base image with Ubuntu 24.04
FROM intel/deep-learning-essentials:2026.0.0-devel-ubuntu24.04
FROM intel/deep-learning-essentials:2026.1.2-devel-ubuntu24.04

# Avoid interactive prompts during package install
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -17,15 +17,13 @@ ARG SG_LANG_KERNEL_REPO=https://github.com/sgl-project/sgl-kernel-xpu.git
ARG SG_LANG_KERNEL_BRANCH=main
# wheel: prebuilt sglang-kernel-xpu pinned in pyproject_xpu.toml; source: build SG_LANG_KERNEL_BRANCH.
ARG SG_LANG_KERNEL_SOURCE=wheel
# AOT target for source builds (bmg | cri); set explicitly since no GPU is visible during docker build.
ARG SG_LANG_KERNEL_TARGET=bmg

USER root

# Pin Level-Zero UMD + IGC (rolling PPA once faulted libze on B580; see sgl-kernel-xpu#296).
# Keep in lockstep with the host xe KMD; override via --build-arg.
ARG COMPUTE_RUNTIME_VERSION=26.18.38308.1
ARG IGC_VERSION=2.34.4+21428
ARG COMPUTE_RUNTIME_VERSION=26.27.39122.11
ARG IGC_VERSION=2.38.2+22051
ARG GMM_VERSION=22.10.0

RUN apt-get update && apt-get install -y software-properties-common curl && \
Expand Down Expand Up @@ -78,33 +76,25 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"

WORKDIR /sgl-workspace

RUN pip install --no-cache-dir torch==2.13.0+xpu torchvision==0.28.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu && \
RUN pip install --no-cache-dir torch==2.14.0+xpu torchvision==0.29.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu && \
pip install --no-cache-dir msgspec blake3 py-cpuinfo compressed_tensors gguf partial_json_parser einops tabulate --root-user-action=ignore

# SG_LANG_KERNEL_SOURCE=source points the sglang-kernel-xpu dependency at the kernel repo.
RUN echo "Cloning ${SG_LANG_BRANCH} from ${SG_LANG_REPO}" && \
git clone --branch ${SG_LANG_BRANCH} --single-branch ${SG_LANG_REPO} sglang && \
git -C sglang fetch --tags --force origin && \
cd sglang && cd python && \
if [ "${SG_LANG_KERNEL_SOURCE}" = "source" ]; then \
echo "Building sgl-kernel-xpu ${SG_LANG_KERNEL_BRANCH} from ${SG_LANG_KERNEL_REPO}" && \
sed -i -E "s|\"sglang-kernel-xpu @ [^\"]*\"|\"sglang-kernel-xpu @ git+${SG_LANG_KERNEL_REPO}@${SG_LANG_KERNEL_BRANCH}\"|" pyproject_xpu.toml && \
grep -q "sglang-kernel-xpu @ git+" pyproject_xpu.toml; \
elif [ "${SG_LANG_KERNEL_SOURCE}" != "wheel" ]; then \
echo "Invalid SG_LANG_KERNEL_SOURCE=${SG_LANG_KERNEL_SOURCE} (expected wheel or source)" && exit 1; \
fi && \
cp pyproject_xpu.toml pyproject.toml && \
pip install --no-cache-dir ".[dev,diffusion]" --extra-index-url https://download.pytorch.org/whl/xpu && \
pip install --no-cache-dir --no-deps xgrammar==0.1.33

# Optionally replace the prebuilt kernel wheel with a source build. --no-build-isolation
# so CMake finds the installed torch; build/ is removed to keep the image small.
RUN if [ "${SG_LANG_KERNEL_SOURCE}" = "source" ]; then \
echo "Building sgl-kernel-xpu ${SG_LANG_KERNEL_BRANCH} from ${SG_LANG_KERNEL_REPO} for ${SG_LANG_KERNEL_TARGET}" && \
git clone ${SG_LANG_KERNEL_REPO} sgl-kernel-xpu && \
git -C sgl-kernel-xpu checkout ${SG_LANG_KERNEL_BRANCH} && \
git -C sgl-kernel-xpu log -1 --format='sgl-kernel-xpu commit: %H %s' && \
pip install --no-cache-dir "scikit-build-core>=0.10" wheel cmake ninja && \
pip install -v --no-cache-dir --no-build-isolation --no-deps --force-reinstall \
--config-settings=cmake.define.DPCPP_SYCL_TARGET=${SG_LANG_KERNEL_TARGET} \
./sgl-kernel-xpu && \
rm -rf sgl-kernel-xpu/build; \
elif [ "${SG_LANG_KERNEL_SOURCE}" != "wheel" ]; then \
echo "Invalid SG_LANG_KERNEL_SOURCE=${SG_LANG_KERNEL_SOURCE} (expected wheel or source)" && exit 1; \
fi

# Install torch_memory_saver for release/resume_memory_occupation ("memory saver").
# XPU ships no prebuilt wheel: it is built from source against the local oneAPI +
# torch-XPU runtime (the .so links libsycl.so.<N>, which must match the installed
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/hardware-platforms/xpu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.13.0+xpu torchvision==0.28.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu
pip3 install torch==2.14.0+xpu torchvision==0.29.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu
pip3 install xgrammar==0.1.33 --no-deps # xgrammar will introduce CUDA-enabled triton which might conflict with XPU

# Clone the SGLang code
Expand All @@ -49,7 +49,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 . --extra-index-url https://download.pytorch.org/whl/xpu
pip install -v ".[dev,diffusion]" --extra-index-url https://download.pytorch.org/whl/xpu
```

### Install Using Docker
Expand Down
8 changes: 4 additions & 4 deletions python/pyproject_xpu.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools-rust>=1.10", "setuptools-scm>=8.0", "torch==2.13.0+xpu", "wheel"]
requires = ["setuptools>=61.0", "setuptools-rust>=1.10", "setuptools-scm>=8.0", "torch==2.14.0+xpu", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand Down Expand Up @@ -61,10 +61,10 @@ dependencies = [
"soundfile==0.13.1",
"tiktoken",
"timm==1.0.16",
"torch==2.13.0+xpu",
"torch==2.14.0+xpu",
"torchaudio==2.11.0+xpu",
"torchcodec==0.13.0 ; sys_platform != 'linux' or (sys_platform == 'linux' and platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')", # torch==2.13.0 on XPU uses torchcodec 0.13.0
"torchvision==0.28.0+xpu",
"torchcodec==0.16.0 ; sys_platform != 'linux' or (sys_platform == 'linux' and platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')", # torch==2.14.0 on XPU uses torchcodec 0.16.0
Comment thread
pavansivaram marked this conversation as resolved.
Resolved
"torchvision==0.29.0+xpu",
"tqdm",
"transformers==5.19.0",
"uvicorn",
Expand Down
Loading