the.ai

Compilers / Foundations

verified

Graph Capture

A compiler cannot optimise what it cannot see. Eager frameworks execute one operation at a time with ordinary control flow in between, so the first job is recovering a graph of what the program does — by tracing an execution, or by rewriting the bytecode as it runs. Everything downstream depends on how much of the program this step captures.

Viz primitive · budget-splitcaptured-ops = 8

captured-ops holds 50% of the budget; rest holds the remaining 50%.

Operations inside the largest captured region against those left running eagerly, in operations. Drag the capture up to watch the compiler get something to work on — nothing downstream applies to the right-hand side.

8

Reviewed by opendroid · 2026-08-18

Origin · not linkable

  • Ansel et al. 2024 — PyTorch 2: Faster Machine Learning Through Dynamic Python Bytecode Transformation and Graph Compilation · ASPLOS 2024 · doi:10.1145/3620665.3640366