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