Torch's potri function expects a call to potrf first:
https://github.com/torch/torch7/blob/master/doc/maths.md#torchpotrires-chol--u-or-l-
However, we call potrf internally in cutorch's implementation of potri:
https://github.com/torch/cutorch/blob/master/lib/THC/THCTensorMathMagma.cu#L459
Thus we cannot convert a tensor to its corresponding cuda type and expect the same behavior from subsequent API calls.