Fix: `torch.matrix_exp` performance issue (#105225) (#110848)
Fixes #105225
- New implementation for `compute_T18_scale_square` method.
- Always use the highest degree for large batch sizes (size > 1).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/110848
Approved by: https://github.com/lezcano