بنقرة واحدة
xpu-issues-triaging
Triaging the pytorch or torch-xpu-ops issue. Use to determine root cause and fix strategy.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Triaging the pytorch or torch-xpu-ops issue. Use to determine root cause and fix strategy.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Analyze UT (unit test) results for a torch-xpu-ops PR. Use when asked to check test results, analyze CI failures, or evaluate test coverage for a PR. Produces a structured report of new failures, failure relevance, and new test coverage.
Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow.
Extract GPU ISA from oneDNN ngen-JIT kernels. This is the ONLY codegen path that bypasses the standard SYCL/SPIR-V/IGC stack. oneDNN uses its own native code generator (ngen) that directly emits GPU ISA bytes — no SPIR-V, no IGC, no zebin ELF, no .debug_line. Use when extracting ASM from oneDNN kernels (gemm_kernel, gen_conv_kernel), matmul, linear, conv, or SDPA-graph ops dispatched via mkldnn.
Extract GPU ISA from AOT-compiled SYCL binaries using NEO driver runtime dump. Use when the kernel is a SYCL symbol (_ZTS...) from an AOT binary such as libtorch_xpu.so, SYCL-TLA FMHA, or any DPC++ binary compiled with -fsycl-targets=spir64_gen -Xs "-device <gpu>".
Extract GPU ISA from JIT-compiled SYCL kernels. The binary only contains SPIR-V; IGC compiles it to native ISA at first launch. The zebin only exists in memory at runtime, so IGC_ShaderDumpEnable=1 is required to capture it. Use when extracting ASM from SYCL JIT kernels, torch-xpu-ops built with TORCH_XPU_ARCH_LIST=none, or standalone DPC++ without AOT flags.
Extract GPU ISA from Triton kernels on XPU. Triton compiles through the same IGC backend as SYCL (Triton IR → SPIR-V → IGC → zebin). Extraction is identical to sycl-jit: IGC_ShaderDumpEnable=1 captures the zebin at runtime. Use when extracting ASM from torch.compile fusions (triton_per_fused, triton_poi, triton_red), standalone @triton.jit kernels, or Inductor-generated XPU kernels.
| name | xpu-issues-triaging |
| description | Triaging the pytorch or torch-xpu-ops issue. Use to determine root cause and fix strategy. |
Scope note: This skill is analysis-only. Implementation belongs to the
issue-fixskill. Any existing workflow that expected this skill to produce a code fix should delegate toissue-fixafter this skill returns a verdict ofIMPLEMENTING.
Execution mode: this skill behaves differently in interactive (default) vs pipeline mode (e.g. whether it comments on the issue). See ../issue-handler/references/execution-modes.md.
You analyze; you do not execute code or edit files. Implementation belongs
to the issue-fix skill. In this triage stage, you could only do modification for
unskip the skip decorator or just do some prints for triaging. DO NOT commit
any code changes!
read/grep).test-verification skill
to run it and confirm the failure before triaging; do NOT run it yourself.Determine:
pytorch or torch-xpu-ops.IMPLEMENTING) or does it need a human
(NEEDS_HUMAN).agent:triaged status (or already carries a
root-cause analysis and fix strategy you trust), do NOT re-triage. Confirm the
existing verdict and stop.task / [Task] / [Feature], or it describes broad
alignment/enablement work -> NEEDS_HUMAN, reason "Umbrella/task issue, not a
single fixable bug". Do NOT make code changes for task-labeled issues. In
interactive mode (default) tell the user why you stopped; in pipeline
mode leave a comment on the issue explaining why you stopped. (See
issue-handler/SKILL.md "Execution modes".)NEEDS_HUMAN.NEEDS_HUMAN,
reason "Performance optimization requires human design decision".Determine which category the issue falls into:
Check which repo you're in: basename $(git rev-parse --show-toplevel)
torch-xpu-ops -> XPU kernel/operator code (files under src/).pytorch -> core code (files under torch/, aten/, test/, c10/).If you are in torch-xpu-ops, fetch the PyTorch repo to inspect upstream code:
git clone --depth 1 https://github.com/pytorch/pytorch.git /tmp/pytorch
Use /tmp/pytorch/ to compare CUDA kernels, check upstream fixes, and verify
device-agnostic paths.
read/grep. Stop when you have enough
to make a call, not after counting files.IMPLEMENTING — even without running
the reproducer. Only conclude "needs hardware to reproduce" if static
analysis genuinely cannot determine what's wrong.@skipIfXpu, @xfailIfXpu, or similar and wants them removed so the tests
pass on XPU, the decorator's presence confirms the issue EXISTS — it IS
the problem, not a fix. Do NOT conclude "already fixed" because skip
decorators exist.Label the failure by where the fix must be made, not by keywords that happen to appear in the title, error, or stack trace. A keyword tells you what failed, not why.
nan in a parameter name is not a NaN/Inf bug unless the
bug is actually about NaN propagation.autograd does not make it an autograd bug —
check whether the bug is in autograd itself or just on the call path.The single question that decides root cause (and target_repo): "where would
the fix need to be made?"
If the issue cannot be reduced to something an agent can reproduce or analyze
statically, lean toward NEEDS_HUMAN (or defer to the test-verification
skill). Signals:
If the failure is a CUDA unit test ported to XPU:
test/). Identify CUDA-specific assertions, tolerances, dtypes, or device
assumptions.device="xpu", with the same inputs, dtypes, and expected outputs.atol/rtol), operator dispatch paths, device-specific decorators/skips.src/.test/
(pytorch repo).torch/,
aten/src/ATen/, c10/) -> fix belongs in pytorch. Do NOT submit a
torch-xpu-ops PR. Surface the root cause and where the fix belongs: tell the
user in interactive mode, or comment on the issue in pipeline mode.src/ATen/native/xpu/, or third_party/torch-xpu-ops/ inside the pytorch
tree) -> fix belongs in torch-xpu-ops.IMPLEMENTING.NEEDS_HUMAN.Extract the reproducer command from the issue (pytest command, python script,
bash command, or just a test name). You cannot run it here — use it to
understand the code path, not to verify the failure. To actually reproduce
locally, use the test-verification skill.
Classify the root cause to structure the fix strategy:
| Category | Description | Typical fix location |
|---|---|---|
| XPU backend bug | Bug in XPU kernel or backend code | torch/_inductor/ or third_party/torch-xpu-ops/ |
| Tolerance too tight | Numerical precision mismatch vs CUDA | Adjust atol/rtol to match CUDA |
| Edge case / numerical accuracy | NaN/Inf from extreme inputs, CPU-vs-XPU or fp32-vs-fp16 divergence, values near finfo.max/min, fuzzer-generated cases | Compare against CUDA/CPU reference; confirm it is a real bug, not expected precision behavior |
| Skip decorator stale | @skipIfXpu/@expectedFailure but test now passes | Remove decorator (see issue-fix) |
| Upstream regression | New upstream code broke XPU; needs XPU workaround | torch/, aten/, test/ |
| Test infrastructure | Environment, import, or setup issue | Test file or CI config |
When the issue describes a newly added test, check the commit/PR that introduced it to see if XPU support is expected — this affects the fix strategy.
@skipIfXpu/@skip/unittest.skip.Pipeline mode only. In interactive mode (default), return the triage result to the user/orchestrator and do not write to the issue body. See ../issue-handler/references/execution-modes.md for the full contract.
This stage corresponds to legacy status stages TRIAGING -> TRIAGED. It
produces the Root Cause Analysis / Proposed Fix Strategy / Target Repository
content and the <!-- agent:upstream-log --> / <!-- agent:triage-log --> log
text. In pipeline mode the issue-handler orchestrator writes that content into
the issue body, advances <!-- agent:status:... -->, and sets the label
(agent:active while triaging, agent:triaged when done, agent:needs-human
on a NEEDS_HUMAN verdict).
Pipeline mode: Return ONLY this JSON block as the LAST thing in your
response, with no text after it. The issue-handler orchestrator is responsible
for writing it into the issue body and advancing the status marker.
{
"root_cause": "detailed analysis (2-3 sentences)",
"fix_strategy": "specific files/functions to change",
"target_repo": "pytorch or torch-xpu-ops",
"verdict": "IMPLEMENTING or NEEDS_HUMAN",
"reason": "one-line reason"
}
Interactive mode: Return the JSON above followed by the human-readable summary below (no JSON-last constraint applies in interactive mode):
### 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>
- **Fix strategy:** <files/functions to change, or "None" for task issues>
- **CUDA alignment:** <how the strategy aligns with CUDA, or "N/A">
- **Verdict:** <IMPLEMENTING / NEEDS_HUMAN> — <reason>
"torch-xpu-ops" — fix in src/ATen/native/xpu/sycl/,
src/ATen/native/xpu/, or any path relative to torch-xpu-ops root. This
includes files under third_party/torch-xpu-ops/ in the pytorch tree —
those are torch-xpu-ops source files bundled as a submodule."pytorch" — fix in torch/, aten/src/ATen/, test/, c10/,
torch/_dynamo/, torch/_inductor/, or any top-level pytorch path (but NOT
third_party/torch-xpu-ops/).Once the verdict is IMPLEMENTING, hand off to the issue-fix skill to
implement and verify the fix.