flâneur — a map of the web's best reading

State of torch.compile for training (August 2025) : ezyang’s blog

blog.ezyang.com · 3,084 words · saved by 1 readers

The purpose of this post is to sum up, in one place, the state of torch.compile for training as of August 2025. Nothing in here isn't something you might not already know about from elsewhere on the Internet, but we rarely put everything together in one place. The target audience for this document are teams who are evaluating the use of torch.compile for large scale training runs. First, the basics. torch.compile (also known as PT2) is a compiler for PyTorch eager programs for both inference and training workloads. Speedups from 1.5-2x compared to eager code are typical, and torch.compile also makes it possible to do global optimizations for memory (e.g., automatic activation checkpointing) and distributed communications (e.g., async tensor parallelism). The headline functionality of torch.compile is a decorator you can attach to a function to compile it: Here are some non-functional properties of compile which are important to know: For large scale training runs, torch.compile faces s

State of torch.compile for training (August 2025) August 13, 2025 The purpose of this post is to sum up, in one place, the state of torch.compile for training as of August 2025. Nothing in here isn't something you might not already know about from elsewhere on the Internet, but we rarely put everything together in one place. The target audience for this document are teams who are evaluating the use of torch.compile for large scale training runs. First, the basics. torch.compile (also known as PT2) is a compiler for PyTorch eager programs for both inference and training workloads. Speedups from

Explore this link on the map →

saved by

related reading