74
74
jobs :
75
75
integration-tests :
76
76
name : Integration tests
77
+ strategy :
78
+ fail-fast : false
79
+ matrix :
80
+ suite :
81
+ - core
82
+ - rest
77
83
timeout-minutes : 720
78
84
runs-on : ${{ fromJson(inputs.runner_label && format('["linux", "{0}"]', inputs.runner_label) || format('["linux", "{0}", "{1}", "{2}"]', inputs.device, inputs.driver_version, inputs.runner_version)) }}
79
85
defaults :
@@ -111,31 +117,23 @@ jobs:
111
117
with :
112
118
python-version : ${{ inputs.python_version }}
113
119
114
- - name : Identify Python version
115
- run : |
116
- PYTHON_VERSION="$(python -c 'import sys; print(f"{sys.version_info[0]}.{ sys.version_info[1]}")')"
117
- echo "PYTHON_VERSION=$PYTHON_VERSION" | tee -a $GITHUB_ENV
118
-
119
120
- name : Setup PyTorch
120
121
uses : ./.github/actions/setup-pytorch
121
122
with :
122
123
ref : ${{ inputs.pytorch_ref }}
123
124
mode : ${{ inputs.pytorch_mode }}
124
125
125
- - name : Install pass_rate dependencies
126
- run : |
127
- pip install defusedxml setproctitle==1.3.5
128
-
129
126
- name : Setup Triton
130
127
uses : ./.github/actions/setup-triton
131
128
with :
132
129
build_llvm : ${{ inputs.build_llvm }}
133
130
use_spirv_backend : ${{ inputs.use_spirv_backend }}
134
131
135
132
- name : Report environment details
133
+ if : matrix.suite == 'core'
136
134
run : |
137
- source ./scripts/capture-hw-details.sh --quiet
138
- cat <<EOF | tee .env
135
+ mkdir -p reports
136
+ cat <<EOF | tee reports/ .env
139
137
TIMESTAMP=$(date '+%Y%m%d%H%M%S')
140
138
GITHUB_RUN_ID=$GITHUB_RUN_ID
141
139
GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER
@@ -145,11 +143,8 @@ jobs:
145
143
PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID
146
144
PYTORCH_VERSION=$PYTORCH_VERSION
147
145
TRITON_REPO=$GITHUB_REPOSITORY
148
- LIBIGC1_VERSION=$LIBIGC1_VERSION
149
- LEVEL_ZERO_VERSION=$LEVEL_ZERO_VERSION
150
- GPU_DEVICE=$GPU_DEVICE
151
- AGAMA_VERSION=$AGAMA_VERSION
152
146
EOF
147
+ ./scripts/capture-hw-details.sh | tee -a reports/.env
153
148
154
149
- name : Create test-triton command line
155
150
run : |
@@ -169,43 +164,54 @@ jobs:
169
164
170
165
{
171
166
echo SKIPLIST="$skiplist"
172
- echo TRITON_TEST_CMD="bash -x scripts/test-triton.sh --warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports ${{ inputs.ignore_errors && '--ignore-errors' || '' }} $skiplist"
167
+ echo TRITON_TEST_CMD="bash -x scripts/test-triton.sh --skip-pip-install -- warning-reports --skip-pytorch-install --reports-dir $GITHUB_WORKSPACE/reports ${{ inputs.ignore_errors && '--ignore-errors' || '' }} $skiplist"
173
168
} | tee -a $GITHUB_ENV
174
169
170
+ - name : Install test dependencies
171
+ run : |
172
+ pip install -r scripts/requirements-test.txt git+https://github.com/kwasd/[email protected]
173
+
175
174
- name : Run Proton tests
176
- if : ${{ inputs.driver_version == 'rolling' && inputs.device == 'max1100' }}
175
+ if : matrix.suite == 'rest' && inputs.driver_version == 'rolling' && inputs.device == 'max1100'
177
176
run : |
178
177
cd third_party/proton/test
179
178
pytest test_api.py test_lib.py test_profile.py test_viewer.py test_record.py -s -v
180
179
cd ..
181
180
182
181
- name : Run unit tests
182
+ if : matrix.suite == 'rest'
183
183
run : |
184
184
${{ env.TRITON_TEST_CMD }} --unit
185
185
186
186
- name : Run core tests
187
+ if : matrix.suite == 'core'
187
188
run : |
188
- ${{ env.TRITON_TEST_CMD }} --core --skip-pip-install
189
+ ${{ env.TRITON_TEST_CMD }} --core
189
190
190
191
- name : Run interpreter tests
192
+ if : matrix.suite == 'rest'
191
193
run : |
192
- ${{ env.TRITON_TEST_CMD }} --interpreter --skip-pip-install
194
+ ${{ env.TRITON_TEST_CMD }} --interpreter
193
195
194
196
- name : Run Tutorials
197
+ if : matrix.suite == 'rest'
195
198
run : |
196
- ${{ env.TRITON_TEST_CMD }} --tutorial --skip-pip-install
199
+ ${{ env.TRITON_TEST_CMD }} --tutorial
197
200
198
201
- name : Run instrumentation tests
202
+ if : matrix.suite == 'rest'
199
203
run : |
200
- ${{ env.TRITON_TEST_CMD }} --instrumentation --skip-pip-install
204
+ ${{ env.TRITON_TEST_CMD }} --instrumentation
201
205
202
206
- name : Get transformers version
207
+ if : matrix.suite == 'rest'
203
208
run : |
204
209
cd pytorch
205
210
TRANSFORMERS_VERSION="$(<.ci/docker/ci_commit_pins/huggingface.txt)"
206
211
echo "TRANSFORMERS_VERSION=$TRANSFORMERS_VERSION" | tee -a $GITHUB_ENV
207
212
208
213
- name : Install transformers
214
+ if : matrix.suite == 'rest'
209
215
uses : ./.github/actions/install-dependency
210
216
with :
211
217
package : transformers
@@ -214,8 +220,9 @@ jobs:
214
220
try-tag-prefix : v
215
221
216
222
- name : Run E2E test
223
+ if : matrix.suite == 'rest'
217
224
run : |
218
- ${{ env.TRITON_TEST_CMD }} --inductor --skip-pip-install
225
+ ${{ env.TRITON_TEST_CMD }} --inductor
219
226
220
227
- name : Save pip cache
221
228
if : ${{ steps.pip-cache.outputs.status == 'miss' }}
@@ -224,9 +231,52 @@ jobs:
224
231
path : ${{ steps.pip-cache.outputs.path }}
225
232
dest : ${{ steps.pip-cache.outputs.dest }}
226
233
234
+ - name : Upload test reports
235
+ uses : actions/upload-artifact@v4
236
+ with :
237
+ name : test-reports-${{ matrix.suite }}-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
238
+ include-hidden-files : true
239
+ path : reports
240
+
241
+ reports :
242
+ name : Reports
243
+ runs-on :
244
+ - linux
245
+ needs : integration-tests
246
+ steps :
247
+ - name : Checkout repository
248
+ uses : actions/checkout@v4
249
+
250
+ - name : Load pip cache
251
+ id : pip-cache
252
+ uses : ./.github/actions/load
253
+ env :
254
+ # Increase this value to reset cache
255
+ CACHE_NUMBER : 1
256
+ with :
257
+ path : $HOME/.cache/pip
258
+ key : pip-${{ inputs.python_version }}-${{ hashFiles('python/pyproject.toml', 'python/setup.py') }}-${{ env.CACHE_NUMBER }}
259
+
260
+ - name : Download test reports
261
+ uses : actions/download-artifact@v4
262
+ with :
263
+ pattern : test-reports-*-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
264
+ path : reports
265
+ merge-multiple : true
266
+
267
+ - name : Install Python (using actions/setup-python) ${{ inputs.python_version }}
268
+ uses : actions/setup-python@v5
269
+ with :
270
+ python-version : ${{ inputs.python_version }}
271
+
272
+ - name : Install pass_rate dependencies
273
+ run : |
274
+ pip install defusedxml
275
+
227
276
- name : Pass rate
228
277
run : |
229
- source ./scripts/capture-hw-details.sh
278
+ ls -la reports
279
+ source ./reports/.env
230
280
python scripts/pass_rate.py --reports reports
231
281
python scripts/pass_rate.py --reports reports --json > pass_rate.json
232
282
python scripts/pass_rate.py --reports reports --suite tutorials --json > pass_rate_tutorials.json
@@ -247,11 +297,4 @@ jobs:
247
297
include-hidden-files : true
248
298
path : |
249
299
reports/*/*.csv
250
- .env
251
-
252
- - name : Upload test reports
253
- if : inputs.upload_test_reports
254
- uses : actions/upload-artifact@v4
255
- with :
256
- name : test-reports-${{ inputs.python_version }}-${{ inputs.runner_label || inputs.driver_version }}
257
- path : reports
300
+ reports/.env
0 commit comments