Skip to content

Commit 87d0b49

Browse files
authored
[CI] Refine CI workflows (#129)
* use ci pins * fix * fix
1 parent 49fe3b1 commit 87d0b49

File tree

5 files changed

+45
-164
lines changed

5 files changed

+45
-164
lines changed

.github/ci_pins/version.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
torch_repo=https://github.com/pytorch/pytorch.git
2+
torch_branch=release/2.1
3+
torch_commit=209f2fa8ff86652f67d75c2f19bf9cb9942fd018
4+
ipex_repo=https://github.com/intel/intel-extension-for-pytorch.git
5+
ipex_branch=xpu-main-pre
6+
ipex_commit=7980a37028023037b4f0b47617c5fc3343a6d09b
7+
oneapi_version=2024.0

.github/workflows/triton_xpu_backend_ci.yml

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,6 @@ name: Integration Tests
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
torchrepo:
7-
description: 'torchrepo'
8-
required: true
9-
default: 'https://github.com/pytorch/pytorch.git'
10-
torchbranch:
11-
description: 'torchbranch'
12-
required: true
13-
default: 'v2.0.1'
14-
torchcommit:
15-
description: 'torchcommit'
16-
required: true
17-
default: 'e9ebda29d87ce0916ab08c06ab26fd3766a870e5'
18-
ipexrepo:
19-
description: 'ipexrepo'
20-
required: true
21-
default: 'https://github.com/intel/intel-extension-for-pytorch.git'
22-
ipexbranch:
23-
description: 'ipexbranch'
24-
required: true
25-
default: 'xpu-master'
26-
ipexcommit:
27-
description: 'ipexcommit'
28-
required: true
29-
default: '4af80f77740ed939be78eba28ae36951823f335c'
30-
oneapi:
31-
description: 'oneapi'
32-
required: true
33-
default: '2023.2.0'
345
pull_request:
356
branches: [main]
367
merge_group:
@@ -91,23 +62,17 @@ jobs:
9162
run: |
9263
python --version
9364
source ${HOME}/miniconda3/bin/activate triton-preci
65+
source ${HOME}/triton-preci/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
9466
python --version
9567
pip install setuptools cython numpy wheel scikit-build scipy
9668
pip install psutil cpuid
9769
cd ${HOME}/triton-preci
9870
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_prepare.sh .
9971
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_triton.sh ${HOME}/
10072
cp -r triton_src/third_party/intel_xpu_backend/.github/patches/ .
101-
echo -e "oneAPI Basekit version: ${{ github.event.inputs.oneapi }}"
102-
bash env_prepare.sh triton-preci \
103-
${{ github.event.inputs.torchrepo }} \
104-
${{ github.event.inputs.torchbranch }} \
105-
${{ github.event.inputs.torchcommit }} \
106-
${{ github.event.inputs.ipexrepo }} \
107-
${{ github.event.inputs.ipexbranch }} \
108-
${{ github.event.inputs.ipexcommit }} \
109-
${{ github.event.inputs.oneapi }}
110-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
73+
echo -e "oneAPI Basekit version: $oneapi_version"
74+
bash env_prepare.sh triton-preci $torch_repo $torch_branch $torch_commit $ipex_repo $ipex_branch $ipex_commit $oneapi_version
75+
source ${HOME}/env_triton.sh $oneapi_version
11176
python -c "import torch;import intel_extension_for_pytorch"
11277
if [ ${PIPESTATUS[0]} -ne 0 ]; then
11378
echo -e "[ERROR] Public-torch or IPEX BUILD FAIL"
@@ -118,6 +83,7 @@ jobs:
11883
shell: bash
11984
run: |
12085
source ${HOME}/miniconda3/bin/activate triton-preci
86+
source ${HOME}/triton-preci/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
12187
pip install pybind11
12288
pip uninstall -y triton
12389
rm -rf ~/.triton/intel_llvm
@@ -126,7 +92,7 @@ jobs:
12692
TRITON_CODEGEN_INTEL_XPU_BACKEND=1 python setup.py bdist_wheel
12793
pip install dist/*.whl
12894
cd ${HOME}/triton-preci
129-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
95+
source ${HOME}/env_triton.sh $oneapi_version
13096
python -c "import triton"
13197
if [ ${PIPESTATUS[0]} -ne 0 ]; then
13298
echo -e "[ERROR] Triton BUILD FAIL"
@@ -138,7 +104,8 @@ jobs:
138104
run: |
139105
echo -e "[ INFO ] Run UT test on Node $(hostname)"
140106
source ${HOME}/miniconda3/bin/activate triton-preci
141-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
107+
source ${HOME}/triton-preci/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
108+
source ${HOME}/env_triton.sh $oneapi_version
142109
pip install pytest
143110
rm -rf ~/.triton/cache
144111
export TRITON_LIBDEVICE_PATH=${HOME}/triton-preci/triton_src/python/triton/third_party/xpu/lib

.github/workflows/triton_xpu_backend_e2e_ci.yml

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,6 @@ name: Inductor E2E CI Tests
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
torchrepo:
7-
description: 'torchrepo'
8-
required: true
9-
default: 'https://github.com/pytorch/pytorch.git'
10-
torchbranch:
11-
description: 'torchbranch'
12-
required: true
13-
default: 'v2.0.1'
14-
torchcommit:
15-
description: 'torchcommit'
16-
required: true
17-
default: 'e9ebda29d87ce0916ab08c06ab26fd3766a870e5'
18-
ipexrepo:
19-
description: 'ipexrepo'
20-
required: true
21-
default: 'https://github.com/intel/intel-extension-for-pytorch.git'
22-
ipexbranch:
23-
description: 'ipexbranch'
24-
required: true
25-
default: 'xpu-master'
26-
ipexcommit:
27-
description: 'ipexcommit'
28-
required: true
29-
default: '4af80f77740ed939be78eba28ae36951823f335c'
30-
oneapi:
31-
description: 'oneAPI basekit version'
32-
required: true
33-
default: '2023.2.0'
345
pull_request:
356
branches: [main]
367
merge_group:
@@ -81,22 +52,16 @@ jobs:
8152
run: |
8253
python --version
8354
source ${HOME}/miniconda3/bin/activate triton-preci
55+
source ${HOME}/triton-preci/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
8456
python --version
8557
pip install setuptools cython numpy wheel scikit-build scipy
8658
pip install psutil cpuid
8759
cd ${HOME}/triton-preci
8860
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_prepare.sh .
8961
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_triton.sh ${HOME}/
9062
cp -r triton_src/third_party/intel_xpu_backend/.github/patches/ .
91-
bash env_prepare.sh triton-preci \
92-
${{ github.event.inputs.torchrepo }} \
93-
${{ github.event.inputs.torchbranch }} \
94-
${{ github.event.inputs.torchcommit }} \
95-
${{ github.event.inputs.ipexrepo }} \
96-
${{ github.event.inputs.ipexbranch }} \
97-
${{ github.event.inputs.ipexcommit }} \
98-
${{ github.event.inputs.oneapi }}
99-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
63+
bash env_prepare.sh triton-preci $torch_repo $torch_branch $torch_commit $ipex_repo $ipex_branch $ipex_commit $oneapi_version
64+
source ${HOME}/env_triton.sh $oneapi_version
10065
python -c "import torch;import intel_extension_for_pytorch"
10166
if [ ${PIPESTATUS[0]} -ne 0 ]; then
10267
echo -e "[ERROR] Public-torch or IPEX BUILD FAIL"
@@ -127,16 +92,19 @@ jobs:
12792
run: |
12893
echo -e "[ INFO ] Run E2E test on Node $(hostname)"
12994
source ${HOME}/miniconda3/bin/activate triton-preci
130-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
95+
source ${HOME}/triton-preci/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
96+
source ${HOME}/env_triton.sh $oneapi_version
13197
pip install pandas
13298
cd ${HOME}/triton-preci
13399
cp ${HOME}/triton-preci/triton_src/third_party/intel_xpu_backend/.github/scripts/inductor_xpu_test.sh ${HOME}/triton-preci/pytorch
134100
cd ${HOME}/triton-preci/pytorch
135101
rm -rf inductor_log
136-
bash inductor_xpu_test.sh huggingface amp_bf16 inference accuracy xpu 0 static 2 0 & \
137-
bash inductor_xpu_test.sh huggingface amp_bf16 inference accuracy xpu 2 static 2 1 & \
138-
bash inductor_xpu_test.sh huggingface amp_fp16 inference accuracy xpu 3 static 2 0 & wait
139-
bash inductor_xpu_test.sh huggingface amp_fp16 inference accuracy xpu 0 static 2 1 & wait
102+
bash inductor_xpu_test.sh huggingface amp_bf16 inference accuracy xpu 0 static 3 0 & \
103+
bash inductor_xpu_test.sh huggingface amp_bf16 inference accuracy xpu 2 static 3 1 & \
104+
bash inductor_xpu_test.sh huggingface amp_bf16 inference accuracy xpu 3 static 3 2 & wait
105+
bash inductor_xpu_test.sh huggingface amp_fp16 inference accuracy xpu 0 static 3 0 & \
106+
bash inductor_xpu_test.sh huggingface amp_fp16 inference accuracy xpu 2 static 3 1 & \
107+
bash inductor_xpu_test.sh huggingface amp_fp16 inference accuracy xpu 3 static 3 2 & wait
140108
cp ${HOME}/triton-preci/triton_src/sw_info.log inductor_log/
141109
142110
- name: Test Results Overview

.github/workflows/triton_xpu_backend_e2e_nightly.yml

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,6 @@ name: Inductor E2E Nightly Tests
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
torchrepo:
7-
description: 'torchrepo'
8-
required: true
9-
default: 'https://github.com/pytorch/pytorch.git'
10-
torchbranch:
11-
description: 'torchbranch'
12-
required: true
13-
default: 'v2.0.1'
14-
torchcommit:
15-
description: 'torchcommit'
16-
required: true
17-
default: 'e9ebda29d87ce0916ab08c06ab26fd3766a870e5'
18-
ipexrepo:
19-
description: 'ipexrepo'
20-
required: true
21-
default: 'https://github.com/intel/intel-extension-for-pytorch.git'
22-
ipexbranch:
23-
description: 'ipexbranch'
24-
required: true
25-
default: 'xpu-master'
26-
ipexcommit:
27-
description: 'ipexcommit'
28-
required: true
29-
default: '4af80f77740ed939be78eba28ae36951823f335c'
30-
oneapi:
31-
description: 'oneAPI basekit version'
32-
required: true
33-
default: '2023.2.0'
345
schedule:
356
- cron: "0 14 * * *" # run at 2 PM UTC
367

@@ -67,22 +38,16 @@ jobs:
6738
run: |
6839
python --version
6940
source ${HOME}/miniconda3/bin/activate triton-nightly-test
41+
source ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
7042
python --version
7143
pip install setuptools cython numpy wheel scikit-build scipy
7244
pip install psutil cpuid
7345
cd ${HOME}/triton-nightly
7446
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_prepare.sh .
7547
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_triton.sh ${HOME}/
7648
cp -r triton_src/third_party/intel_xpu_backend/.github/patches/ .
77-
bash env_prepare.sh triton-nightly \
78-
${{ github.event.inputs.torchrepo }} \
79-
${{ github.event.inputs.torchbranch }} \
80-
${{ github.event.inputs.torchcommit }} \
81-
${{ github.event.inputs.ipexrepo }} \
82-
${{ github.event.inputs.ipexbranch }} \
83-
${{ github.event.inputs.ipexcommit }} \
84-
${{ github.event.inputs.oneapi }}
85-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
49+
bash env_prepare.sh triton-nightly $torch_repo $torch_branch $torch_commit $ipex_repo $ipex_branch $ipex_commit $oneapi_version
50+
source ${HOME}/env_triton.sh $oneapi_version
8651
python -c "import torch;import intel_extension_for_pytorch"
8752
if [ ${PIPESTATUS[0]} -ne 0 ]; then
8853
echo -e "[ERROR] Public-torch or IPEX BUILD FAIL"
@@ -93,6 +58,7 @@ jobs:
9358
shell: bash
9459
run: |
9560
source ${HOME}/miniconda3/bin/activate triton-nightly-test
61+
source ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
9662
pip uninstall -y triton
9763
sudo update-ca-certificates --fresh
9864
export SSL_CERT_DIR=/etc/ssl/certs
@@ -102,7 +68,7 @@ jobs:
10268
TRITON_CODEGEN_INTEL_XPU_BACKEND=1 python setup.py bdist_wheel
10369
pip install dist/*.whl
10470
cd ${HOME}/triton-nightly
105-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
71+
source ${HOME}/env_triton.sh $oneapi_version
10672
python -c "import triton"
10773
if [ ${PIPESTATUS[0]} -ne 0 ]; then
10874
echo -e "[ERROR] Triton BUILD FAIL"
@@ -111,6 +77,7 @@ jobs:
11177
11278
- name: Prepare Benchmark
11379
run: |
80+
source ${HOME}/miniconda3/bin/activate triton-nightly-test
11481
cp ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/scripts/inductor_xpu_test.sh ${HOME}/triton-nightly/pytorch
11582
cp ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/scripts/inductor_perf_summary.py ${HOME}/triton-nightly/pytorch
11683
pip install styleFrame scipy pandas
@@ -121,13 +88,16 @@ jobs:
12188

12289
runs-on: [self-hosted, PVC_E2E]
12390

91+
timeout-minutes: 720
92+
12493
steps:
12594

12695
- name: ACC Test for triton on PVC
12796
run: |
12897
echo -e "[ INFO ] Run E2E Acc test on Node $(hostname)"
12998
source ${HOME}/miniconda3/bin/activate triton-nightly-test
130-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
99+
source ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
100+
source ${HOME}/env_triton.sh $oneapi_version
131101
cd ${HOME}/triton-nightly
132102
cd ${HOME}/triton-nightly/pytorch
133103
rm -rf inductor_log
@@ -217,13 +187,16 @@ jobs:
217187

218188
runs-on: [self-hosted, PVC_E2E]
219189

190+
timeout-minutes: 720
191+
220192
steps:
221193

222194
- name: Perf Test for triton on PVC
223195
run: |
224196
echo -e "[ INFO ] Run E2E Perf test on Node $(hostname)"
225197
source ${HOME}/miniconda3/bin/activate triton-nightly-test
226-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
198+
source ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
199+
source ${HOME}/env_triton.sh $oneapi_version
227200
cd ${HOME}/triton-nightly
228201
cd ${HOME}/triton-nightly/pytorch
229202
bash inductor_xpu_test.sh huggingface amp_bf16 inference performance xpu 0 & \

.github/workflows/triton_xpu_backend_nightly.yml

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,6 @@ name: Nightly Tests
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
torchrepo:
7-
description: 'torchrepo'
8-
required: true
9-
default: 'https://github.com/pytorch/pytorch.git'
10-
torchbranch:
11-
description: 'torchbranch'
12-
required: true
13-
default: 'v2.0.1'
14-
torchcommit:
15-
description: 'torchcommit'
16-
required: true
17-
default: 'e9ebda29d87ce0916ab08c06ab26fd3766a870e5'
18-
ipexrepo:
19-
description: 'ipexrepo'
20-
required: true
21-
default: 'https://github.com/intel/intel-extension-for-pytorch.git'
22-
ipexbranch:
23-
description: 'ipexbranch'
24-
required: true
25-
default: 'xpu-master'
26-
ipexcommit:
27-
description: 'ipexcommit'
28-
required: true
29-
default: '4af80f77740ed939be78eba28ae36951823f335c'
30-
oneapi:
31-
description: 'oneAPI basekit version'
32-
required: true
33-
default: '2023.2.0'
345
schedule:
356
- cron: "0 14 * * *"
367

@@ -70,22 +41,16 @@ jobs:
7041
run: |
7142
python --version
7243
source ${HOME}/miniconda3/bin/activate triton-nightly-test
44+
source ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
7345
python --version
7446
pip install setuptools cython numpy wheel scikit-build scipy
7547
pip install psutil cpuid
7648
cd ${HOME}/triton-nightly
7749
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_prepare.sh .
7850
cp triton_src/third_party/intel_xpu_backend/.github/scripts/env_triton.sh ${HOME}/
7951
cp -r triton_src/third_party/intel_xpu_backend/.github/patches/ .
80-
bash env_prepare.sh triton-nightly \
81-
${{ github.event.inputs.torchrepo }} \
82-
${{ github.event.inputs.torchbranch }} \
83-
${{ github.event.inputs.torchcommit }} \
84-
${{ github.event.inputs.ipexrepo }} \
85-
${{ github.event.inputs.ipexbranch }} \
86-
${{ github.event.inputs.ipexcommit }} \
87-
${{ github.event.inputs.oneapi }}
88-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
52+
bash env_prepare.sh triton-nightly $torch_repo $torch_branch $torch_commit $ipex_repo $ipex_branch $ipex_commit $oneapi_version
53+
source ${HOME}/env_triton.sh $oneapi_version
8954
python -c "import torch;import intel_extension_for_pytorch"
9055
if [ ${PIPESTATUS[0]} -ne 0 ]; then
9156
echo -e "[ERROR] Public-torch or IPEX BUILD FAIL"
@@ -113,7 +78,8 @@ jobs:
11378
run: |
11479
echo -e "[ INFO ] Run UT test on Node $(hostname)"
11580
source ${HOME}/miniconda3/bin/activate triton-nightly-test
116-
source ${HOME}/env_triton.sh ${{ github.event.inputs.oneapi }}
81+
source ${HOME}/triton-nightly/triton_src/third_party/intel_xpu_backend/.github/ci_pins/version.txt
82+
source ${HOME}/env_triton.sh $oneapi_version
11783
pip install pytest
11884
rm -rf ~/.triton/cache
11985
export TRITON_LIBDEVICE_PATH=${HOME}/triton-nightly/triton_src/python/triton/third_party/xpu/lib

0 commit comments

Comments
 (0)