/tt-debug-tools:tt-ttnn-flagsfrom tt-debug-tools
Activates TTNN host-side debug modes: graph capture to identify hanging ops, per-op golden comparison to find the first diverging op, and buffer/tensor reports. Use when a TTNN model hangs or produces wrong output.
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.
Host-side, TTNN-level, and entirely off by default. Two answer adjacent questions:
function_start with
no function_end.Both are gated behind the same switch, and that switch defaults to the wrong value for debugging.
Not this skill: device-side state — tt-triage, tt-watcher. Kernel-level
values — tt-dprint.
enable_fast_runtime_mode is True by default. At the pinned commit,
FastOperation._requires_slow_runtime (ttnn/ttnn/decorators.py) routes each
op through the slow runtime when either enable_fast_runtime_mode is
false or enable_comparison_mode is true or enable_logging is true.
So the two features that need to run inside every op — comparison and
logging — force slow runtime on their own. Everything else in the table below
is silently inert while fast-runtime stays on: no error, no output. Set
enable_fast_runtime_mode: false explicitly to remove the ambiguity, and set
it in every report scenario since enable_graph_report depends on
enable_logging and enable_detailed_* depends on the reports.
TTNN_CONFIG_OVERRIDES='{"enable_fast_runtime_mode": false, "enable_comparison_mode": true}' pytest <test>
| Key | Default | Effect | Forces slow runtime on its own |
|---|---|---|---|
enable_fast_runtime_mode | true | Set false to route every op through slow runtime. | — |
enable_comparison_mode | false | Compare each op against a golden reference. | yes |
enable_logging | false | Per-op logging; the base for the reports. | yes |
comparison_mode_pcc | 0.9999 | The threshold a comparison must meet. | no |
comparison_mode_should_raise_exception | false | Stop at the first failing op rather than logging it. | no |
enable_graph_report | false | Emit the captured graph. Needs enable_logging too, which forces slow runtime. | no (via logging) |
enable_graph_python_stack_traces | false | Python stack traces on graph nodes. | no |
enable_detailed_buffer_report | false | Per-op buffer detail. | no |
enable_detailed_tensor_report | false | Per-op tensor detail. | no |
throw_exception_on_fallback | false | Fail rather than silently falling back to a host implementation. | no |
root_report_path | generated/ttnn/reports | Where reports land. | no |
report_name | None | Names this report. | no |
Two ways in — TTNN_CONFIG_OVERRIDES as a JSON string, or TTNN_CONFIG_PATH
pointing at a JSON file. Plus ttnn.manage_config(name, value) as a context
manager to scope a change. Details and the graph API:
references/config.md, references/graph-capture.md.
Comparison mode against any op with a golden reference:
TTNN_CONFIG_OVERRIDES='{"enable_fast_runtime_mode": false, "enable_comparison_mode": true, "comparison_mode_should_raise_exception": true}' \
pytest <a ttnn op test>
Reports under root_report_path, default generated/ttnn/reports, named by
report_name. Comparison mode logs a PCC per op and, with
comparison_mode_should_raise_exception, raises at the first op below
comparison_mode_pcc.
Graph capture returns a structure you query rather than a file you read —
ttnn.graph.extract_calltrace, extract_peak_L1_memory_usage,
extract_operation_durations and friends. The hang signature is an
incomplete_operation: a function_start with no matching function_end.
Fast runtime mode is on by default and silences everything here. This is the
single fact that matters. A run with enable_comparison_mode: true and fast
runtime mode left alone produces no comparisons and no complaint.
An unknown key behaves differently by route. From TTNN_CONFIG_OVERRIDES it
raises ValueError: Unknown configuration key. From a TTNN_CONFIG_PATH file it
only warns and carries on — so a typo in the file is a mode that never turns
on.
TTNN_CONFIG_PATH writes the file if it does not exist. Pointing at a
missing path creates it populated with defaults rather than failing, which then
looks like a config you wrote.
Comparison mode does not stop by default. comparison_mode_should_raise_exception
is false, so a diverging op is logged and the run continues to produce a wrong
answer. For "which op first" you want it true.
PCC 0.9999 is the threshold, not a target. It is stricter than many ops need and looser than some do. A failure at this default is a signal to look, not proof of a bug.
These cost real time. Per-op comparison runs a golden implementation for every op. Do not read timings from a run with these on, and do not leave them in a config file you keep using.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ttnn, debug-modes, graph-capture, golden-comparison, host-side-debugging
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-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-exalensOther plugins' skills for the same job