torch.compile does not support true pre-compilation without running the Python program
7/10 HighUsers on expensive clusters want to pre-compile models to avoid paying compilation costs at runtime, but torch.compile requires actually executing the Python program to discover compilable regions, making straightforward ahead-of-time compilation impossible. This is compounded by graph breaks and unknown input metadata.
Collection History
Whenever someone realizes that torch.compile compilation is taking a substantial amount of time on expensive cluster machines, the first thing they ask is, 'Why don't we just compile it in advance?' To support precompiling the torch.compile API exactly as is not so easy; unlike a traditional compiler which gets the source program directly as input, users of torch.compile must actually run their Python program to hit the regions of code that are intended to be compiled.