← Back to events
ActiveAIRelease

ciflow/trunk/187952: Fix out= variant recompilations for torch.max/min/topk

Photo: PyTorch Releases

What happened

torch.max(x, dim, out=...), torch.min(..., out=...) and torch.topk(..., out=...) recompiled under torch.compile on every new input shape, while the functional variants specialize only once. With the default recompile_limit this also makes the function fall back to eager after 8 recompiles, losing compilation entirely. Root cause: the out overloads aten.max.dim_max, aten.min.dim_min and aten.topk.values had no Python…

Summary assembled by rule from the sources below

Why it's spreading

Sources