From b168f905c8f32b9fd226cd1a183ec7b1087440f3 Mon Sep 17 00:00:00 2001 From: Polisetty V R K Jyothendra Varma Date: Fri, 4 Sep 2026 12:18:30 +0530 Subject: [PATCH] [Intel GPU] Align XPU toml file for rust support (#31031) Signed-off-by: P V R K Jyothendra Varma --- docs/docs/hardware-platforms/xpu.mdx | 14 ++++++++++++-- python/pyproject_xpu.toml | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/docs/hardware-platforms/xpu.mdx b/docs/docs/hardware-platforms/xpu.mdx index 13356b160..93e3b59e0 100644 --- a/docs/docs/hardware-platforms/xpu.mdx +++ b/docs/docs/hardware-platforms/xpu.mdx @@ -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 diff --git a/python/pyproject_xpu.toml b/python/pyproject_xpu.toml index d2905a10c..9ed354339 100644 --- a/python/pyproject_xpu.toml +++ b/python/pyproject_xpu.toml @@ -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]