diff --git a/.github/workflows/_windows_ut.yml b/.github/workflows/_windows_ut.yml index 217a3fe70..164ccf60c 100644 --- a/.github/workflows/_windows_ut.yml +++ b/.github/workflows/_windows_ut.yml @@ -74,7 +74,7 @@ jobs: ut_test: runs-on: ${{ inputs.runner }} if: ${{ inputs.src_changed == 'true' || inputs.has_label == 'true' }} - timeout-minutes: 900 + timeout-minutes: 2000 steps: - name: Checkout torch-xpu-ops uses: actions/checkout@v4 @@ -90,6 +90,7 @@ jobs: echo "C:\ProgramData\miniforge3\Scripts" >> "$GITHUB_PATH" echo "C:\ProgramData\miniforge3\Library\bin" >> "$GITHUB_PATH" call "C:\ProgramData\miniforge3\Scripts\activate.bat" + rmdir /s /q "C:\ProgramData\miniforge3\envs\windows_ci" call conda clean -ay call conda remove --all -y -n windows_ci call conda create -n windows_ci python=${{ inputs.python }} cmake ninja -y @@ -263,6 +264,21 @@ jobs: if not exist "%GITHUB_WORKSPACE%\ut_log" mkdir "%GITHUB_WORKSPACE%\ut_log" copy test_xpu.xml %GITHUB_WORKSPACE%\ut_log /Y + - name: Run OP UT + if: contains(inputs.ut, 'op_ut') || github.event_name == 'schedule' + shell: cmd + continue-on-error: true + run: | + call "C:\ProgramData\miniforge3\Scripts\activate.bat" + call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat" + call conda activate windows_ci + set PYTORCH_TEST_WITH_SLOW=1 + set PYTORCH_ENABLE_XPU_FALLBACK=1 + set PYTEST_ADDOPTS=-v --timeout 600 --timeout_method=thread --max-worker-restart 1000000 -n 1 + cd ../pytorch/third_party/torch-xpu-ops/test/xpu/ + python run_test_with_skip.py + if not exist "%GITHUB_WORKSPACE%\ut_log" mkdir "%GITHUB_WORKSPACE%\ut_log" + for /r . %%f in (op_ut_with_*.xml) do move "%%f" "%GITHUB_WORKSPACE%\ut_log\" >nul 2>&1 || echo "File move completed" - name: UT Test Results Summary shell: cmd run: | diff --git a/.github/workflows/nightly_ondemand.yml b/.github/workflows/nightly_ondemand.yml index 932ad56a4..ff4d75c0c 100644 --- a/.github/workflows/nightly_ondemand.yml +++ b/.github/workflows/nightly_ondemand.yml @@ -210,7 +210,7 @@ jobs: secrets: inherit uses: ./.github/workflows/_windows_ut.yml with: - ut: 'op_extended,test_xpu' + ut: 'op_extended,test_xpu,op_ut' python: ${{ needs.Conditions-Filter.outputs.python }} src_changed: false has_label: true