-
Notifications
You must be signed in to change notification settings - Fork 27.7k
torch.inverse based on cuSOLVER does not raise error for singular input #46557
Copy link
Copy link
Closed
Labels
module: correctness (silent)issue that returns an incorrect result silentlyissue that returns an incorrect result silentlymodule: cudaRelated to torch.cuda, and CUDA support in generalRelated to torch.cuda, and CUDA support in generalmodule: linear algebraIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmulIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmultriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Metadata
Metadata
Assignees
Labels
module: correctness (silent)issue that returns an incorrect result silentlyissue that returns an incorrect result silentlymodule: cudaRelated to torch.cuda, and CUDA support in generalRelated to torch.cuda, and CUDA support in generalmodule: linear algebraIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmulIssues related to specialized linear algebra operations in PyTorch; includes matrix multiply matmultriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
🐛 Bug
The cuSOLVER path in
torch.inverseseems not to raise an error for non-invertible input.To Reproduce
Single matrix and 2xNxN batched input inversion is based on cuSOLVER
General batched input case is based on MAGMA
Expected behavior
torch.inverseshould raise an error for singular input when input is single matrix or a batch of matrices with batch size less or equal than 2 (cuSOLVER's code path).cc: @xwang233
cc @ngimel @vishwakftw @jianyuh @nikitaved @pearu @mruberry @heitorschueroff