Hugging Face’s Post

Hugging Face reposted this

View profile for Sayak Paul

ML @ Hugging Face 🤗

Users of `torch.compile`. Some small performance tips: 1. Default to `fullgraph=True` to catch graph breaks as early as possible. 2. Check for recompilation triggers. Put your code under `torch._dynamo.config.patch(error_on_recompile=True)` context. 3. Use regional compilation almost always to cut down cold-start timing significantly. Graph-breaks and frequent recompilations can easily come in the way of performance. Eliminate them as much as possible. In Diffusers, we have a dedicated test suite for checking these things. Reference: https://lnkd.in/gK3DqscU

Daniel Svonava

Vector Compute @ Superlinked | xYouTube

1d

How do you balance fullgraph=True for catching breaks early with the risk of slowing down development feedback loops?

To view or add a comment, sign in

Explore topics