Skip to content

Commit 2bca097

Browse files
authored
Fix Installation & Build issues in compile_bundle.bat (#5147)
* Fix versions of torch torchaudio torchvision * fix version of torch-ccl * change /us to /cn * WA: add environment variables for torch build on windows occurs in some environment
1 parent 974beb7 commit 2bca097

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

docker/build.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ if [[ ${IMAGE_TYPE} = "xpu" ]]; then
1818
--build-arg TORCHVISION_VERSION=0.20.1+cxx11.abi \
1919
--build-arg TORCHAUDIO_VERSION=2.5.1+cxx11.abi \
2020
--build-arg ONECCL_BIND_PT_VERSION=2.5.0+xpu \
21-
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
22-
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
23-
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
24-
--build-arg TORCHAUDIO_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
25-
--build-arg ONECCL_BIND_PT_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
21+
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
22+
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
23+
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
24+
--build-arg TORCHAUDIO_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
25+
--build-arg ONECCL_BIND_PT_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
2626
-t ${IMAGE_NAME} \
2727
-f Dockerfile.prebuilt .
2828
fi

docs/tutorials/features/DDP.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ For more detailed information, check [Installation Guide](https://intel.github.i
2525

2626
```
2727
# Generic Python* for CPU
28-
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/cpu/us/
28+
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/cpu/cn/
2929
# Generic Python* for GPU
30-
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
30+
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
3131
```
3232

3333
Installation from either repository shares the command below. Replace the place holder `<REPO_URL>` with a real URL mentioned above.

examples/gpu/llm/tools/env_setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ if [ $((${MODE} & 0x02)) -ne 0 ]; then
6565
echo "#!/bin/bash" > ${AUX_INSTALL_SCRIPT}
6666
echo "set -e" >> ${AUX_INSTALL_SCRIPT}
6767
if [ $((${MODE} & 0x04)) -ne 0 ]; then
68-
echo "python -m pip install torch==${VER_TORCH} intel-extension-for-pytorch==${VER_IPEX} oneccl-bind-pt==${VER_TORCHCCL} --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/" >> ${AUX_INSTALL_SCRIPT}
68+
echo "python -m pip install torch==${VER_TORCH} intel-extension-for-pytorch==${VER_IPEX} oneccl-bind-pt==${VER_TORCHCCL} --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/" >> ${AUX_INSTALL_SCRIPT}
6969
else
7070
DPCPP_ROOT=
7171
ONEMKL_ROOT=

scripts/compile_bundle.bat

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ setlocal
33

44
set "VER_IPEX=v2.5.10+xpu"
55
set "ENABLE_ONEAPI_INTEGRATION=1"
6+
set CMAKE_SHARED_LINKER_FLAGS=/FORCE:MULTIPLE
7+
set CMAKE_MODULE_LINKER_FLAGS=/FORCE:MULTIPLE
8+
set CMAKE_EXE_LINKER_FLAGS=/FORCE:MULTIPLE
69

710
if "%~2"=="" (
811
echo Usage: %~nx0 ^<DPCPPROOT^> ^<MKLROOT^> [AOT]
@@ -56,6 +59,10 @@ rem Save current directory path
5659
set "BASEFOLDER=%~dp0"
5760
cd "%BASEFOLDER%"
5861

62+
rem Check required packages version
63+
if not exist intel-extension-for-pytorch (
64+
git clone https://github.com/intel/intel-extension-for-pytorch.git
65+
)
5966

6067
rem Checkout the latest Intel(R) Extension for PyTorch source
6168
cd intel-extension-for-pytorch
@@ -86,9 +93,6 @@ if not exist vision (
8693
if not exist audio (
8794
git clone https://github.com/pytorch/audio.git
8895
)
89-
if not exist intel-extension-for-pytorch (
90-
git clone https://github.com/intel/intel-extension-for-pytorch.git
91-
)
9296

9397
rem Checkout required branch/commit and update submodules
9498
cd pytorch

0 commit comments

Comments
 (0)