← 返回事件
持续讨论AI发版

trunk/94705d5841150618c9de1468727580412bc592f8: [MPS] Fix linalg.lstsq on empty inputs (#199694)

发生了什么

On MPS, torch.linalg.lstsq raised IndexError: max(): Expected reduction dim 0 to have non-zero size whenever min(m, n) == 0 . Root cause: the MPS kernel solves the system through an SVD and computes the rank cutoff from the largest singular value, S.max(-1) . An empty matrix has no singular values, and max over an empty dimension has no identity value, so it raises (the same as on CPU). Fix: when min(m, n) == 0 , re…

摘要按规则整理自下方来源原文

为什么在扩散

来源