Skip to content

Commit 510f2fc

Browse files
committed
modify build
1 parent 765da12 commit 510f2fc

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/scripts/env.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22

3-
if [ "$1" != "nightly_wheel" ];then
3+
if [ "$1" == "build" ];then
44
source /opt/intel/oneapi/compiler/latest/env/vars.sh
55
source /opt/intel/oneapi/umf/latest/env/vars.sh
66
source /opt/intel/oneapi/pti/latest/env/vars.sh
77
source /opt/intel/oneapi/ccl/latest/env/vars.sh
88
source /opt/intel/oneapi/mpi/latest/env/vars.sh
99
source /opt/intel/oneapi/mkl/latest/env/vars.sh
1010
else
11+
pip install intel-cmplr-lib-rt intel-cmplr-lib-ur intel-cmplr-lic-rt intel-sycl-rt tcmlib umf intel-pti
1112
echo "Don't need to source DL-Essential for nightly wheel"
1213
fi

.github/workflows/_linux_build.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,17 @@ jobs:
8383
fi
8484
- name: Build Pytorch XPU
8585
run: |
86-
source .github/scripts/env.sh
86+
source .github/scripts/env.sh build
8787
source activate xpu_build
8888
export USE_ONEMKL=1
8989
export USE_XCCL=1
90+
export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="\
91+
intel-cmplr-lib-rt; platform_system == 'Linux' |\
92+
intel-cmplr-lib-ur; platform_system == 'Linux' |\
93+
intel-cmplr-lic-rt; platform_system == 'Linux' |\
94+
intel-sycl-rt; platform_system == 'Linux' |\
95+
tcmlib |umf |intel-pti
96+
"
9097
if [[ ${{ inputs.driver }} == 'lts' ]]; then
9198
export TORCH_XPU_ARCH_LIST='pvc'
9299
fi
@@ -138,8 +145,10 @@ jobs:
138145
else
139146
echo "Forked PR, don't update the issue"
140147
fi
141-
pip install --force-reinstall dist/*.whl
142-
cp dist/*.whl ${{ github.workspace }}/
148+
pip install patchelf
149+
bash ${{ github.workspace }}/.github/scripts/rpath.sh dist/torch*.whl
150+
pip install --force-reinstall tmp/torch*.whl
151+
cp tmp/*.whl ${{ github.workspace }}/
143152
cp pytorch_${current_commit}_build.log ${{ github.workspace }}/
144153
- name: Torch Config
145154
id: build_version

0 commit comments

Comments
 (0)