Test Inventory
These numbers describe the current TorchCTS package. They are not backend pass or fail results.
Focused By Design
This inventory is organized around backend-relevant PyTorch behavior. It combines PyTorch OpInfo-sourced tests, generated dispatcher cases, hand-authored backend semantics, harness self-checks, and targeted path-shape cases.
It is not intended to reproduce every framework, frontend, distributed, packaging, or internal implementation test in the full PyTorch project.
The inventory is small enough to support repeated backend development and CI runs. Coverage audits keep the smaller scope accountable by showing covered, pending, excluded, and unknown dispatcher surfaces.
Current Shape
The July 20, 2026 stats run collected 19,395 pytest nodes at semantic level 8.
Test Breakdown
PyTorch OpInfo-derived operator tests means TorchCTS builds tests from PyTorch's own OpInfo operator metadata and sample inputs. That gives TorchCTS broad operator coverage without pretending those cases were hand-written one by one.
Suite Counts
Top-level test kinds: PyTorch OpInfo-derived operator tests 13,070, generated 4,258, hand-authored 2,053, and 14 harness self-checks.
| Suite | Collected Nodes |
|---|---|
| PyTorch OpInfo-derived operator tests | 13,070 |
| generated | 4,258 |
| operators | 1,193 |
| compiler | 144 |
| dtypes | 135 |
| workloads | 255 |
| strides | 87 |
| autograd | 78 |
| training | 56 |
| stress | 30 |
| rng | 28 |
| memory | 24 |
| Harness self-checks | 14 |
| device_api | 12 |
| errors | 5 |
| multi_device | 3 |
| serialization | 3 |
Generated File Counts
| Generated Test File | Collected Nodes |
|---|---|
| test_foreach_fused.py | 1,969 |
| test_out_variants.py | 898 |
| test_functional_variants.py | 578 |
| test_inplace_variants.py | 346 |
| test_oracle_surfaces.py | 273 |
| test_view_aliases.py | 100 |
| test_autograd_backward_variants.py | 38 |
| test_layout_storage_variants.py | 24 |
| test_factories.py | 20 |
| test_rng_variants.py | 12 |
Path-shape tests are tracked separately because they come from a curated corpus instead of the generated dispatcher suite.
| Path-Shape Test File | Collected Nodes |
|---|---|
| torchcts/operators/test_operator_path_shapes.py | 715 |
| torchcts/workloads/test_workload_path_shapes.py | 135 |
Semantic Level Inventory
Semantic levels describe run depth. Higher levels do not replace lower levels. They add more behavior, more resource pressure, or more backend integration surface.
Core primitives for continuous backend validation: basic tensor creation, simple unary and binary operations, basic dtype behavior, and the smallest generated dispatcher cases.
Normal operator correctness: broad PyTorch OpInfo-derived forward and backward cases, common tensor-producing operators, common tensor-consuming operators, and expected error behavior.
Mainstream framework semantics: mutation, aliasing, out= behavior, view behavior, RNG behavior, metadata behavior, and generated functional/inplace/out variants.
Production bring-up depth: training-adjacent coverage, autograd-adjacent behavior, backend-family cases, and broader generated variant coverage that starts to expose real backend gaps.
Advanced tensor behavior: numeric edge cases, layout and storage behavior, sparse and nested coverage, noncontiguous tensors, channels-last paths, stride-sensitive cases, and most standard-tier path-shape rows.
Backend integration: compiler paths, device API, streams and events, allocator behavior, guarded allocation, quantization-adjacent plumbing, and low-level implementation surfaces.
Heavy integration: realistic workloads, model-shaped tests, multi-device behavior, and selected path-shape rows that are more expensive or more dependent on the target hardware.
Release-depth validation: stress, adversarial behavior, large tensor pressure, rapid allocation patterns, edge numerics, and cases intended for final validation rather than every local edit.
| Level | Nodes | Executable | Surfaces | Gen'd | ||
|---|---|---|---|---|---|---|
| 1 | 436 | 435 | 1 | 0 | 418 | 418 |
| 2 | 13,789 | 13,655 | 134 | 0 | 964 | 143 |
| 3 | 1,085 | 741 | 341 | 3 | 1,049 | 711 |
| 4 | 2,405 | 2,174 | 231 | 0 | 382 | 273 |
| 5 | 1,248 | 1,196 | 52 | 0 | 376 | 343 |
| 6 | 199 | 171 | 28 | 0 | 19 | 19 |
| 7 | 203 | 179 | 24 | 0 | 6 | 0 |
| 8 | 30 | 27 | 3 | 0 | 0 | 0 |
Levels 7 and 8 live primarily in hand-authored workload, multi-device, and stress tests, so generated-dispatcher counts can be zero while pytest nodes are nonzero.
Path-Shape Corpus
The path-shape corpus tracks reviewed cases for shapes, layouts, strides, masks, model roles, dtypes, resource tiers, and cost classes. It is built to hit backend branch points, not to enumerate every possible tensor size.
By corpus level, TorchCTS tracks 890 level 5 rows, 80 level 7 rows, and 350 level 8 rows. The default pytest collection currently includes 770 level 5 rows and 80 level 7 rows.
| Family | Total Rows | Default Rows |
|---|---|---|
| matmul | 210 | 140 |
| attention | 150 | 80 |
| convolution | 140 | 90 |
| reduction | 120 | 85 |
| indexing | 110 | 80 |
| spatial | 100 | 65 |
| model_patterns | 95 | 55 |
| normalization | 90 | 65 |
| fft | 85 | 45 |
| sorting | 80 | 55 |
| broadcasting | 75 | 55 |
| linear_algebra | 65 | 35 |