>_ ttperf

TT-Metal kernel profiler · CLI

Profile a Tenstorrent kernel
in one command.

ttperf runs TT-Metal's profiler, parses the result CSV, and prints the total device kernel duration — the one number you actually came for.

View on PyPI
  • 263 operations
  • 1 command
  • Python 3.8+
0 ns

The measurement, not the ritual

Without ttperf

  1. Locate tools/tracy/profile_this.py
  2. Hand-write the pytest invocation
  3. Wait, then hunt for the generated CSV path in the logs
  4. Open the CSV, find the right column
  5. Sum DEVICE KERNEL DURATION by hand

With ttperf

$ ttperf add

Profile name, CSV discovery, parsing, and the total — handled. You read one number.

What it does

Profile by name

ttperf relu maps an operation to its TT-Metal test and runs it. No path spelunking.

Real CSV parsing

Finds the profiler's output CSV, verifies it exists, and sums the device kernel duration with pandas.

Shape it yourself

Override tensor --shape, --dtype, --layout, and DRAM/L1 memory per run.

Config files

Set defaults in ~/.ttperf.yaml or ./.ttperf.yaml. CLI flags always win.

CI-friendly

--quiet drops decorative output; --verbose turns on debug logging. Exit codes behave.

Find the path itself

Resolves your tt-metal root from PYTHONPATH or by walking up the working directory.

parse → run → read

The pipeline

  1. parseRead args and config; figure out profile name + test path or operation.
  2. mapResolve an operation name to its TestEltwiseOperations method.
  3. runInvoke TT-Metal's tracy profiler over pytest, streaming output.
  4. extractScrape the generated CSV path from the log and confirm it's on disk.
  5. sumLoad the CSV and total DEVICE KERNEL DURATION [ns].
  6. reportPrint the summary; optionally copy the CSV to --output-dir.

Every supported operation

Pulled from the package's own test suite — the same list as ttperf --list-ops. Click any chip to copy its command.

ship it

Install

From PyPI

First run

Requires a Tenstorrent TT-Metal environment, Python 3.8+, and pytest. PyYAML is optional, for config files.