[Intel GPU] Align XPU toml file for rust support (#31031)

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-09-04 14:48:30 +08:00
committed by GitHub
parent 31ebd8f437
commit b168f905c8
2 changed files with 13 additions and 3 deletions
+12 -2
View File
@@ -51,14 +51,24 @@ Quantized MoE models are covered separately in
Currently SGLang XPU only supports installation from source. Please refer to ["Getting Started on Intel GPU"](https://docs.pytorch.org/docs/stable/notes/get_start_xpu.html) to install XPU dependency.
```bash Command
# Below commands shows Ubuntu/Debian OS as example, other OS requires similar command change
# add sudo if required to install below packages
# Install curl and protobuf compiler
apt-get update && apt-get install -y curl protobuf-compiler
# Install Rust (non-interactive)
curl --proto '=https' --tlsv1.2 --retry 3 --retry-delay 2 -sSf https://sh.rustup.rs | sh -s -- -y
# Make cargo available in the current shell
source "$HOME/.cargo/env"
# Create and activate a conda environment
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 xgrammar --no-deps # xgrammar will introduce CUDA-enabled triton which might conflict with XPU
pip3 install apache-tvm-ffi # xgrammar requires apache-tvm-ffi
pip3 install xgrammar==0.1.33 --no-deps # xgrammar will introduce CUDA-enabled triton which might conflict with XPU
# Clone the SGLang code
git clone https://github.com/sgl-project/sglang.git
+1 -1
View File
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0", "wheel"]
requires = ["setuptools>=61.0", "setuptools-rust>=1.10", "setuptools-scm>=8.0", "torch==2.13.0+xpu", "wheel"]
build-backend = "setuptools.build_meta"
[project]