en un clic
xpu-pr-auto-labeling
// Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow.
// Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow.
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.
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-pr-auto-labeling |
| description | Rules for automatically determining which disable_* labels to apply to a PR based on the file paths changed. Used by the auto-label workflow. |
Determine which disable_* CI labels to apply to a PR based on the files changed.
These labels control which CI jobs run, reducing unnecessary CI load.
| Label | Effect |
|---|---|
disable_all | Skip all CI test jobs, only run lint |
disable_ut | Skip non-distributed UT jobs |
disable_e2e | Skip e2e (inductor benchmark) jobs |
disable_distributed | Skip distributed UT jobs |
disable_win | Skip Windows CI jobs |
disable_build | Skip source build, use nightly wheel |
Note: Only labels consumed by pull.yml are in scope. Other labels (disable_accelerate, disable_transformers) are used by separate workflows and not managed here.
Evaluate the file paths changed in the PR and apply labels using the following logic. Rules are evaluated top-to-bottom; use the FIRST matching rule set.
Condition: ALL changed files match .github/workflows/, .github/scripts/, .github/ISSUE_TEMPLATE/, .github/copilot-instructions.md, .github/skills/, or other .github/ non-workflow metadata files AND the workflow changes do NOT alter job execution logic (only change triggers, permissions, concurrency, comments, labels conditions, yaml formatting).
Labels: disable_all
Examples: Fixing lint workflow permissions, updating issue templates, adding skills docs.
Condition: Changed files include .github/workflows/ AND the changes alter actual job steps, scripts, environment, or build/test commands.
Labels: Disable all jobs EXCEPT the ones whose workflows are being modified. The modified workflow's jobs must run to validate the change.
_linux_build.yml → keep linux-build running_linux_ut.yml → keep linux-ut running_linux_e2e.yml → keep linux-e2e running_windows_*.yml → keep windows jobs running, add windows_ci to force triggerAdditional: If no src/, cmake/, CMakeLists.txt files changed, add disable_build.
Condition: ALL changed files are test/xpu/skip_list_common.py, test/xpu/expect/, or test/xpu/test_decomp_xpu.py (pure skip list / expect file updates with no test logic change).
Labels: disable_all
Rationale: Skip list changes don't need functional validation beyond lint.
Condition: ALL changed files are under test/ (excluding pure skip/expect files handled by Rule 3).
Labels (base): disable_e2e, disable_distributed
Additional modifiers:
test/xpu/functorch/ or test/xpu/dynamo/ or test/xpu/higher_order_ops/: add disable_wintest/xpu/test_ops*.py, test/xpu/core/, test/xpu/test_nn*.py): add disable_winAdditional: Always add disable_build (test-only changes don't need source build).
Condition: Changed files include src/ATen/ or src/xccl/.
Labels: Depends on which subdirectory:
src/ATen/ only (kernel/operator code, no xccl):
disable_e2e, disable_distributeddisable_win — kernel fixes may be platform-specific (e.g. a fix specifically for Windows)src/xccl/ involved (distributed communication backend):
disable_e2e only — do NOT add disable_distributed (xccl changes must run distributed tests)disable_win (xccl is Linux-only)Note: Do NOT add disable_build — source changes require compilation.
Condition: Changed files include cmake/, CMakeLists.txt, src/**/*.cmake, or tools/.
Labels: None (or minimal). Build system changes need full CI validation.
If ONLY build system files changed (no test, no kernel): disable_e2e, disable_distributed
Condition: Changed files include yaml/ (operator definitions).
Labels: Minimal — operator definition changes can affect many things. Run full CI.
Apply: none (run full CI by default).
Condition: None of the above rules fully apply (mixed src + test + CI, etc.).
Labels: Apply the INTERSECTION of what each individual file category would disable.
src/ file changed: do NOT add disable_buildcmake//CMakeLists.txt changed: do NOT add disable_builddisable_build can be added whenever ALL of these are true:
src/ (excluding src/**/*.py)cmake/CMakeLists.txt changedtools/ that affect the buildWhen disable_build is applied, CI uses nightly wheel instead of building from source.
When used by the auto-label workflow, output ONLY the label names as a comma-separated list:
disable_e2e,disable_distributed,disable_win
If no labels should be applied (full CI needed), output:
none
disable_auto label — When manually added to a PR, auto-labeling is completely disabled for that PR. The workflow will skip without allocating a runner. This label should only be added manually by humans (never by automation) to opt out of auto-labeling when full manual control over CI labels is needed.ai_generated label should still follow these rules (they need CI validation).