Tools¶
What to reach for when the result is not what you expected.
Four questions, four tools. The order matters — each one is cheaper than the next, and the compiler has usually answered the first before you ask it.
| Question | Tool | Page |
|---|---|---|
| What went wrong, and where? | Error types, log levels, IR dumps | Debugging |
| Is the IR wrong, or the device? | pypto.debug.torch_codegen |
Torch codegen |
| What is on chip, and for how long? | pypto.tools.memory_map |
Memory map |
| Where did the time go? | The L2 swimlane | Performance |
The cheap checks first¶
Two things cost nothing to read, and the compiler has already produced both:
report/perf_hints.log, written on every compile — what the compiler noticed but did not refuse: transfers below the hardware granularity, a matmul it could not tile, a pipeline depth that did not fit. One summary line also goes to stderr.- The error message, when there is one. PyPTO distinguishes a user error from an internal one, and the distinction tells you whether to fix your code or file a bug — see Debugging.
See Also¶
- Precision — the workflow these tools serve when numbers are wrong.
- Performance — the same, when the numbers are right but slow.
- Execution — the compile and dispatch surface being debugged.