Developer Documentation¶
How PyPTO is built: the IR, the pass pipeline, code generation, and the infrastructure around them.
This is documentation for people working on the compiler. If you are writing PyPTO programs, start with the User Manual.
Sub-chapters¶
| Chapter | What it covers |
|---|---|
| IR | Node hierarchy, type system, operators, builder, parser, serialization, structural comparison |
| Passes | The pass framework and every pass in the default pipeline, numbered in execution order |
| Language | The Python DSL syntax specification and external C++ kernel integration |
| Code Generation | Lowering IR to PTO-ISA dialect MLIR and to orchestration C++ |
| Backend | Per-architecture dispatch through BackendHandler |
| Debug | Lowering IR to an executable PyTorch script for numerical validation |
Top-level topics¶
| Page | What it covers |
|---|---|
| PTO Project Ecosystem | The multi-repo toolchain — PyPTO, PTOAS, pto-isa, simpler, pypto-lib — and how they fit together |
| Compile Profiling | Built-in wall-clock timing of the compilation pipeline |
| Error Handling | CHECK vs INTERNAL_CHECK, PyPTO exception types, IR source locations in failures |
| Logging | The two independent logging subsystems and which one a message came from |
| Runtime DFX Flags | The five runtime diagnostic sub-features exposed through RunConfig |
| Simulator Trace Cleaning | Converting MindStudio Insight binary dumps into readable traces |
| Per-Task Ring Sizing | The three ring-size overrides on RunConfig and when to tune them |
| Persistent L3 execution | Reusing one worker across prepared distributed programs |
| Memory Map | Rendering a pass dump into an interactive HTML map of on-chip memory |
| Distributed Operators | The N6 distributed op family — typed DSL access to collectives and primitives |
| PTOAS Op Status Matrix | Which public and compatibility PTOAS ops the compiler currently emits |
See Also¶
- PTO ISA reference — the hardware model the backend targets.
- Runtime documentation — the scheduler that executes compiled programs.