/tt-debug-tools:tt-dprintfrom tt-debug-tools
Prints values from Tenstorrent kernels using DPRINT/DEVICE_PRINT for debugging wrong computations, checking branch/loop execution, and interpreting DPRINT logs.
Ships in tt-debug-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Kernels call DPRINT, a host-side server polls the per-RISC buffers and writes
what it finds to the terminal or a file. The device side is API calls compiled
into the kernel; the host side is environment variables deciding which cores are
read and where the text goes.
DPRINT is a thin alias for DEVICE_PRINT and takes an fmt-style format
string. The stream form DPRINT << x << ENDL() has been removed — the
operators and BF16/F32/U32/HEX helpers are deprecated stubs, so anything
written in that style is stale.
Not this skill: nothing prints and the run hangs — tt-watcher.
TT_METAL_DPRINT_CORES is load-bearing twice over: it selects the cores the host
reads, and whether it is defined at all decides whether printing is compiled
into the kernel. Coordinates are logical — worker and ethernet both start at
(0,0).
TT_METAL_DPRINT_CORES=0,0 ./your_program # also (x,y),(x,y) | (x,y)-(x,y) | all | worker | dispatch
| Variable | Effect |
|---|---|
TT_METAL_DPRINT_CORES | Required. Worker cores to read, in the forms above. |
TT_METAL_DPRINT_ETH_CORES | Same forms, for ethernet cores. |
TT_METAL_DPRINT_RISCVS | Subset of BR,NC,TR0,TR1,TR2,TR*,ER0,ER1,ER*. Default all. |
TT_METAL_DPRINT_FILE | Write to a file instead of the screen. |
TT_METAL_DPRINT_ONE_FILE_PER_RISC | One file per RISC under generated/dprint/. |
TT_METAL_DPRINT_PREPEND_DEVICE_CORE_RISC | On by default; prefixes each line with device, core and RISC. |
Device selection is a mutually exclusive trio — TT_METAL_DPRINT_CHIPS, _NODES, _MESH_COORDS. Full forms and defaults: references/env.md.
In-kernel, after #include "api/debug/dprint.h": DPRINT plus the per-RISC
variants DPRINT_MATH, DPRINT_PACK, DPRINT_UNPACK, DPRINT_DATA0,
DPRINT_DATA1. Types, format specs, CTSTR and enums:
references/types-and-format.md. Tiles out of a circular buffer:
references/tile-printing.md.
Any program whose kernels print, with the cores named:
TT_METAL_DPRINT_CORES=all build/programming_examples/metal_example_noc_tile_transfer
Upstream's device_print/ gtest suite covers every scalar type, the format
specifiers, tile printing and concurrent RISCs — but its fixture routes DPRINT to
a memfd to assert on it, so running that binary shows gtest output and no prints.
Read those cases for the API; run an example to see the tool work.
To the terminal by default, one line per print, prefixed unless you turn the prefix off:
0:1-7:BR: dispatch_11: start
0:7-7:BR: REALTIME BRISC: kernel started
<device>:<x>-<y>:<RISC>: then the formatted text — the doc page writes the
coordinate as (x, y), but hardware emits x-y. With
_ONE_FILE_PER_RISC the prefix is disabled automatically and the files land
under generated/dprint/, not at TT_METAL_DPRINT_FILE.
Every DPRINT must end with \n. The host server splits each per-RISC
stream on newlines and holds anything else in an intermediate buffer. A trailing
partial line is not flushed when the device closes — it is lost. When prints
do not appear at all, check this before anything else; it is the most common
cause by upstream's own account.
TT_METAL_DEVICE_PRINT=1 does not exist. Prior-art agent docs prescribe it.
The only TT_METAL_DEVICE_PRINT_* variables are the three dispatch-timing ones,
which have nothing to do with printing. Enabling is TT_METAL_DPRINT_CORES.
It cannot share a run with watcher or the device profiler. All three use the same on-chip SRAM and enabling more than one silently corrupts the debug data. Unset the others.
A runtime const char* prints as an address, because the host cannot read
device memory — wrap literals in CTSTR(). Relatedly, the MATH RISC cannot reach
circular buffers, so DPRINT_MATH with a TSLICE is invalid rather than empty.
Tile prints sample the pointer, not the tile. A CB read has to sit between
cb_wait_front and cb_pop_front, a write between cb_reserve_back and
cb_push_back. Outside that window the pointer has moved and the values belong
to another tile.
_ONE_FILE_PER_RISC overrides TT_METAL_DPRINT_FILE. Setting both is not an
error and the file you named stays empty.
TT_METAL_DPRINT_CORES=all includes the dispatch cores, whose firmware
prints heavily on its own — dispatch_11: start, CQ_DISPATCH_SET_*,
prefetcher_11. Your kernel's lines arrive interleaved with all of it. Name the
cores you care about instead, or narrow with TT_METAL_DPRINT_RISCVS.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub tenstorrent/skills --plugin tt-debug-tools9 skills in this plugin
/tt-assertsTurn on assertion checking inside Tenstorrent kernels — lightweight kernel asserts, LLK asserts in the compute library, and the LLK sanitizer — and read back what fired. Use when a kernel produces impossible results, when you suspect a broken assumption about tile dimensions or data formats, or when a run hangs and you want to know whether an assert caused it. A fired assert halts the core and looks exactly like a hang from outside./tt-exalensRead and write one address, register or core on a Tenstorrent device with tt-exalens — L1 and DRAM reads, RISC-V registers and GPRs, tensix state, NoC registers, callstacks from an ELF, memory search, and a GDB server for stepping a RISC. Use for a specific question about a specific location, when tt-triage's fixed script set does not ask it, or when you need JTAG or GDB. For the whole-device sweep, that is tt-triage./tt-inspectorRead what the Metal host runtime thinks is happening on a Tenstorrent device — which programs and mesh workloads exist, which kernels were built, tensor specs, mesh buffers and sockets — over the Inspector RPC or from its serialized logs. Use when device-side state needs host-side names attached to it, when a tt-triage report comes back with dispatcher-aware sections skipped, or when you need to know what Inspector recorded about a run that has ended./tt-noc-dumpCollect NoC traces from a Tenstorrent device to find kernel data-movement mistakes — most usefully a missing noc_async_write_barrier. Use when a kernel's NoC transfers are suspect, when output is corrupt in a way that points at unflushed writes, or when asked to check barrier discipline. Not for hangs parked on a barrier (that is tt-triage)./tt-profilerMeasure where device time goes on a Tenstorrent part — per-zone kernel timings from the Device Program Profiler, and host-plus-device traces through Tracy. Use when a kernel or op is slower than expected and you need cycles attributed to named scopes, when you want a profile_log_device.csv read, or when you need to instrument a kernel with DeviceZoneScopedN./tt-triageRead the state of a hung or stuck Tenstorrent device with tt-triage — which op was running, where each RISC is parked, whether the on-device code and mailboxes are intact, whether NoC, Ethernet and ARC are healthy. Use when a job hangs, a test stops making progress, an assert has fired, or a triage report needs interpreting. Attach to the live process; do not kill it first.Other plugins' skills for the same job