一键导入
xpu-ops-pr-creation
// How to create a pull request for the intel/torch-xpu-ops repository. Use when an agent has finished implementing a fix or feature and needs to prepare a branch and PR description that satisfies CI and review requirements.
// How to create a pull request for the intel/torch-xpu-ops repository. Use when an agent has finished implementing a fix or feature and needs to prepare a branch and PR description that satisfies CI and review requirements.
Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow.
Review pull requests for XPU operator or backend code. Use when reviewing PRs in xpu ops, torch-xpu-ops, SYCL kernels, backend dispatch, performance optimization, or tests for Intel GPU / XPU related changes.
Instructions for issue triaging. Works for both pytorch and torch-xpu-ops repos.
| name | xpu-ops-pr-creation |
| description | How to create a pull request for the intel/torch-xpu-ops repository. Use when an agent has finished implementing a fix or feature and needs to prepare a branch and PR description that satisfies CI and review requirements. |
| placeholders | ["branch","title","description","test_line"] |
.github/copilot-instructions.md for full repo context before starting..github/skills/xpu-issues-triaging/SKILL.md for issue triaging before creating a PR.MANDATORY STEPS:
git status # confirm clean working tree
git log main..HEAD --oneline # confirm commits are on your branch, not main
git diff main --stat # sanity-check the changed files
Branch must follow: agent/<slug> (lowercase, hyphens, max 50 chars).
Every PR must include a pytest-compatible test under test/repro/ if it is newly introduced. If the test is in PyTorch or torch-xpu-ops tests, you should explicitly write the run command in the PR body (see Step 3).:
Note: For now, if the test is in PyTorch, explicitly point it out in PR message with bold font!
test_<description>.pydef test_...() functions or class Test... classespytest test/repro/test_<description>.pytorch, targets xpu device (also cuda if relevant)Exceptions (CI-only changes, docs, build fixes): no new test file required, but you must name existing tests that validate the change.
Use this exact template:
Fixes <original_issue_link>
<description of what the PR does and why>
Test: <one of the three forms below>
Three valid Test: forms:
New reproducer added:
Test: test/repro/test_<description>.py
Existing test(s) cover it:
Test: test/repro/test_foo.py, test/xpu/test_bar_xpu.py
No test applicable:
Test: none (<reason>)
The Test: line is required in every PR body. CI reviewers look for it.
Before pushing, run pre-commit and/or lintrunner to catch style and lint issues:
# Option A — pre-commit (if configured)
pre-commit run --files $(git diff main --name-only)
# Option B — lintrunner (if configured)
lintrunner --take FLAKE8,MYPY,CLANGFORMAT -a $(git diff main --name-only)
Fix any reported issues and amend your commit before proceeding. If neither tool is configured in the repo, skip this step and note it in your summary.
git push origin agent/<slug>
origin for this repo is intel/torch-xpu-ops. This is not a fork — push directly
to origin. Do not push to main.
Agents do not auto-open PRs for this repo. Output your summary so a human can review and open the PR.
At the end of your response output EXACTLY this block:
### Agent Summary
- **What I found:** <one sentence>
- **What I changed:** <bullet list of files>
- **Test file:** test/repro/<filename>.py | none (<reason>)
- **Branch:** agent/<slug>
- **PR body draft:**
<title>
<description paragraph>
Test: <test line>
- **Open questions / risks:** <concerns or "None">
Critical: The **Branch:** line must contain the exact branch name. It is machine-parsed.
yaml/, src/, and test/ are consistent (if any were touched)test/repro/ or Test: none (reason) writtenagent/<slug>, not mainmain or upstream