How Torch Spyre systematically tests PyTorch changes on its accelerator

News PyTorch Blog · Source account, not independently verified by us.

Torch Spyre uses PyTorch’s Cross-Repository CI Relay (CRCR) to test changes to the PyTorch core against IBM’s Spyre backend. The integration brings tests and results from an out-of-tree accelerator repository into PyTorch’s CI workflows, helping developers and reviewers spot regressions.

CRCR supports incremental onboarding, from receiving upstream-change notifications to reporting test results and participating in pull-request validation. For Torch Spyre, a key challenge was choosing relevant tests from PyTorch’s tens of thousands. Its multistage pipeline uses information about extension points, backend code, and test runs. It can, for example, surface tests associated with newly supported operators and focus PyTorch upgrades on tests that were added or changed.

The selection is recorded in a reviewable configuration. A YAML-based approach adapts upstream tests without modifying their source code: it can exclude particular data types or shapes and classify tests as required to pass, expected to fail, or skipped. During the upgrade from PyTorch 2.13 to 2.14, the post says the team evaluated about 4,000 changed tests rather than reprocessing the full suite.

These workflows brought Torch Spyre to CRCR’s L2 integration level. The team says the approach is intended to apply to other out-of-tree PyTorch backends and that it plans to work with the PyTorch community on reusable components. The original post provides further detail on test selection, configuration, and upgrade examples.

Source: PyTorch Blog

🇬🇧 https://pytorch.org/blog/from-upstream-changes-to-downstream-confidence-inside-torch-spyres-integration-with-pytorch-crcr

Leave a Comment

The weekly brief: selected developments, projects and videos