[XPU] add apache-tvm-ffi dependency (#26053)

This commit is contained in:
jiayisunx
2026-05-22 16:09:08 +08:00
committed by GitHub
parent 88a37d7405
commit 6339295556
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -68,6 +68,7 @@ RUN --mount=type=secret,id=github_token \
cp pyproject_xpu.toml pyproject.toml && \ cp pyproject_xpu.toml pyproject.toml && \
pip install . --extra-index-url https://download.pytorch.org/whl/xpu && \ pip install . --extra-index-url https://download.pytorch.org/whl/xpu && \
pip install --no-deps xgrammar==0.1.33 && \ pip install --no-deps xgrammar==0.1.33 && \
pip install apache-tvm-ffi && \
pip install triton-xpu==3.7.1 --index-url https://download.pytorch.org/whl/xpu --force-reinstall && \ pip install triton-xpu==3.7.1 --index-url https://download.pytorch.org/whl/xpu --force-reinstall && \
# Add environment setup commands to .bashrc again (in case it was overwritten) # Add environment setup commands to .bashrc again (in case it was overwritten)
echo ". /home/sdp/miniforge3/bin/activate; conda activate py${PYTHON_VERSION}; cd /home/sdp" >> /home/sdp/.bashrc echo ". /home/sdp/miniforge3/bin/activate; conda activate py${PYTHON_VERSION}; cd /home/sdp" >> /home/sdp/.bashrc
+1
View File
@@ -55,6 +55,7 @@ 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.11.0+xpu torchao torchvision torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu pip3 install torch==2.11.0+xpu torchao torchvision 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 xgrammar --no-deps # xgrammar will introduce CUDA-enabled triton which might conflict with XPU
pip3 install apache-tvm-ffi # xgrammar requires apache-tvm-ffi
# Clone the SGLang code # Clone the SGLang code
git clone https://github.com/sgl-project/sglang.git git clone https://github.com/sgl-project/sglang.git