update pytorch-xpu to 2.12 (#27133)
Co-authored-by: Ma Mingfei <mingfei.ma@intel.com> Co-authored-by: MingxuZh <109504044+MingxuZh@users.noreply.github.com>
This commit is contained in:
co-authored by
Ma Mingfei
MingxuZh
parent
77c4d53f19
commit
bcd9c5a903
@@ -43,14 +43,13 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||
WORKDIR /sgl-workspace
|
||||
|
||||
RUN pip install --no-cache-dir msgspec blake3 py-cpuinfo compressed_tensors gguf partial_json_parser einops tabulate --root-user-action=ignore && \
|
||||
pip install --no-cache-dir torch==2.11.0+xpu torchao torchvision torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu
|
||||
pip install --no-cache-dir torch==2.12.0+xpu torchao==0.17.0+xpu torchvision==0.27.0+xpu torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu
|
||||
|
||||
RUN echo "Cloning ${SG_LANG_BRANCH} from ${SG_LANG_REPO}" && \
|
||||
git clone --branch ${SG_LANG_BRANCH} --single-branch ${SG_LANG_REPO} sglang && \
|
||||
cd sglang && cd python && \
|
||||
cp pyproject_xpu.toml pyproject.toml && \
|
||||
pip install --no-cache-dir . --extra-index-url https://download.pytorch.org/whl/xpu && \
|
||||
pip install --no-cache-dir --no-deps xgrammar==0.1.33 && \
|
||||
pip install triton-xpu==3.7.1 --index-url https://download.pytorch.org/whl/test/xpu --force-reinstall
|
||||
pip install --no-cache-dir --no-deps xgrammar==0.1.33
|
||||
|
||||
CMD ["bash", "-c", "source /opt/intel/oneapi/setvars.sh --force && exec bash"]
|
||||
|
||||
@@ -53,7 +53,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.11.0+xpu torchao torchvision torchaudio==2.11.0+xpu --index-url https://download.pytorch.org/whl/xpu
|
||||
pip3 install torch==2.12.0+xpu torchao==0.17.0+xpu torchvision==0.27.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
|
||||
|
||||
@@ -68,8 +68,6 @@ 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
|
||||
# Using this version of triton-xpu to avoid a bug in the version shipped with torch 2.11.0+xpu
|
||||
pip install triton-xpu==3.7.1 --index-url https://download.pytorch.org/whl/xpu --force-reinstall
|
||||
```
|
||||
|
||||
### Install Using Docker
|
||||
|
||||
@@ -15,11 +15,11 @@ classifiers = [
|
||||
]
|
||||
|
||||
dependencies = [
|
||||
"torch==2.11.0+xpu",
|
||||
"torchcodec==0.11.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.11.0 on XPU uses 0.11.0
|
||||
"torch==2.12.0+xpu",
|
||||
"torchcodec==0.12.0 ; sys_platform != 'linux' or (sys_platform == 'linux' and platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')", # torch==2.12.0 on XPU uses torchcodec 0.12.0
|
||||
"av ; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64' or platform_machine == 'armv7l')",
|
||||
"torchaudio==2.11.0+xpu",
|
||||
"torchvision",
|
||||
"torchvision==0.27.0+xpu",
|
||||
"sgl-kernel @ git+https://github.com/sgl-project/sgl-kernel-xpu.git",
|
||||
"IPython",
|
||||
"aiohttp",
|
||||
@@ -60,7 +60,7 @@ dependencies = [
|
||||
"soundfile==0.13.1",
|
||||
"tiktoken",
|
||||
"timm==1.0.16",
|
||||
"torchao==0.9.0+xpu",
|
||||
"torchao==0.17.0+xpu",
|
||||
"tqdm",
|
||||
"mistral_common>=1.11.0",
|
||||
"transformers==5.8.1",
|
||||
|
||||
Reference in New Issue
Block a user