You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use torch.compile without calling allow_ops_in_compiled_graph first, torch.compile will break graph on einops functions.
This causes significant slowdown.
In experiments with transformers (see https://github.com/arogozhnikov/einops/issues/250#issuecomment-1508138804 for details) we see that torch.compile equally well optimizes plain pytorch, einops layers and einops functions. But it has to be informed that einops functions are 'well-behaved' and can be included in the graph. That's why you need to call allow_ops_in_compiled_graph first.