forked from tinygrad/tinygrad
A command line tool for exploring the VIZ trace. 1. Set VIZ to -1 to save the trace. 2. Use `extra/viz/cli.py` to inspect the trace files. ## Inspect runtime profiling Use `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 `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"`