Nested graphs merge 16 Inductor regions into 2 for the same 64 ops

cfregly · x · 2026-10-22

Comparing emitted Inductor code at depth 8, seed 0: without nested graphs it's 16 wrapper regions × 4 ATen ops; with them, 2 regions × 32 ops — both representing the same 64 operations over 1,048,576 FP32 elements. The chart shows how region merging cuts replay launches from 16 to 2 per call.

Related event: Nested CUDA Graphs in PyTorch 2.14 deliver 4.5x steady-state speedup on B200 at 33% cold-start cost(6 posts)→

Original post →

More from Infra

Infra channel →