torch.compile skips guards for FSDP, reducing MFU in dynamic shape training

SeunghyunSEO7 · x · 2026-08-24

User reports that torch.compile automatically skips guard installation for FSDP-wrapped modules (behavior persisting in FSDP2). In dynamic shape=True setups like Flux.2 Klein multi-resolution training, this generates excessive symbolic arguments, hindering fusion of element-wise operations like layernorm and rope, and significantly reducing MFU.

Related event: torch.compile with FSDP Dynamic Shapes Degrades MFU(3 posts)→

Original post →

More from Infra

Infra channel →