Open jacarvalho opened 1 year ago
Hi,
Cholespy supports batches of vectors, but for a fixed matrix. The reason is that the amount and structure of computation required to solve the system varies depending on the sparsity pattern of the matrix, so this makes it a poor fit for parallel execution on the GPU.
If you have batches of matrices, chances are that you are not using a sparse representation, so this package is probably not the right one for your application.
I have a batch of sparse matrices that, unfortunately, are not stored as sparse matrices since pytorch still has very poor support of operations for these kinds of matrices. (It would be a lot of work to restructure the code at this point, just for a marginal gain.) One thing I thought of was to construct a block diagonal of the batch of sparse matrices, which would increase memory but hopefully would make it faster to solve with your method than using torch.cholesky_solve.
Hey, First, thanks a lot for the repo! Is there a way to use cholespy with a batch of matrices? If not, what would you suggest as the best approach? Thanks!