/tt-debug-tools:tt-assertsfrom tt-debug-tools
Enables three assertion mechanisms for Tenstorrent kernels: lightweight kernel asserts, LLK asserts, and the LLK sanitizer. Use when kernels produce impossible results, tile dimension assumptions break, or runs hang from asserts.
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.
Three independent assertion mechanisms, one decision. They are folded together because turning one on without knowing how it reports wastes the run — and because the reporting paths interact.
| Mechanism | Checks | Enable |
|---|---|---|
| Lightweight kernel asserts | Your own ASSERT(...) in kernel code | TT_METAL_LIGHTWEIGHT_KERNEL_ASSERTS=1 |
| LLK asserts | tt-llk's own assumptions — tile dims, data formats, hardware config, during unpack/math/pack/tilize | TT_METAL_LLK_ASSERTS=1 |
| LLK sanitizer | Deeper tt-llk invariants, by severity | TT_METAL_LLK_SANITIZER=1 |
ASSERT in your kernel to actually stop the run.Not this skill: reading the halted state itself — tt-triage. Printing values
rather than asserting on them — tt-dprint.
TT_METAL_LLK_ASSERTS=1 pytest <test>
Upstream pairs that with TT_METAL_LIGHTWEIGHT_KERNEL_ASSERTS=1. Measured on
Wormhole, the pair overflows the dispatch build under ttnn and adds no detail —
references/llk-asserts.md.
The sanitizer adds six independent severity toggles —
TT_METAL_LLK_SANITIZER_{PEDANTIC,WARN,ERROR,FAULT,INFO,INTERNAL}=1. Each is a
switch, not a threshold, so setting ERROR does not imply FAULT.
Per-family detail, and what each reports where:
references/lightweight.md, references/llk-asserts.md,
references/sanitizer.md.
The instrumented path is a one-liner upstream ships. Source it, do not execute it — it works by exporting into your shell, and it takes two required paths:
cd $TT_METAL_HOME && source python_env/bin/activate
source tools/setup_llk_assert_env.sh assert.txt /tmp/tt_dprint.log
TT_METAL_LLK_ASSERTS=1 pytest <your test> > test_output.txt
That wires a 5-second dispatch timeout to a triage command, so a silent ebreak
becomes three files: the host RuntimeError, the device assert dump, and the
DPRINT log. Mechanism in references/llk-asserts.md.
Nothing is printed at the moment an assert fires. The macro expands to an
if plus a RISC-V ebreak: the core halts and enters debug mode, the host waits
on a command-queue completion that never arrives, and what you see is a hang.
Where the diagnosis comes from depends on which reporter is enabled:
| Enabled alongside | What reports the failure |
|---|---|
| Lightweight asserts | tt-triage.py --run=dump_lightweight_asserts — callstacks, template params, runtime args, locals |
| Watcher | The assertion message on stderr and in watcher.log |
| Neither | Still tt-triage, but with less detail |
The sanitizer is the exception: it prints, prefixed llk::san | <severity> |.
A fired assert is indistinguishable from a hang. Dispatch times out, triage runs, and nothing says "assert" until you look. Any investigation that reaches for a hang workflow should check the asserts it had enabled before blaming the NoC.
Enabling an assert family is not enabling a report. TT_METAL_LLK_ASSERTS=1
on its own gives an ebreak with no runtime message, but triage recovers the
assert expression, callstack, template parameters and locals from the ELF, so
the lightweight-asserts pairing that upstream documents is not needed for
detail. Measured on Wormhole n300 the pairing also overflows the dispatch
build under ttnn. Prefer LLK asserts alone; use watcher only if you want the
message on stderr and in watcher.log. See references/llk-asserts.md.
The sanitizer will not compile on its own. With LLK_SAN_ENABLE set but
neither LLK asserts nor device print enabled, the build stops with a #error.
It is a compile-time dependency, not a silent degradation.
setup_llk_assert_env.sh exports TT_METAL_DEVICE_PRINT=1, which does not
exist. It is not in the EnvVarID list and is ignored; printing is enabled by
the TT_METAL_DPRINT_CORES=all the script also sets. Do not copy that line out
as if it were the switch — see tt-dprint.
The setup script turns DPRINT on for every core, which collides with watcher. DPRINT and watcher share on-chip SRAM. Using watcher as the reporter and the script together silently corrupts both, so choose one reporter.
tt-smi -r is part of the script's timeout command. It resets the device
after dumping. On a shared host that hits every tenant — know it is there before
running it.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/tt-dprintPrint values out of a Tenstorrent kernel — scalars, bfloat16, enums, and circular-buffer tile contents — with DPRINT / DEVICE_PRINT. Use when a kernel produces wrong numbers and you need to see what it actually read or wrote, when you want a checkpoint reached or a loop index, or when a DPRINT log needs interpreting. For a kernel that hangs rather than computes the wrong answer, that is tt-watcher or tt-triage./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.npx claudepluginhub tenstorrent/skills --plugin tt-debug-toolsOther plugins' skills for the same job