Skip to content

Commit c9ed050

Browse files
authored
Fix build with LKG commit (#1491)
1 parent 346c639 commit c9ed050

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/_linux_build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
abi:
1717
required: false
1818
type: string
19-
default: 1
19+
default: '1'
2020
description: ABI version. Default abi as 1.
2121
python:
2222
required: false
@@ -86,6 +86,7 @@ jobs:
8686
fi
8787
- name: Build Pytorch XPU
8888
run: |
89+
set -xe
8990
source activate xpu_build
9091
source .github/scripts/env.sh ${{ inputs.pytorch }}
9192
export USE_ONEMKL=1
@@ -115,16 +116,18 @@ jobs:
115116
pip install -r requirements.txt
116117
WERROR=1 python setup.py bdist_wheel 2>&1 | tee pytorch_${current_commit}_build.log
117118
118-
if [[ ${is_fork_pr} == "false" ]]; then
119-
if [ -f dist/torch*.whl && "${last_commit}" != "${current_commit}" ] && [[ "${{ inputs.pytorch }}" == "main" || "${{ inputs.pytorch }}" == "release/"* ]]; then
119+
if [[ "${is_fork_pr}" == "false" ]]; then
120+
if [ -f dist/torch*.whl ] && [ "${last_commit}" != "${current_commit}" ] && [[ "${{ inputs.pytorch }}" == "main" || "${{ inputs.pytorch }}" == "release/"* ]]; then
120121
echo "Wheel build successful, update last commit in the issue https://github.com/intel/torch-xpu-ops/issues/1280"
121122
gh --repo $repo issue view $commit_issue --json body -q .body | sed "s;${last_commit};${current_commit};g" | sed '/^$/d' > new_body.txt
122123
gh --repo $repo issue edit $commit_issue --body-file new_body.txt
123124
fi
124125
if [ ! -f dist/torch*.whl ]; then
125126
echo "Wheel build failed, use last commit in the issue https://github.com/intel/torch-xpu-ops/issues/1280"
126127
gh --repo $repo issue comment $commit_issue -b "Wheel build failed with commit [${current_commit}](https://github.com/pytorch/pytorch/tree/${current_commit}), refer ${build_url}. CC @intel/torch-xpu-ops-maintain @EikanWang @riverliuintel @fengyuan14 @xytintel @etaf @chuanqi129 @mengfei25"
128+
python setup.py clean
127129
git clean -df .
130+
git reset --hard
128131
git checkout $last_commit
129132
# apply PRs for stock pytorch
130133
python ../torch-xpu-ops/.github/scripts/apply_torch_pr.py

.github/workflows/_linux_ut.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
abi:
2727
required: false
2828
type: string
29-
default: 1
29+
default: '1'
3030
description: ABI version. Default abi as 1.
3131
python:
3232
required: false

0 commit comments

Comments
 (0)