torch.linalg.lstsq requires S_q to not be rank-deficient for some backends/drivers to behave reliably (the default driver can be sensitive to this). <!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->
torch.linalg.lstsq requires S_q to not be rank-deficient for some backends/drivers to behave reliably (the default driver can be sensitive to this).