Accelerate torch.cholesky() and torch.inverse() for big matrices

Hi,

is there any way to accelerate torch.cholesky() and torch.inverse() for big matrices, e.g. by using multiple CPUs or GPUs?

Here an example:

import torch
import time
start_time=time.time()
matrix=torch.eye(8192)
cholesky_decomp=torch.cholesky(matrix)
matrix_inverted=torch.inverse(cholesky_decomp)
print(time.time()-start_time)

PS: The matrices to invert are in my case upper triangular matrices (result of cholesky decomposition)

Thanks!

Update:

torch.triangular_solve has a better execution time than torch.inverse in this case (triangular matrix)

import torch
import time
start_time=time.time()
matrix=torch.eye(8192)
cholesky_decomp=torch.cholesky(matrix)
matrix_inverted,_=torch.triangular_solve(torch.eye(cholesky_decomp.shape[0]), cholesky_decomp)
print(time.time()-start_time)