#9949 added batched inverse support, and seems to be facing some issue with large batches (#13276). This seems to be a MAGMA-related issue.
Considering the importance of the inverse operation, I am proposing that we modify batched inverse to use cuBLAS rather than MAGMA. There are functions in cuBLAS that enable batched inverse - getri and getrf. Furthermore, they seem to provide an optimization for small matrices (size less than 32 x 32).
Please let me know your thoughts about this.
cc: @zou3519 @ssnl @soumith