Skip to content

Commit

Permalink
Fix Installation & Build issues in compile_bundle.bat (#5147)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
huiyan2021 authored Dec 20, 2024
1 parent 974beb7 commit 2bca097
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
10 changes: 5 additions & 5 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ if [[ ${IMAGE_TYPE} = "xpu" ]]; then
--build-arg TORCHVISION_VERSION=0.20.1+cxx11.abi \
--build-arg TORCHAUDIO_VERSION=2.5.1+cxx11.abi \
--build-arg ONECCL_BIND_PT_VERSION=2.5.0+xpu \
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
--build-arg TORCHAUDIO_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
--build-arg ONECCL_BIND_PT_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/us/ \
--build-arg TORCH_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
--build-arg IPEX_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
--build-arg TORCHVISION_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
--build-arg TORCHAUDIO_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
--build-arg ONECCL_BIND_PT_WHL_URL=https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/ \
-t ${IMAGE_NAME} \
-f Dockerfile.prebuilt .
fi
4 changes: 2 additions & 2 deletions docs/tutorials/features/DDP.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ For more detailed information, check [Installation Guide](https://intel.github.i

```
# Generic Python* for CPU
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/cpu/us/
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/cpu/cn/
# Generic Python* for GPU
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/xpu/us/
REPO_URL: https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/
```

Installation from either repository shares the command below. Replace the place holder `<REPO_URL>` with a real URL mentioned above.
Expand Down
2 changes: 1 addition & 1 deletion examples/gpu/llm/tools/env_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if [ $((${MODE} & 0x02)) -ne 0 ]; then
echo "#!/bin/bash" > ${AUX_INSTALL_SCRIPT}
echo "set -e" >> ${AUX_INSTALL_SCRIPT}
if [ $((${MODE} & 0x04)) -ne 0 ]; then
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}
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}
else
DPCPP_ROOT=
ONEMKL_ROOT=
Expand Down
10 changes: 7 additions & 3 deletions scripts/compile_bundle.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ setlocal

set "VER_IPEX=v2.5.10+xpu"
set "ENABLE_ONEAPI_INTEGRATION=1"
set CMAKE_SHARED_LINKER_FLAGS=/FORCE:MULTIPLE
set CMAKE_MODULE_LINKER_FLAGS=/FORCE:MULTIPLE
set CMAKE_EXE_LINKER_FLAGS=/FORCE:MULTIPLE

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

rem Check required packages version
if not exist intel-extension-for-pytorch (
git clone https://github.com/intel/intel-extension-for-pytorch.git
)

rem Checkout the latest Intel(R) Extension for PyTorch source
cd intel-extension-for-pytorch
Expand Down Expand Up @@ -86,9 +93,6 @@ if not exist vision (
if not exist audio (
git clone https://github.com/pytorch/audio.git
)
if not exist intel-extension-for-pytorch (
git clone https://github.com/intel/intel-extension-for-pytorch.git
)

rem Checkout required branch/commit and update submodules
cd pytorch
Expand Down

0 comments on commit 2bca097

Please sign in to comment.