trunk/94705d5841150618c9de1468727580412bc592f8: [MPS] Fix linalg.lstsq on empty inputs (#199694)
- PyTorch 近 90 天出现 1882 次
- PyTorch 近 90 天第 1858 次发版
- 上一次:同一天稍早 · trunk/8161f9858a7c86698d59776ff0c75930f3423d1f: Move CI docker images off Python 3.10 (#199535)
发生了什么
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…
摘要按规则整理自下方来源原文