Skip to main content

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.

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.3.tar.gz (111.2 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.3-py3-none-any.whl (194.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchcts-0.2.3.tar.gz
  • Upload date:
  • Size: 111.2 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.3.tar.gz
Algorithm Hash digest
SHA256 c23259753b974955c0aca080680bd9c5580898439b2cd422444b75d2fa6d71b0
MD5 537c59123190a45ab4a0194fcf72627b
BLAKE2b-256 72a4e9ef6ed973035d26b91cf66f7dd87b0ee4d6d47abe6e94bb9c87383d3516

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcts-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 194.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 783ee50ae300564c9d586c64abc5a829307f3d25159daf0bb6c9ccb61c22ca21
MD5 fbf5c178723e13bdc10b2717fc6dd268
BLAKE2b-256 60d4c24b76f44c87dc37e855e955ff355e10f5ea1121ef8725b0115079e5330c

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