diff --git a/.github/actions/linux-testenv/action.yml b/.github/actions/linux-testenv/action.yml index 26a6843446..ea876649cc 100644 --- a/.github/actions/linux-testenv/action.yml +++ b/.github/actions/linux-testenv/action.yml @@ -35,6 +35,7 @@ runs: fi sudo apt update sudo apt install -y jq numactl + rm -rf Torch-XPU-Wheel-* - name: Setup python-${{ inputs.python }} uses: actions/setup-python@v5 with: @@ -65,7 +66,8 @@ runs: elif [ $(echo "${{ inputs.pytorch }}" |grep -w "nightly_wheel" -c) -ne 0 ];then pip install torch torchvision torchaudio --pre --index-url https://download.pytorch.org/whl/nightly/xpu else - pip install --force-reinstall $(find ${{ github.workspace }}/ -name "*torch*.whl") + latest_dir="$(find . -type d -name "Torch-XPU-Wheel-*" |sort -V |tail -n 1)" + pip install --force-reinstall $(find ${latest_dir} -name "*torch*.whl") fi TORCH_COMMIT_ID=$(python -c 'import torch; print(torch.version.git_version)') if [[ "${{ inputs.pytorch }}" == *"https://"* ]];then diff --git a/.github/scripts/ut_result_check.sh b/.github/scripts/ut_result_check.sh index fe6b1de66b..a94007da11 100644 --- a/.github/scripts/ut_result_check.sh +++ b/.github/scripts/ut_result_check.sh @@ -1,8 +1,12 @@ #!/bin/bash # Test Suite Runner for Intel Torch-XPU-Ops # Usage: ./script.sh + # Available suites: op_regression, op_extended, op_ut, test_xpu, xpu_distributed, skipped_ut -ut_suite="${1:-op_regression}" # Default to op_regression if no suite specified +readonly ut_suite="${1:-op_regression}" # Default to op_regression if no suite specified +readonly inputs_pytorch="${2:-nightly_wheel}" +readonly REPO="intel/torch-xpu-ops" + # Expected test case counts for each test suite category # Used to detect significant test case reductions (>5%) declare -A EXPECTED_CASES=( @@ -13,6 +17,7 @@ declare -A EXPECTED_CASES=( ["op_ut"]=120408 ["test_xpu"]=69 ) + # Tests that are known to randomly pass and should be ignored when detecting new passes # These are typically flaky tests that don't indicate real improvements IGNORE_TESTS=( @@ -23,10 +28,13 @@ IGNORE_TESTS=( "test_python_ref__refs_log2_xpu_complex128" "_jiterator_" # Pattern to match all jiterator tests ) + # Find new failed test cases that are not in the known issues list # Args: UT_results_file, known_issues_file, [output_file] check_new_failed() { - local ut_file="$1" known_file="$2" output_file="${3:-${ut_file%.*}_filtered.log}" + local ut_file="$1" + local known_file="$2" + local output_file="failures_${suite}_filtered.log" if [[ $# -lt 2 ]]; then echo "āŒ Need 2 files to compare" >&2 return 1 @@ -45,6 +53,7 @@ check_new_failed() { echo -e "āœ… No new failed cases" fi } + # Find known issues that are now passing (regression fixes) # Args: passed_tests_file, known_issues_file, [output_file] check_passed_known_issues() { @@ -58,7 +67,7 @@ check_passed_known_issues() { sed -i 's/\r$//' "$passed_file" fi # Find known issues that are now passing (intersection of passed tests and known issues) - grep -Fxf "$passed_file" "$known_file" > "$output_file" + grep -Fxf "$passed_file" "$known_file" |sort |uniq > "$output_file" echo -e "\\nšŸ“Š New Passing Known Issues:" if [[ -s "$output_file" ]]; then local count @@ -68,8 +77,13 @@ check_passed_known_issues() { else echo -e "ā„¹ļø No known issues are now passing" fi + # Mark passed items in GitHub issues with strikethrough + if [ "$GITHUB_EVENT_NAME" == "schedule" ] && [ "$inputs_pytorch" != "nightly_wheel" ];then + mark_passed_issue "$output_file" "$known_file" + fi rm -f "$output_file" # Clean up temporary file } + # Verify test case counts haven't dropped significantly (>5% reduction) # Args: category_log_file check_test_cases() { @@ -106,6 +120,7 @@ check_test_cases() { done < "$log_file" echo "$all_pass" # Return overall status } + # Clean test case files: extract test names, sort, and remove duplicates clean_file() { local file="$1" @@ -123,7 +138,7 @@ check_skipped_ut() { local new_file="new-passed-issue.cases" local result_file="new-passed-this-run.cases" # Fetch known passing tests from GitHub issue tracking known passes - if gh --repo intel/torch-xpu-ops issue view "${NEW_PASSED_ISSUE:-2333}" --json body -q .body 2>/dev/null | grep "::.*::" > "$known_file"; then + if gh --repo $REPO issue view "${NEW_PASSED_ISSUE:-2333}" --json body -q .body 2>/dev/null | grep "::.*::" > "$known_file"; then echo "āœ… Fetched known tests from GitHub" else echo "āš ļø Using empty known tests file" @@ -151,11 +166,14 @@ check_skipped_ut() { echo "āœ… No new passing tests found" fi # Update GitHub issue with current passing tests for future reference - if [ -s "$known_file" ] || [ -s "$new_file" ]; then - gh --repo intel/torch-xpu-ops issue edit "${NEW_PASSED_ISSUE:-2333}" --body-file "$new_file" - echo "Successfully updated issue ${NEW_PASSED_ISSUE:-2333}" + if [ "$GITHUB_EVENT_NAME" == "schedule" ] && [ "$inputs_pytorch" != "nightly_wheel" ];then + if [ -s "$known_file" ] || [ -s "$new_file" ]; then + gh --repo $REPO issue edit "${NEW_PASSED_ISSUE:-2333}" --body-file "$new_file" + echo "āœ… Successfully updated issue #${NEW_PASSED_ISSUE:-2333}" + fi fi } + # Main test runner for standard test suites (op_regression, op_extended, etc.) run_main_tests() { local suite="$1" @@ -190,7 +208,7 @@ run_main_tests() { echo -e "\\nāœ… Passing Known Issues:" check_passed_known_issues "passed_${suite}.log" "Known_issue.log" # Check for new failures not in known issues - echo -e "\\nāŒ New Failures:" + echo -e "\\nChecking New Failures:" if [[ -f "failures_${suite}.log" ]]; then check_new_failed "failures_${suite}.log" "Known_issue.log" fi @@ -212,6 +230,7 @@ run_main_tests() { echo "āœ… TEST PASSED: ${suite}" fi } + # Special runner for distributed test suite (different log format) run_distributed_tests() { local suite="$1" @@ -219,8 +238,10 @@ run_distributed_tests() { echo "Running distributed tests for: ${suite}" echo "=========================================================================" # Process distributed test logs (different format than main tests) - grep -E "^FAILED" "${suite}_test.log" | awk '{print $3 "\n" $2}' | grep -v '^[^.d]\+$' > "${suite}_failed.log" - grep "PASSED" "${suite}_test.log" | awk '{print $1}' > "${suite}_passed.log" + grep "FAILED" "${suite}_test.log" > "${suite}_failed.log" + clean_file "${suite}_failed.log" + grep "PASSED" "${suite}_test.log" > "${suite}_passed.log" + clean_file "${suite}_passed.log" echo "šŸ“‹ Failed Cases:" cat "${suite}_failed.log" # Identify filtered tests (known issues in distributed tests) @@ -239,8 +260,8 @@ run_distributed_tests() { check_new_failed "${suite}_failed.log" "Known_issue.log" # Calculate final statistics for distributed tests local failed_count=0 passed_count=0 - if [[ -f "${suite}_failed_filtered.log" ]]; then - failed_count=$(wc -l < "${suite}_failed_filtered.log") + if [[ -f "failures_${suite}_filtered.log" ]]; then + failed_count=$(wc -l < "failures_${suite}_filtered.log") fi passed_count=$(wc -l < "${suite}_passed.log") # Final result determination for distributed tests @@ -251,6 +272,75 @@ run_distributed_tests() { echo "āœ… TEST PASSED: ${suite}" fi } + +# Mark passed items in GitHub issues with strikethrough +mark_passed_issue() { + local PASSED_FILE="$1" + local ISSUE_FILE="$2" + # Cehck before start + [[ ! -f "$PASSED_FILE" ]] && { echo "āŒ Missing $PASSED_FILE" >&2; exit 1; } + [[ ! -f "$ISSUE_FILE" ]] && { echo "āŒ Missing $ISSUE_FILE" >&2; exit 1; } + command -v gh &>/dev/null || { echo "āŒ GitHub CLI required" >&2; exit 1; } + echo "šŸ” Loading passed items..." + # Load passed items into array for efficient lookup + declare -a passed_items + mapfile -t passed_items < <(grep -v '^[[:space:]]*$' "$PASSED_FILE") + echo "šŸ” Mapping passed items to issues..." + declare -A issue_items + local issue_id="" + local in_cases_section=0 + while IFS= read -r line; do + line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + [[ -z "$line" ]] && { in_cases_section=0; continue;} + if [[ "$line" == "Cases:"* ]]; then + in_cases_section=1 + continue + fi + # Extract issue ID if this line contains an issue + if [[ "$line" =~ Issue\ #([0-9]+) ]]; then + issue_id="${BASH_REMATCH[1]}" + continue + fi + if [[ $in_cases_section -eq 1 && -n "$issue_id" ]]; then + # Check if this case is in the passed items + for passed_case in "${passed_items[@]}"; do + if [[ "$passed_case" == "$line" ]]; then + if [[ -n "${issue_items[$issue_id]:-}" ]]; then + issue_items["$issue_id"]+=" $passed_case" + else + issue_items["$issue_id"]="$passed_case" + fi + break + fi + done + fi + done < "$ISSUE_FILE" + echo "āœ… Done! Found ${#issue_items[@]} issues with passed items" + # Print results and update issues + for issue_id in "${!issue_items[@]}"; do + # Remove duplicate cases and clean up formatting + uniq_cases=$(echo "${issue_items[$issue_id]}" | tr ' ' '\n' | sort | uniq | tr '\n' ' ') + echo "šŸ“ Processing issue #${issue_id} with cases: ${uniq_cases}" + # Get current issue body + gh --repo "$REPO" issue view "${issue_id}" --json body -q .body > "issue-body-${issue_id}.txt" + # Apply strikethrough to passed cases + for case in $uniq_cases; do + sed -i "s|^${case}[[:space:]]*$|~~${case}~~|g" "issue-body-${issue_id}.txt" + done + # Update the issue + gh --repo "$REPO" issue edit "${issue_id}" --body-file "issue-body-${issue_id}.txt" + # Add comment + if [[ -n "${GITHUB_RUN_ID:-}" && -n "${GITHUB_REPOSITORY:-}" ]]; then + gh --repo "$REPO" issue comment "${issue_id}" --body "āœ… ${uniq_cases} Passed in [nightly testing](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})" + else + gh --repo "$REPO" issue comment "${issue_id}" --body "āœ… ${uniq_cases} Passed in nightly testing" + fi + # Clean up temporary file + rm -f "issue-body-${issue_id}.txt" + echo "āœ… Updated issue #${issue_id}" + done +} + # Main dispatcher - route to appropriate test runner based on suite type case "$ut_suite" in op_regression|op_regression_dev1|op_extended|op_transformers|op_ut|test_xpu) @@ -262,9 +352,12 @@ case "$ut_suite" in skipped_ut) check_skipped_ut ;; + xpu_profiling) + echo "šŸ’” Not check the test suite results: ${ut_suite}" >&2 + ;; *) echo "āŒ Unknown test suite: ${ut_suite}" >&2 - echo "šŸ’” Available: op_regression, op_extended, op_ut, test_xpu, xpu_distributed, skipped_ut" >&2 - exit 1 + printf "šŸ’” Available: op_regression, op_regression_dev1, op_extended, op_transformers, " >&2 + printf "op_ut, test_xpu, xpu_distributed, skipped_ut, xpu_profiling\n" >&2 ;; esac diff --git a/.github/workflows/_linux_build.yml b/.github/workflows/_linux_build.yml index 089c5ff540..1bed161f2b 100644 --- a/.github/workflows/_linux_build.yml +++ b/.github/workflows/_linux_build.yml @@ -205,13 +205,13 @@ jobs: if: ${{ success() }} uses: actions/upload-artifact@v4 with: - name: Torch-XPU-Wheel-${{ github.event.pull_request.number || github.sha }} + name: Torch-XPU-Wheel-${{ github.event.pull_request.number || github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/*.whl - name: Upload Build Log if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Torch-XPU-Build-Log-${{ github.event.pull_request.number || github.sha }} + name: Torch-XPU-Build-Log-${{ github.event.pull_request.number || github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/build_*.log - name: Cleanup workspace if: ${{ always() }} diff --git a/.github/workflows/_linux_e2e.yml b/.github/workflows/_linux_e2e.yml index d938a182d4..ef986f3f01 100644 --- a/.github/workflows/_linux_e2e.yml +++ b/.github/workflows/_linux_e2e.yml @@ -233,5 +233,5 @@ jobs: if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Inductor-${{ inputs.test_type }}-LTS2-XPU-E2E-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.suite }} + name: Inductor-${{ inputs.test_type }}-LTS2-XPU-E2E-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.suite }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/upload_files diff --git a/.github/workflows/_linux_e2e_summary.yml b/.github/workflows/_linux_e2e_summary.yml index c7ff06e653..d756455109 100644 --- a/.github/workflows/_linux_e2e_summary.yml +++ b/.github/workflows/_linux_e2e_summary.yml @@ -44,10 +44,10 @@ jobs: run: | mkdir target/ cd target/ - target_dir="Inductor-${{ inputs.test_type }}-LTS2-XPU-E2E-Data-*" - gh --repo ${GITHUB_REPOSITORY} run download ${GITHUB_RUN_ID} -p "${target_dir}" - find Inductor-${{ inputs.test_type }}-LTS2-XPU-E2E-Data-*/ -maxdepth 1 -mindepth 1 -type d |\ - while read line; do mv $line .; done + gh --repo ${GITHUB_REPOSITORY} run download ${GITHUB_RUN_ID} -p "Inductor-*-XPU-E2E-*" + find Inductor-*-XPU-E2E-*/ -maxdepth 1 -mindepth 1 -type d |sort -V |\ + while read line; do rsync -az --delete $line/ $(basename $line)/; done + rm -rf Inductor-*-XPU-E2E-* || true - name: Download Baseline Artifact run: | mkdir baseline/ @@ -61,7 +61,9 @@ jobs: REFERENCE_RUN_ID="$(cat body.txt |grep "Inductor-${artifact_type}-LTS2" |sed 's/.*: *//' || echo '')" if [ "${REFERENCE_RUN_ID}" != "" ];then gh --repo intel/torch-xpu-ops run download ${REFERENCE_RUN_ID} -p "Inductor-*-XPU-E2E-*" - find Inductor-*-XPU-E2E-*/ -maxdepth 1 -mindepth 1 -type d |while read line; do mv $line .; done + find Inductor-*-XPU-E2E-*/ -maxdepth 1 -mindepth 1 -type d |sort -V |\ + while read line; do rsync -az --delete $line/ $(basename $line)/; done + rm -rf Inductor-*-XPU-E2E-* || true fi - name: Get summary id: summary diff --git a/.github/workflows/_linux_op_benchmark.yml b/.github/workflows/_linux_op_benchmark.yml index a80f0b1973..c5415455d7 100644 --- a/.github/workflows/_linux_op_benchmark.yml +++ b/.github/workflows/_linux_op_benchmark.yml @@ -83,7 +83,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }} + name: Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/op_benchmark op_benchmark_test_results_check: @@ -96,7 +96,6 @@ jobs: run: | sudo apt-get update sudo apt-get install gh rsync ca-certificates -y - find ./ |grep -v "^\./$" |xargs rm -rf - name: Checkout torch-xpu-ops uses: actions/checkout@v4 - name: Setup python-${{ inputs.python }} @@ -106,12 +105,16 @@ jobs: - name: Download XPU UT Logs uses: actions/download-artifact@v4 with: - name: Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }} - path: ${{ github.workspace }}/op_benchmark + pattern: Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }}-* + path: ${{ github.workspace }}/op_benchmark_tmp - name: Download OP Baseline continue-on-error: true id: reference_id run: | + # latest dir + latest_dir=$(find . -type d -name "Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }}-*" |sort -V |tail -n 1) + mv ${{ github.workspace }}/op_benchmark_tmp/${latest_dir} ${{ github.workspace }}/op_benchmark + # baseline REFERENCE_RUN_ID="$(gh --repo ${GITHUB_REPOSITORY} issue view ${reference_issue} \ --json body -q .body |grep "Inductor-XPU-OP-Benchmark-Data" |sed 's/.*: *//')" gh --repo ${GITHUB_REPOSITORY} run download ${REFERENCE_RUN_ID} -p "Inductor-XPU-OP-Benchmark-Data-*" @@ -147,7 +150,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }}-Updated + name: Inductor-XPU-OP-Benchmark-Data-${{ github.event.pull_request.number || github.sha }}-Updated-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/op_benchmark - name: Upload Reference Run ID run: | diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index 23dcaa3ae6..dc10647124 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -86,14 +86,14 @@ jobs: if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }} + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/ut_log if-no-files-found: ignore - name: Upload XPU UT Failure list if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }} + name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/ut_log/ut_failure_list.csv if-no-files-found: ignore @@ -122,14 +122,14 @@ jobs: if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }} + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/ut_log if-no-files-found: ignore - name: Upload XPU UT Failure list if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }} + name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/ut_log/ut_failure_list.csv if-no-files-found: ignore @@ -146,16 +146,21 @@ jobs: - name: Download XPU UT Logs uses: actions/download-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }} + pattern: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-* path: ${{ github.workspace }}/ut_log - name: Check UT Results run: | ls -al ${{ github.workspace }}/ut_log - cd ${{ github.workspace }}/ut_log/${{ inputs.ut }} - - for log_file in "${{ github.workspace }}/ut_log"/{failures,passed,category,reproduce}_*.log; do - [[ -f "$log_file" ]] && cp "$log_file" ./ - done + cd ${{ github.workspace }}/ut_log/ + latest_dir=$(find . -type d -name "Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-*" |sort -V |tail -n 1) + cd "${latest_dir}/${{ inputs.ut }}" + find "${{ github.workspace }}/ut_log" -type f \ + \( -name "failures_*.log" -o \ + -name "passed_*.log" -o \ + -name "category_*.log" -o \ + -name "reproduce_*.log" \) \ + -exec mv {} ./ \; || true + cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./ # get distributed known issues gh --repo intel/torch-xpu-ops issue view $UT_SKIP_ISSUE --json body -q .body |sed -E '/^(#|$)/d' > Known_issue.log.tmp # get skipped known issues @@ -170,7 +175,6 @@ jobs: else ut_list="${{ inputs.ut }}" fi - cp ${{ github.workspace }}/.github/scripts/ut_result_check.sh ./ for ut_name in ${ut_list} do cp Known_issue.log.tmp Known_issue.log @@ -179,12 +183,13 @@ jobs: if ( print_row == 1 && $1 ~ r ) { print $0 }; if ( $0 ~ /Cases:/ ) { print_row = 1 }; }' issues.log >> Known_issue.log - bash ut_result_check.sh ${ut_name} + sed -i 's/[[:space:]]*$//g' Known_issue.log + bash ut_result_check.sh "${ut_name}" "${{ inputs.pytorch }}" done - name: Upload Inductor XPU UT Log if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }} + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ inputs.ut }}-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/ut_log overwrite: true diff --git a/.github/workflows/_windows_ut.yml b/.github/workflows/_windows_ut.yml index 217a3fe70f..28ec8bbfe4 100644 --- a/.github/workflows/_windows_ut.yml +++ b/.github/workflows/_windows_ut.yml @@ -228,13 +228,13 @@ jobs: if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Torch-XPU-Windows-Log-${{ github.event.pull_request.number || github.sha }} + name: Torch-XPU-Windows-Log-${{ github.event.pull_request.number || github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} path: 'C:\actions-runner\_work\torch-xpu-ops\pytorch\build_torch_wheel_log.log' - name: Upload Windows binary if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Torch-XPU-Windows-Binary-${{ github.event.pull_request.number || github.sha }} + name: Torch-XPU-Windows-Binary-${{ github.event.pull_request.number || github.sha }}-${{ github.run_id }}-${{ github.run_attempt }} path: 'C:\actions-runner\_work\torch-xpu-ops\pytorch\dist' - name: Run XPU OP Extended UT if: contains(inputs.ut, 'op_extended') || github.event_name == 'schedule' @@ -306,7 +306,7 @@ jobs: if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows-${{ github.run_id }}-${{ github.run_attempt }} path: "${{ github.workspace }}/ut_log" if-no-files-found: ignore @@ -322,13 +322,15 @@ jobs: - name: Download XPU UT Logs uses: actions/download-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows + pattern: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows-* path: ${{ github.workspace }}/ut_log - name: Check UT Results shell: bash run: | ls -al ${{ github.workspace }}/ut_log cd ${{ github.workspace }}/ut_log + latest_dir=$(find . -type d -name "Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows-*" |sort -V |tail -n 1) + cd "${latest_dir}" # get skipped known issues count=$(gh api --paginate "repos/${{ github.repository }}/issues?labels=skipped_windows" --jq 'length') @@ -357,6 +359,6 @@ jobs: if: ${{ ! cancelled() }} uses: actions/upload-artifact@v4 with: - name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows + name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-Windows-${{ github.run_id }}-${{ github.run_attempt }} path: ${{ github.workspace }}/ut_log overwrite: true