|
90 | 90 | echo "C:\ProgramData\miniforge3\Scripts" >> "$GITHUB_PATH" |
91 | 91 | echo "C:\ProgramData\miniforge3\Library\bin" >> "$GITHUB_PATH" |
92 | 92 | call "C:\ProgramData\miniforge3\Scripts\activate.bat" |
| 93 | + rmdir /s "C:\ProgramData\miniforge3\envs\windows_ci" |
93 | 94 | call conda clean -ay |
94 | 95 | call conda remove --all -y -n windows_ci |
95 | 96 | call conda create -n windows_ci python=${{ inputs.python }} cmake ninja -y |
@@ -263,6 +264,67 @@ jobs: |
263 | 264 |
|
264 | 265 | if not exist "%GITHUB_WORKSPACE%\ut_log" mkdir "%GITHUB_WORKSPACE%\ut_log" |
265 | 266 | copy test_xpu.xml %GITHUB_WORKSPACE%\ut_log /Y |
| 267 | + - name: Run OP UT |
| 268 | + if: contains(inputs.ut, 'op_ut') || github.event_name == 'schedule' |
| 269 | + shell: cmd |
| 270 | + continue-on-error: true |
| 271 | + run: | |
| 272 | + call "C:\ProgramData\miniforge3\Scripts\activate.bat" |
| 273 | + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" |
| 274 | + call conda activate windows_ci |
| 275 | + set PYTORCH_TEST_WITH_SLOW=1 |
| 276 | + set PYTORCH_ENABLE_XPU_FALLBACK=1 |
| 277 | + cd ../pytorch/third_party/torch-xpu-ops/test/xpu/ |
| 278 | + python run_test_with_skip.py |
| 279 | + if not exist "%GITHUB_WORKSPACE%\ut_log" mkdir "%GITHUB_WORKSPACE%\ut_log" |
| 280 | + for %%f in (*.xml) do ( |
| 281 | + if exist "%%f" ( |
| 282 | + copy "%%f" "%GITHUB_WORKSPACE%\ut_log" /Y |
| 283 | + ) |
| 284 | + ) |
| 285 | + if exist "op_ut_with_skip.nn" ( |
| 286 | + echo Processing directory: op_ut_with_skip.nn |
| 287 | + for /r "op_ut_with_skip.nn" %%f in (*.xml) do ( |
| 288 | + if exist "%%f" ( |
| 289 | + move "%%f" "%%~dpfop_ut_with_skip.nn.%%~nxf" >nul |
| 290 | + ) |
| 291 | + ) |
| 292 | + ) |
| 293 | + if exist "op_ut_with_skip.quantization\core" ( |
| 294 | + echo Processing directory: op_ut_with_skip.quantization\core |
| 295 | + for /r "op_ut_with_skip.quantization\core" %%f in (*.xml) do ( |
| 296 | + if exist "%%f" ( |
| 297 | + move "%%f" "%%~dpfop_ut_with_skip.quantization.core.%%~nxf" >nul |
| 298 | + ) |
| 299 | + ) |
| 300 | + ) |
| 301 | + if exist "op_ut_with_all.functorch" ( |
| 302 | + echo Processing directory: op_ut_with_all.functorch |
| 303 | + for /r "op_ut_with_all.functorch" %%f in (*.xml) do ( |
| 304 | + if exist "%%f" ( |
| 305 | + move "%%f" "%%~dpfop_ut_with_all_functorch_%%~nxf" >nul |
| 306 | + ) |
| 307 | + ) |
| 308 | + ) |
| 309 | + echo === XML files in directory === |
| 310 | + dir "op_ut_with_skip_nn\*.xml" /B |
| 311 | + dir "op_ut_with_skip_quantization\core\*.xml" /B |
| 312 | + dir "op_ut_with_all_functorch\*.xml" /B |
| 313 | +
|
| 314 | + for %%d in (op_ut_with_skip.nn "op_ut_with_skip.quantization\core" op_ut_with_all.functorch) do ( |
| 315 | + if exist "%%d" ( |
| 316 | + echo Copying XML files from %%d |
| 317 | + for /f "delims=" %%f in ('dir "%%d\*.xml" /B /S 2^>nul') do ( |
| 318 | + if exist "%%f" ( |
| 319 | + echo Copying: %%f |
| 320 | + copy "%%f" "%GITHUB_WORKSPACE%\ut_log\" /Y |
| 321 | + ) |
| 322 | + ) |
| 323 | + ) |
| 324 | + ) |
| 325 | + |
| 326 | + python run_test_with_only.py |
| 327 | + copy op_ut_with_only.xml %GITHUB_WORKSPACE%\ut_log /Y |
266 | 328 | - name: UT Test Results Summary |
267 | 329 | shell: cmd |
268 | 330 | run: | |
|
0 commit comments