Skip to content

Commit 7d79641

Browse files
committed
keep_torch_xpu_ops
1 parent 119d2fb commit 7d79641

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

.github/workflows/_linux_build.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,20 @@ jobs:
7272
pip install requests
7373
if [[ ${{ inputs.pytorch }} == 'distributed_2.8' ]]; then
7474
git clone https://github.com/daisyden/pytorch.git pytorch
75-
cd pytorch && git checkout $(echo ${{ inputs.pytorch }})
76-
git submodule sync && git submodule update --init --recursive
7775
else
7876
git clone https://github.com/pytorch/pytorch pytorch
79-
cd pytorch && git checkout $(echo ${{ inputs.pytorch }})
80-
# apply PRs for stock pytorch
81-
python ../torch-xpu-ops/.github/scripts/apply_torch_pr.py
82-
git status && git show -s
83-
git submodule sync && git submodule update --init --recursive
84-
if [[ ${{ inputs.keep_torch_xpu_ops }} == 'true' ]]; then
85-
echo "Don't replace torch-xpu-ops!"
86-
else
87-
rm -rf third_party/torch-xpu-ops && cp -r ../torch-xpu-ops third_party/
88-
# Workaround for torch-xpu-ops ci test
89-
sed -i "s/checkout --quiet \${TORCH_XPU_OPS_COMMIT}/log -n 1/g" caffe2/CMakeLists.txt
90-
fi
77+
fi
78+
cd pytorch && git checkout $(echo ${{ inputs.pytorch }})
79+
# apply PRs for stock pytorch
80+
python ../torch-xpu-ops/.github/scripts/apply_torch_pr.py
81+
git status && git show -s
82+
git submodule sync && git submodule update --init --recursive
83+
if [[ ${{ inputs.keep_torch_xpu_ops }} == 'true' ]]; then
84+
echo "Don't replace torch-xpu-ops!"
85+
else
86+
rm -rf third_party/torch-xpu-ops && cp -r ../torch-xpu-ops third_party/
87+
# Workaround for torch-xpu-ops ci test
88+
sed -i "s/checkout --quiet \${TORCH_XPU_OPS_COMMIT}/log -n 1/g" caffe2/CMakeLists.txt
9189
fi
9290
- name: Build Pytorch XPU
9391
run: |

.github/workflows/pull.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
uses: ./.github/workflows/_linux_build.yml
7979
with:
8080
pytorch: distributed_2.8
81+
keep_torch_xpu_ops: true
8182
runner: pvc_e2e
8283

8384
preci-ut-distributed:

0 commit comments

Comments
 (0)