Graph breaks and AOT compilation live at different layers, which is why one tracer cannot cover both. Dynamo and AOTInductor lower ATen operators, not Python bytecode; a break exists exactly where the semantics cannot be expressed as ATen ops - data-dependent control flow, arbitrary Python calls, or side effects the tracer cannot prove safe. AOTInductor emits a Python-free artifact, so at runtime there is no interpreter left to execute the resumed bytecode, and aot_compile raises rather than silently changing what the program means. In practice the fix is usually to remove the break instead of compiling it: move the offending region behind a torch.library custom op or a tensor-only formulation so export sees a single graph. torch._dynamo.explain(fn)(*sample_inputs) prints the break reasons and the resulting graph count, which shows whether the break is removable. What is the construct that actually breaks your trace - a data-dependent if, a Python-level call, or an unsupported op?