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.0.tar.gz (78.8 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.0-py3-none-any.whl (108.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchcts-0.2.0.tar.gz
  • Upload date:
  • Size: 78.8 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.0.tar.gz
Algorithm Hash digest
SHA256 219de888b9da01f093b9268bd1b57d5a77d577c186092588424aa0fe0b5794e3
MD5 deb4483bffd1df060ecdd22fc2472bf6
BLAKE2b-256 1593d7325db52c5fcf6d33ac34b428140a00c02e2d9350b0963a5bce4e6594ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 108.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00adde95e8daa54faa8b38667207f8ec1b5bf944ce5c19ba9f52aa72c1d0e4b1
MD5 333cb05dee9cc95578f477221bbe23e8
BLAKE2b-256 e293e889c7d6193bf27d197e7f9df01e54e17b2102a40d731e65ee36cd94b908

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