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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tt_check-0.1.1.tar.gz
Algorithm Hash digest
SHA256 33d6056e8b200363b07e54f44fa0fd2b7f908cd15b27a3e406cf081b5134b5e3
MD5 333ac6e7e98a7a10d3330d23b5212276
BLAKE2b-256 94c0ff830691d074c5251cb8466e59f44aae63e8e79d7f1dc96eaf88b113b232

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tt_check-0.1.1-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.18

File hashes

Hashes for tt_check-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 14a2cac58aab954890acdffb955e55f679e4e7f8adcc0a8208ce5fca36f28e64
MD5 6da94345057a01230bd22e1b654fbdba
BLAKE2b-256 d646ec7e5bb57a440e787fb95bcffe594cd77b07d700c0fbda0fe84d9b6fec41

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