MAGPY: Compiling Eager Mode DNN Programs by Monitoring Execution States
summary
MAGPY monitors the Python interpreter’s execution states to record a reference graph of object references and versions, generates guards and small mo (mock) functions to reproduce side effects, and emits operator graphs that feed existing graph-level compilers. It converts 93.40% of 1191 programs into complete operator graphs, claims up to 2.88× speedup (1.55× on average), uses annotations for C-backed ops, adds only modest monitoring overhead, and enables compilation with a single magpy.compile call.
AI-written summary · about
chapters (10)
- 0:00MAGPY system introduction
- 1:01Eager mode DNN challenges
- 3:50Just-in-time with guard functions
- 5:13Trace vs compiler limits
- 7:01Execution state monitoring solution
- 11:18Reference graph tracking
- 15:12Generating records from graphs
- 16:38Dynamic scenarios handling
- 17:00MAGPY performance evaluation
- 18:55Conclusion and future
related talks
12mCoding Agents for Compiler Construction: Beyond the...
15mIdentifying and Analyzing Pitfalls in GNN Systems
24mAdvancements in High-Performance AI/ML through PyTorch's Python Compiler
01h 33mPower up your work with compiling and profiling
47mThe State of the Art for Probabilistic Programming
17mInside a PyPy JIT: is that even legal?
50mExploring CPython's bytecode
21mThe New Vision of Compiler-Accelerated
