Sorry!
Note: there will be a native matrix exponential in PyTorch 1.7, which is in pre-release state I think. Once it's released, we could dispatch expm to either our or their implementation dependeing on the pytorch version. This should give a very decent speedup.
Originally posted by @balbasty in #21 (comment)