← Back to events
ActiveAIRelease

viable/strict/1788025796: [MPS] Fix linear backward SIGABRT with a 1-D weight (#187989)

Photo: PyTorch Releases

What happened

Fixes #187988 What linear() accepts a 1-D weight (shape [in_features] ): it contracts and drops the last input dimension. mps_linear (forward) already handles this by unsqueezing the weight to [1, in_features] . The backward pass did not mirror that, so it lowered grad_input and grad_weight to invalid rank-1 × rank-1 matmuls and aborted the process during MPSGraph verification: 'mps.matmul' op contracting dimensions…

Summary assembled by rule from the sources below

Why it's spreading

Sources