How TorchDynamo Captures Python Execution
A quick video on this minor topic.
Topics covered in this part:
- Why Python is difficult to compile
- Why TorchDynamo doesn't read Python source code
- How Python executes code (Source → Bytecode → CPython)
- What a Python Frame is
- How TorchDynamo hooks into CPython using PEP 523
- How TorchDynamo captures tensor operations during execution
- How those operations become an FX Graph