The problem can be solved by torch.vmap alongside Python logic for falling back to the standard torch.linalg.solve. However, this solution is inelegant at best, and rather cumbersome as an additional ...