← Back to events
ActiveAIRelease

trunk/1782e8ec673e736ffda3414fd921f3c1b1b62002: [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