@@ -123,7 +123,7 @@ jobs:
123
123
set CMAKE_PREFIX_PATH="%CONDA_PREFIX%\Library"
124
124
)
125
125
python setup.py clean
126
- set MAX_JOBS=8
126
+ set MAX_JOBS=16
127
127
python setup.py bdist_wheel > build_torch_wheel_log.log
128
128
echo "[INFO] begin to install torch whls"
129
129
for /r C:\actions-runner\_work\torch-xpu-ops\pytorch\dist %%i in (torch*.whl) do (
@@ -141,24 +141,22 @@ jobs:
141
141
python -c "import torch; print(torch.__config__.show())"
142
142
python -c "import torch; print(torch.__config__.parallel_info())"
143
143
python -c "import torch; print(torch.__config__.torch.xpu.device_count())"
144
-
145
144
- name : Upload Windows build log
146
145
if : ${{ ! cancelled() }}
147
146
uses : actions/upload-artifact@v4
148
147
with :
149
148
name : Torch-XPU-Windows-Log-${{ github.event.pull_request.number || github.sha }}
150
149
path : ' C:\actions-runner\_work\torch-xpu-ops\pytorch\build_torch_wheel_log.log'
151
-
152
150
- name : Upload Windows binary
153
151
if : ${{ ! cancelled() }}
154
152
uses : actions/upload-artifact@v4
155
153
with :
156
154
name : Torch-XPU-Windows-Binary-${{ github.event.pull_request.number || github.sha }}
157
155
path : ' C:\actions-runner\_work\torch-xpu-ops\pytorch\dist'
158
-
159
156
- name : Run XPU OP Extended UT
160
157
if : contains(inputs.ut, 'op_extended') || github.event_name == 'schedule'
161
158
shell : cmd
159
+ continue-on-error : true
162
160
run : |
163
161
call "C:\ProgramData\miniforge3\Scripts\activate.bat"
164
162
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
@@ -168,13 +166,114 @@ jobs:
168
166
cd ../pytorch/third_party/torch-xpu-ops/test/xpu/extended/
169
167
python run_test_with_skip_mtl.py
170
168
169
+ if not exist "%GITHUB_WORKSPACE%\ut_log" mkdir "%GITHUB_WORKSPACE%\ut_log"
170
+ copy op_extended.xml %GITHUB_WORKSPACE%\ut_log /Y
171
171
- name : Run Test XPU UT
172
172
if : contains(inputs.ut, 'torch_xpu') || github.event_name == 'schedule'
173
173
shell : cmd
174
+ continue-on-error : true
174
175
run : |
175
176
call "C:\ProgramData\miniforge3\Scripts\activate.bat"
176
177
call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
177
178
call conda activate windows_ci
178
179
call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
179
180
cd ../pytorch/third_party/torch-xpu-ops/test/xpu/
180
181
python run_test_win_with_skip_mtl.py
182
+
183
+ if not exist "%GITHUB_WORKSPACE%\ut_log" mkdir "%GITHUB_WORKSPACE%\ut_log"
184
+ copy test_xpu.xml %GITHUB_WORKSPACE%\ut_log /Y
185
+ - name : UT Test Results Summary
186
+ shell : cmd
187
+ run : |
188
+ call conda activate windows_ci
189
+ pip install junitparser
190
+ for %%f in ("%GITHUB_WORKSPACE%/ut_log/*.xml") do (
191
+ python ./.github/scripts/check-ut.py "%%f" >> "%GITHUB_STEP_SUMMARY%"
192
+ )
193
+ @echo off
194
+
195
+ REM Check the failure logs
196
+ if exist "%GITHUB_WORKSPACE%\failures*.log" (
197
+ echo Exist Failure logs
198
+ echo Found Failure logs as below:
199
+ for %%f in ("%GITHUB_WORKSPACE%\failures*.log") do (
200
+ echo - %%f
201
+ copy "%%f" "%GITHUB_WORKSPACE%\ut_log\"
202
+ )
203
+ echo Failure logs Copied
204
+ ) else (
205
+ echo No Failure logs
206
+ )
207
+
208
+ REM Copied the passed logs
209
+ if exist "passed*.log" (
210
+ copy "passed*.log" "%GITHUB_WORKSPACE%\ut_log\"
211
+ echo Passed logs Copied
212
+ ) else (
213
+ echo No Passed logs
214
+ )
215
+
216
+ REM Copied the Summary logs
217
+ if exist "category*.log" (
218
+ copy "category*.log" "%GITHUB_WORKSPACE%\ut_log\"
219
+ echo Category logs Copied
220
+ ) else (
221
+ echo No Category logs
222
+ )
223
+ - name : Upload Inductor XPU UT Log
224
+ if : ${{ ! cancelled() }}
225
+ uses : actions/upload-artifact@v4
226
+ with :
227
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows
228
+ path : " %GITHUB_WORKSPACE%/ut_log"
229
+ if-no-files-found : ignore
230
+
231
+ summary :
232
+ needs : [ut_test]
233
+ runs-on : ubuntu-24.04
234
+ timeout-minutes : 30
235
+ env :
236
+ GH_TOKEN : ${{ github.token }}
237
+ steps :
238
+ - name : Checkout torch-xpu-ops
239
+ uses : actions/checkout@v4
240
+ - name : Download XPU UT Logs
241
+ uses : actions/download-artifact@v4
242
+ with :
243
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows
244
+ path : ${{ github.workspace }}/ut_log
245
+ - name : Check UT Results
246
+ shell : bash
247
+ run : |
248
+ ls -al ${{ github.workspace }}/ut_log
249
+ cd ${{ github.workspace }}/ut_log
250
+
251
+ for log_file in "${{ github.workspace }}/ut_log"/{failures,passed,category}_"${{ inputs.ut }}".log; do
252
+ [[ -f "$log_file" ]] && cp "$log_file" ./
253
+ done
254
+
255
+ # get skipped known issues
256
+ count=$(gh api "repos/${{ github.repository }}/issues?labels=skipped" --jq 'length')
257
+ if [ "$count" -gt 0 ]; then
258
+ echo -e "$count issues with skipped label found"
259
+ gh api "repos/${{ github.repository }}/issues?labels=skipped" \
260
+ --jq '.[] | select(.pull_request == null) | "Issue #\(.number): \(.title)\n\(.body)\n"' > issues.log
261
+ fi
262
+
263
+ cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./
264
+ for ut_name in $(echo ${{ inputs.ut }} |sed 's/,/ /g')
265
+ do
266
+ awk -v r="${ut_name}" 'BEGIN{ print_row = 0 }{
267
+ if ( ! ( $0 ~ /[a-zA-Z0-9]/ ) ) { print_row = 0 };
268
+ if ( print_row == 1 && $1 ~ r ) { print $0 };
269
+ if ( $0 ~ /Cases:/ ) { print_row = 1 };
270
+ }' issues.log > Known_issue.log
271
+ bash ut_result_check.sh ${ut_name}
272
+ done
273
+ - name : Upload Inductor XPU UT Log
274
+ if : ${{ ! cancelled() }}
275
+ uses : actions/upload-artifact@v4
276
+ with :
277
+ name : Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows
278
+ path : ${{ github.workspace }}/ut_log
279
+ overwrite : true
0 commit comments