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.1.tar.gz (86.7 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.1-py3-none-any.whl (169.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: torchcts-0.2.1.tar.gz
  • Upload date:
  • Size: 86.7 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.1.tar.gz
Algorithm Hash digest
SHA256 98b19607e3887c986266fdff30e8dbae96b33ed98eb706fee9de5852e8f365ae
MD5 539f5bbb117c81be2848c8559b657a3b
BLAKE2b-256 6d64cd4b3e128ce2f9d517e8e6611ddd3ab81dafa13adc67bc877553e2efc5b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: torchcts-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 169.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45075da61671dd784e3cbece9878c3898029b75ef1bd3c8e93d6d94b179c3049
MD5 2c5b1ebf183d8b986b796f36c570ea1c
BLAKE2b-256 80051c7c5962512f6532b455d246d8e2fc4e2e658ffec253512e28f66a4707e9

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