Skip to main content

Small TTNN readiness check for Tenstorrent systems

Project description

tt-check

tt-check is a small command-line readiness test for a Tenstorrent system with tt-smi and the public ttnn Python package installed.

It performs the following checks:

  1. Resets devices with tt-smi -r.
  2. Collects system information from tt-smi -s --snapshot_no_tty.
  3. Opens a TTNN device.
  4. Runs a tensor-parallel three-weight gated MLP 100 times in both prefill and decode shapes:
    • BF16 activations
    • BFP8 weights
    • 1024 activation width per device shard
    • prefill rows: 1024
    • decode rows: 1
  5. On multi-device systems, replicates activations, column-shards w1/w3, row-shards w2, and all-reduces the output activations across the mesh.
  6. Warms each MLP shape once, captures one dynamic TTNN trace per shape, then executes each trace for the requested run count.
  7. Compares each trace replay against a PyTorch reference with PCC >= 0.99 and requires TTNN output tensors to be identical across all replays.

Install

Run from PyPI with uv:

uvx --python 3.10 tt-check

Or install from a checkout:

uv tool install --python 3.10 .

Or run directly from a checkout:

uv run tt-check

uv uses the PyTorch CPU wheel index for this project; the check only needs Torch for reference math. The project pins a Python version compatible with the current public ttnn wheels.

Pip also works:

python3 -m pip install .

Run

tt-check

The command exits 0 if all checks pass. It exits 1 and writes the failure to stderr otherwise.

Example output:

tt-check: resetting device... ok
tt-check: 1x2 mesh (1x p300a | blackhole)
tt-check: prefill mlp: 100%|██████████| 100/100 [00:00<00:00, 206.20run/s]
tt-check: decode mlp: 100%|██████████| 100/100 [00:00<00:00, 2660.53run/s]
tt-check: passed in 44.9 seconds | prefill pcc 0.99981364 | decode pcc 0.99986366

Useful options:

tt-check --device-id 0 --runs 100 --pcc-threshold 0.99
tt-check --prefill-rows 1024 --decode-rows 1 --activation-width-per-device 1024

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

tt_check-0.1.2.tar.gz (56.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tt_check-0.1.2-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file tt_check-0.1.2.tar.gz.

File metadata

  • Download URL: tt_check-0.1.2.tar.gz
  • Upload date:
  • Size: 56.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for tt_check-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1d8127520b491b2fcbd44fd311d01dbdb18211ca1d4a70566f16d6ba8ab9846f
MD5 11474f2237197f9e0f4e92fe0cc9e90e
BLAKE2b-256 da1da9d175a880b83e8c230dcec72901b773af47fbd333c937415d2ad66506f6

See more details on using hashes here.

File details

Details for the file tt_check-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tt_check-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for tt_check-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec26fe36694e0c5497a70aaa262337c34e28918271ab342917e10a09d26f08cf
MD5 093218f30823a80e4dda4fc2fa356f7b
BLAKE2b-256 576cfb2790a7e1538a011f33e4cbc97ad5ddde6d92faaae052c2f3f138390d7a

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