Developer Tools

PyTorch Optimizes CI by Excluding Redundant OpInfo Tests from CPU Builds

Pull request #190635 slashes test runtime by removing duplicate coverage in default config.

Deep Dive

PyTorch has merged a CI optimization pull request (#190635) that streamlines the default CPU build configuration by excluding the `test_torchinductor_opinfo` test file. This test, which validates inductor operators via OpInfo, was running redundantly in six CPU default jobs even though identical coverage already executes in `inductor_amx` and `inductor_core` jobs across trunk, `ciflow/inductor`, and periodic runs. The change introduces a generic `TESTS_TO_EXCLUDE` parameter (symmetric to the existing `TESTS_TO_INCLUDE`), allowing developers to specify exclusions via `run_test.py --exclude`.

The patch aims to reduce overall test runtime and stabilize shard balancing, which had been skewed by the heavy `test_torchinductor_opinfo` file. Importantly, the excluded tests remain fully active in non-pull contexts (e.g., periodic and user-facing inductor builds), ensuring no loss of operator coverage. Authored with assistance from Claude and approved by core maintainer Jason Ansel, this is a pragmatic move to accelerate the CI pipeline for pull requests without sacrificing quality. Expect faster iteration times for PyTorch contributors, particularly those working on CPU-related changes.

Key Points
  • Excludes `test_torchinductor_opinfo` from six CPU default CI jobs to remove redundancy
  • Adds generic `TESTS_TO_EXCLUDE` mechanism, complementing existing `TESTS_TO_INCLUDE`
  • Coverage maintained via `inductor_amx` and `inductor_core` jobs on trunk and periodic runs

Why It Matters

Faster CI for PyTorch PRs means quicker feedback for contributors and more efficient development cycles.

📬 Get the top 10 AI stories daily