A comprehensive PyTorch backend validation and benchmarking suite
Project description
TorchCTS — Validate Your PyTorch Backend
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: Initializemanifest.pyfrom 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: Validatemanifest.pysyntax 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torchcts-0.1.0.tar.gz.
File metadata
- Download URL: torchcts-0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48a02640848395e0d15fbda16356fe4cfe49875397351ba4f25871e32af6c782
|
|
| MD5 |
93b676751ce39ca40b8b000eca95706f
|
|
| BLAKE2b-256 |
23093973370b6a2772ee2c97788a73cc0e21d7765df7dd539921b47f440095a2
|
File details
Details for the file torchcts-0.1.0-py3-none-any.whl.
File metadata
- Download URL: torchcts-0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
002acd9101ddd3751c28e1e8330c75c7f107d2148458692ca5d12e1f6b301b7c
|
|
| MD5 |
ffdac879244a124dab331f23204e4a53
|
|
| BLAKE2b-256 |
9898aac62348bbcbeea992b04d801b50aba4e2d8b3a4765ceed176a9bea0cb95
|