Files
tinygrad/extra/viz
qazal c7a4dbf918 viz: get program binary from the UOp (#14787)
* viz: get program binary from the UOp

* remove that

* less

* rename View Program to View Source

* two words

* fix
2026-02-16 15:46:58 +09:00
..

A command line tool for exploring the VIZ trace.

After running with VIZ=-1, use `PYTHONPATH=. extra/viz/cli.py` to explore the saved trace files.

## Inspect runtime profiling

Use `PYTHONPATH=. extra/viz/cli.py --profile` to list all traced devices.

List top slowest kernels on a device: `--profile --device "AMD"`
List samples of a kernel on a device: `--profile --device "AMD" --kernel E_3`

## Inspect codegen and PatternMatcher

Use `PYTHONPATH=. extra/viz/cli.py --rewrites` to list all traced kernels.

List all codegen steps for a kernel: `--rewrites --kernel E_3`
Get source code: `--rewrites --kernel E_3 --select "View Source"`
Inspect a graph rewrite: `--rewrites --kernel E_3 --select "initial symbolic"`