|
50 | 50 | # Save current directory path
|
51 | 51 | BASEFOLDER=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
52 | 52 | WHEELFOLDER=${BASEFOLDER}/../wheels
|
| 53 | +TORCH_INSTALL_SCRIPT=${WHEELFOLDER}/torch_install.sh |
53 | 54 | AUX_INSTALL_SCRIPT=${WHEELFOLDER}/aux_install.sh
|
54 | 55 | cd ${BASEFOLDER}/..
|
55 | 56 |
|
@@ -121,8 +122,9 @@ if [ $((${MODE} & 0x02)) -ne 0 ]; then
|
121 | 122 | conda install -y cmake ninja
|
122 | 123 |
|
123 | 124 | echo "#!/bin/bash" > ${AUX_INSTALL_SCRIPT}
|
| 125 | + echo "#!/bin/bash" > ${TORCH_INSTALL_SCRIPT} |
124 | 126 | if [ $((${MODE} & 0x04)) -ne 0 ]; then
|
125 |
| - 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} |
| 127 | + 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/" >> ${TORCH_INSTALL_SCRIPT} |
126 | 128 | 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/
|
127 | 129 | else
|
128 | 130 | if [ ! -f ${ONECCL_ROOT}/env/vars.sh ]; then
|
@@ -195,7 +197,7 @@ if [ $((${MODE} & 0x02)) -ne 0 ]; then
|
195 | 197 | export DPCPP_GCC_INSTALL_DIR="${CONDA_PREFIX}/lib/gcc/x86_64-conda-linux-gnu/12.3.0"
|
196 | 198 | fi
|
197 | 199 | export INTELONEAPIROOT=${ONEAPIROOT}
|
198 |
| - COMPUTE_BACKEND=dpcpp python setup.py bdist_wheel |
| 200 | + USE_SYSTEM_ONECCL=ON COMPUTE_BACKEND=dpcpp python setup.py bdist_wheel |
199 | 201 | unset INTELONEAPIROOT
|
200 | 202 | if [ -d ${CONDA_PREFIX}/lib/gcc/x86_64-conda-linux-gnu ]; then
|
201 | 203 | unset DPCPP_GCC_INSTALL_DIR
|
@@ -275,7 +277,14 @@ if [ $((${MODE} & 0x02)) -ne 0 ]; then
|
275 | 277 | rm -rf DeepSpeed
|
276 | 278 | fi
|
277 | 279 | if [ $((${MODE} & 0x01)) -ne 0 ]; then
|
| 280 | + bash ${TORCH_INSTALL_SCRIPT} |
278 | 281 | python -m pip install ${WHEELFOLDER}/*.whl
|
279 | 282 | bash ${AUX_INSTALL_SCRIPT}
|
280 | 283 | rm -rf ${WHEELFOLDER}
|
| 284 | + if [ -f ${TORCH_INSTALL_SCRIPT} ]; then |
| 285 | + rm ${TORCH_INSTALL_SCRIPT} |
| 286 | + fi |
| 287 | + if [ -f ${AUX_INSTALL_SCRIPT} ]; then |
| 288 | + rm ${AUX_INSTALL_SCRIPT} |
| 289 | + fi |
281 | 290 | fi
|
0 commit comments