← Back to events
ActiveAIRelease

viable/strict/1791014076: [MPS] Reduce strided inputs in place for full reductions (#198646)

What happened

Since #198494 dropped the Strided pass-1 kernel, a full reduction ( dim=None ) over a non-contiguous input materialises a contiguous copy and then runs Flat over it. The copy moves more bytes than the reduction reads, so e.g. x[:, ::2].sum() in fp32 became 2x slower than before the refactor, and max / min / all / any have paid that copy since they moved off MPSGraph. This adds a FlatStrided plan: at::collapse_dims r…

Summary assembled by rule from the sources below

Why it's spreading

Sources