torch.compile Practice and Optimization in Different Scenarios
summary
Practical fixes and passes extend torch.compile (torch.dynamo + autograd + inductor) to real workloads: DeepSpeed + gradient checkpointing compatibility is patched and upstreamed to Hugging Face transformers/accelerate; a pattern-match rewrite for Alibi+mask yields 30% speedup over default fused attention and 260% faster than eager; a constant-fold mask->None unlocks flash attention; padding alignment changes cut recompiles from 7 to 3; work also surfaces startup, dynamic-shape and kernel-caching tradeoffs and ongoing async compile experiments.
AI-written summary · about
chapters (7)
- 0:00Introduction to torch.compile
- 1:44Real-world hurdles
- 3:12Ecosystem integration
- 6:02Optimizing kernels
- 9:48Managing runtime overhead
- 11:31Future challenges
- 14:11Conclusion
related talks
15mPyTorch 2.0: Unlocking the Power of Deep Learning with the Torch Compile API
24mAdvancements in High-Performance AI/ML through PyTorch's Python Compiler
06m⚡ Speedy but Sturdy PyTorch Optimizers
36mHigh-Performance Distributed Tensorflow
20mGetting Started with Pytorch 2.0 and Hugging Face Transformers
31mPyTorch 2.1 - New Developments
19mIncreasing the Impact of AI Through Better Software (Pytorch Updates)
43mExploring Deep Learning Framework PyTorch
