con un clic
xpu-issues-triaging
// Instructions for issue triaging. Works for both pytorch and torch-xpu-ops repos.
// Instructions for issue triaging. Works for both pytorch and torch-xpu-ops repos.
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.
| name | xpu-issues-triaging |
| description | Instructions for issue triaging. Works for both pytorch and torch-xpu-ops repos. |
Check issue labels. If the issue has the label "task", it is a tracking issue — do NOT make any code changes or create a PR. Simply acknowledge the task and stop. Then leave the comment in the issue on why you stopped (e.g., "This is a tracking issue, so no code changes will be made.").
Classify the issue type. Determine which category the issue falls into:
Obtain PyTorch source for cross-reference. If you are in the
torch-xpu-ops repo, clone or fetch the PyTorch repo so you can inspect
the upstream code:
git clone --depth 1 https://github.com/pytorch/pytorch.git /tmp/pytorch
Use this checkout to compare CUDA kernels, check upstream fixes, and
verify device-agnostic code paths. Reference files from /tmp/pytorch/
throughout the remaining steps.
Check which repo you're in: basename $(git rev-parse --show-toplevel)
torch-xpu-ops → XPU kernel/operator code (files under src/)pytorch → PyTorch core code (files under torch/, aten/, test/, c10/)Before writing any fix, check whether the issue has already been resolved on the PyTorch main branch:
torch/, aten/src/ATen/, c10/), the fix belongs in pytorch, not
torch-xpu-ops. Do NOT submit a PR to torch-xpu-ops for such issues.
Comment on the original issue to explain the root cause and where the fix belongs.src/ATen/native/xpu/), the fix belongs in torch-xpu-ops.Extract the reproducer from the issue description. If absent, construct one from the failed test name and error context. The reproducer should be a standalone Python script or pytest command. Do NOT run the reproducer locally (no XPU hardware is available in this environment).
If the issue is caused by a CUDA unit test ported to XPU, follow this dedicated workflow:
test/). Identify the CUDA-specific
assertions, tolerances, dtypes, or device assumptions.device="xpu". Include the same
inputs, dtypes, and expected outputs as the CUDA version.atol / rtol)src/test/ (pytorch repo)This is issue-driven development — the fix must address the root cause described in the issue, not merely make a single reproducer pass.
Key principles:
@skipIfXpu, @skip, unittest.skip.third_party/*; if in
torch-xpu-ops, only modify files in torch-xpu-ops.At the end, output:
### Agent Summary
- **Issue type:** <kernel bug / pytorch core bug / CUDA UT porting / task>
- **Fix repo:** <pytorch / torch-xpu-ops / N/A (already fixed or task)>
- **What I found:** <root cause in one sentence>
- **What I changed:** <bullet list of files, or "None" for task issues>
- **CUDA alignment:** <how the fix aligns with CUDA, or "N/A">
- **Open questions / risks:** <concerns or "None">