Skip to main content

A comprehensive PyTorch backend validation and benchmarking suite

Project description

TorchCTS — Validate Your PyTorch Backend

PyPI Version License

TorchCTS is a comprehensive conformance test suite that stress-tests operators, autograd, memory, training pipelines, and torch.compile — across every dtype and layout — against CPU references. It is built specifically for backend developers shipping CUDA, MPS, XPU, or custom PrivateUse1 backends.


Why TorchCTS?

  • 🔬 Correctness Over Everything: Every registered ATen operator is tested against CPU references across all dtypes, strides, and layouts. Non-contiguous memory, channels-last, overlapping strides — nothing is skipped unless explicitly configured.
  • 📊 Actionable Scorecards: Self-contained reports with pass/fail per capability, dtype coverage matrices, and regression diffs. Understand what failed and why without needing to rerun.
  • ⚡ Manifest-Driven: Declare your backend capabilities in a single file (manifest.py). The suite automatically skips unsupported features. Pick a template — minimal, inference, training, or complete — and customize from there.

Quick Start (How It Works)

1. Install

Add TorchCTS to your project (requires Python ≥ 3.10 and PyTorch ≥ 2.12):

pip install torchcts

2. Init

Initialize a manifest file in your directory by choosing one of the available templates (complete, training, inference, minimal):

torchcts init

3. Run

Execute the test suite against your targeted backend:

torchcts run --device mps

Note: Run torchcts show-skips for a collection-only dry-run to print which tests will be skipped and why.

4. Report

Generate or update the comprehensive HTML/Markdown scorecard and validation reports from the test execution results:

torchcts report

CLI Reference

TorchCTS provides a CLI with the following subcommands:

  • init: Initialize manifest.py from a template.
  • run: Run the test suite against the target backend.
  • show-skips: Dry-run collection to show which tests will be skipped and why.
  • report: Regenerate scorecards and reports from JSON results.
  • sync-opinfo: Force-rebuild the OpInfo registry cache.
  • check-manifest: Validate manifest.py syntax and schema.

Project Structure & Development

  • The package entry point is torchcts.
  • Manifest templates are located in torchcts/templates/.
  • Test execution results are saved under the ./results/ directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torchcts-0.2.2.tar.gz (108.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torchcts-0.2.2-py3-none-any.whl (191.4 kB view details)

Uploaded Python 3

File details

Details for the file torchcts-0.2.2.tar.gz.

File metadata

  • Download URL: torchcts-0.2.2.tar.gz
  • Upload date:
  • Size: 108.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for torchcts-0.2.2.tar.gz
Algorithm Hash digest
SHA256 dfd651e97a8cb261f99bed3ab80cee5071f4c1553586dbf727375408270aae7b
MD5 68b35ae1323be08a672269d91a50fa6b
BLAKE2b-256 ccd22ee52b8568877030d1b8b62492fa6af749dae9aec5abc364e7b236d60a0b

See more details on using hashes here.

File details

Details for the file torchcts-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: torchcts-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 191.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for torchcts-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04ad2227e71cfec413b37c79808607d6dfc3dba32c8a5773478544824ca21520
MD5 84a00e9da12d1f4ff3865994f1c2adcc
BLAKE2b-256 e695f2bdd36847e0f96350d01c9e11bb9cab54caddfabd76d2fef7f8e9f1b713

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page