Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ci/templates/ci-report.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 🧪 CI Test Summary Report

## 📊 Executive Summary
⏳ **All tests scheduled!** Waiting for launch.

## 📈 Category-Specific Results

| Category | Status | Acc/UT Total | Acc/UT Pass Rate | Perf Eager Ratio | Perf Inductor Ratio |
|-----------------|----------|--------------|-------------------|------------------|---------------------|
| **Lnit Check** | WIP |
| **Clang Check** | WIP |
| **Unit Tests** | WIP |
| **HuggingFace** | WIP |
| **Timm Models** | WIP |
| **TorchBench** | WIP |

## 🔍 Test Details
- **Workflow:** https://github.com/GITHUB_REPOSITORY/actions/runs/GITHUB_RUN_ID
67 changes: 67 additions & 0 deletions .github/actions/add-comment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI Test Report Publisher
description: 'Publishes detailed test reports as GitHub comments with smart updates'

inputs:
comment-body:
description: 'Path to the summary report HTML file'
required: true
default: 'test-results/report.html'
report-title:
description: 'Title for the test report comment'
required: false
default: '🧪 CI Test Summary Report'

runs:
using: composite
steps:
- name: Validate inputs
shell: bash
run: |
if [[ ! -f "${{ inputs.comment-body }}" ]]; then
echo "❌ Report file not found: ${{ inputs.comment-body }}"
exit 1
fi
- name: Publish or update comment
uses: actions/github-script@v7
with:
script: |
// Read the comment content from a file
const fs = require('fs');
const commentBody = fs.readFileSync('${{ inputs.comment-body }}', 'utf8');

// Helper function to find bot comments
const findBotComment = async () => {
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
return comments.find(comment =>
comment.body.includes('${{ inputs.report-title }}')
);
};

try {
const existingComment = await findBotComment();
if (existingComment) {
console.log('📝 Updating existing test report comment');
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: existingComment.id,
body: commentBody
});
} else {
console.log('💬 Creating new test report comment');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody
});
}
console.log('✅ Test report published successfully');
} catch (error) {
console.error('❌ Failed to publish test report:', error.message);
throw error;
}
61 changes: 61 additions & 0 deletions .github/actions/lint-checks/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 'Run Lint Checks'
description: 'Execute code quality and linting checks'

runs:
using: "composite"
steps:
- name: Run Standard Lint Check
shell: bash
run: |
ci_report=".ci/templates/ci-report.txt"

# Update CI report template
sed -i "s+GITHUB_REPOSITORY+${{ github.repository }}+g;s+GITHUB_RUN_ID+${{ github.run_id }}+g" "${ci_report}"

# Run lint check
export ADDITIONAL_LINTRUNNER_ARGS="--skip CLANGTIDY,CLANGFORMAT,MERGE_CONFLICTLESS_CSV --all-files"

if bash ".github/scripts/lintrunner.sh"; then
sed -i 's+.*Lnit Check.*+|**Lnit Check**|✅|1|100%|N/A|N/A|+' "${ci_report}"
echo "✅ Standard lint check passed"
else
sed -i 's+.*Lnit Check.*+|**Lnit Check**|❌|1|0%|N/A|N/A|+' "${ci_report}"
echo "❌ Standard lint check failed"
exit 1
fi
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: torch-xpu-ops
- name: Run Clang-based Lint Check
shell: bash
run: |
set -euo pipefail

# Clone PyTorch and setup environment
rm -rf pytorch
git clone https://github.com/pytorch/pytorch pytorch

cd pytorch
cp -r ../torch-xpu-ops third_party/

# Configure and run clang checks
export ADDITIONAL_LINTRUNNER_ARGS="--take CLANGTIDY,CLANGFORMAT \
build/xpu/**/*.* \
build/xpu/*.* \
third_party/torch-xpu-ops/src/*.* \
third_party/torch-xpu-ops/src/**/*.* \
third_party/torch-xpu-ops/src/**/**/*.* \
third_party/torch-xpu-ops/src/**/**/**/*.*"
export CLANG=1

ci_report="../.ci/templates/ci-report.txt"

if bash "third_party/torch-xpu-ops/.github/scripts/lintrunner.sh"; then
sed -i 's+.*Clang Check.*+|**Clang Check**|✅|1|100%|N/A|N/A|+' "${ci_report}"
echo "✅ Clang lint check passed"
else
sed -i 's+.*Clang Check.*+|**Clang Check**|❌|1|0%|N/A|N/A|+' "${ci_report}"
echo "❌ Clang lint check failed"
exit 1
fi
14 changes: 2 additions & 12 deletions .github/workflows/_linux_e2e_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,9 @@ jobs:
gh --repo ${GITHUB_REPOSITORY} issue edit ${REFERENCE_ISSUE_ID} --body-file new_body.txt
- name: Add comment for performance outliers
if: ${{ github.event_name == 'pull_request' && steps.summary.outputs.performance_regression == 1 }}
uses: actions/github-script@v7
uses: ./.github/actions/add-comment
with:
script: |
// Read the comment content from a file
const fs = require('fs');
const commentBody = fs.readFileSync('./performance.regression.pr.html', 'utf8');
// Create comment on an issue or PR
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody
});
comment-body: './performance.regression.pr.html'
- name: Result check
if: ${{ ! cancelled() }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_performance_comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.10'
- name: Checkout torch-xpu-ops
uses: actions/checkout@v4
- name: Downlaod artifacts
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/_windows_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ on:

permissions: read-all

env:
env:
USE_XPU: 1
PYTORCH_EXTRA_INSTALL_REQUIREMENTS: >-
intel-cmplr-lib-rt==2025.2.1 |
Expand Down Expand Up @@ -156,8 +156,8 @@ jobs:
git config --global core.symlinks true
git config --global core.fsmonitor false
powershell -Command "Set-ItemProperty -Path "HKLM:\\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1"
git status
git show -s
git status
git show -s
git submodule sync && git submodule update --init --recursive
if %TORCH_XPU_OPS_COMMIT% == 'pinned' (
echo "Don't replace torch-xpu-ops!"
Expand Down Expand Up @@ -277,7 +277,7 @@ jobs:
REM Check the failure logs
if exist "%GITHUB_WORKSPACE%\failures*.log" (
echo Exist Failure logs
echo Found Failure logs as below:
echo Found Failure logs as below:
for %%f in ("%GITHUB_WORKSPACE%\failures*.log") do (
echo - %%f
copy "%%f" "%GITHUB_WORKSPACE%\ut_log\"
Expand Down
47 changes: 22 additions & 25 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,28 @@ jobs:
if: ${{ github.repository_owner == 'intel' }}
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
issues: write
pull-requests: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout torch-xpu-ops
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: torch-xpu-ops
- name: Run lint check
run: |
export ADDITIONAL_LINTRUNNER_ARGS="--skip CLANGTIDY,CLANGFORMAT,MERGE_CONFLICTLESS_CSV --all-files"
cd ./torch-xpu-ops
bash .github/scripts/lintrunner.sh
- name: Run lint check with Clang

- name: Setup Linting Environment
run: |
sudo apt update && sudo apt install -y libomp-dev
rm -rf pytorch
git clone https://github.com/pytorch/pytorch pytorch
cd pytorch && cp -r ../torch-xpu-ops third_party/
export ADDITIONAL_LINTRUNNER_ARGS="--take CLANGTIDY,CLANGFORMAT \
build/xpu/**/*.* \
build/xpu/*.* \
third_party/torch-xpu-ops/src/*.* \
third_party/torch-xpu-ops/src/**/*.* \
third_party/torch-xpu-ops/src/**/**/*.* \
third_party/torch-xpu-ops/src/**/**/**/*.*"
export CLANG=1
bash third_party/torch-xpu-ops/.github/scripts/lintrunner.sh
sudo apt-get update
sudo apt-get install -y libomp-dev dos2unix

- name: Run Code Quality Checks
id: lint-checks
uses: ./.github/actions/lint-checks

- name: Publish test report
uses: ./.github/actions/add-comment
with:
comment-body: './.ci/templates/ci-report.txt'

conditions-filter:
if: ${{ github.repository_owner == 'intel' && github.event.pull_request.draft == false }}
Expand All @@ -66,7 +63,7 @@ jobs:
id: check-files
with:
filters: |
src_changed:
src_changed:
- 'cmake/**'
- 'tools/**'
- 'src/**.cmake'
Expand Down Expand Up @@ -161,11 +158,11 @@ jobs:

windows:
name: windows
if: ${{ !(contains(needs.conditions-filter.outputs.disabled_tests, 'disable_all') || contains(needs.conditions-filter.outputs.disabled_tests, 'disable_win')) }}
if: ${{ !(contains(needs.conditions-filter.outputs.disabled_tests, 'disable_all') || contains(needs.conditions-filter.outputs.disabled_tests, 'disable_win')) }}
needs: [conditions-filter, preci-lint-check]
secrets: inherit
uses: ./.github/workflows/_windows_ut.yml
with:
with:
ut: op_extended,test_xpu
runner: Windows_CI
src_changed: ${{ needs.conditions-filter.outputs.src_changed }}
Expand Down