Say I have a CuSparseCSR matrix “A” and I want to take complete and incomplete cholesky factorizations of it, but crucially leave that factorization on the GPU, how can I do that?
Things I’ve tried:
- CuSparse.jl - deprecated
- CuArrays.jl - possibly deprecated, got this error trying to “add CuArrays” in the package manager
ERROR: Unsatisfiable requirements detected for package CUDAapi [3895d2a7]:
CUDAapi [3895d2a7] log:
├─possible versions are: 0.5.0-4.0.0 or uninstalled
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
- Preconditioners.jl - only for CPU matrices
- cholesky(A) - works but puts the factorization on the CPU
Is there a way to do this?
CUSPARSE etc are now part of CUDA.jl, so just use the CUDA.CUSPARSE
submodule.
For this specific functionality, you’d need to look in the sparse support of CUSOLVER, cuSOLVER. I don’t think the library supports what you’re looking for.
Thanks, I’ll try that. It does seem odd though that Julia would have this incredibly important functionality like a GPU-based cholesky factorization and then get rid of it during updates
Based on your explanation here and this, I would expect to be able to use ic0 when using CUDA.CUSPARSE
, but it says ic0 is undefined. Where did this functionality end up? I am also OK with a full factorization, my matrix is block diagonal anyways
I’m not sure what you’re suggesting here. If you do a quick search on ic0
in the CUDA.jl repository you can find many functions. Nothing got deleted from the CUSPARSE package/module, but I’m not sure why you’re expecting the README instructions from a 5 year old package to work on a current version of CUDA.jl’s CUSPARSE
module.
I don’t expect it to work as is, but I did expect there to be some way to do it, especially if you’re saying that nothing got deleted from the module (and it was possible 5 years ago). I’m specifically looking for complete or incomplete sparse csr gpu-based cholesky factorization (which you said in your first message is impossible in Julia, but definitely used to be possible)
You seem to have misunderstood my message. I’m not familiar with functionality you’re looking for, so I pointed you towards the CUSOLVER documentation. As you know what you are looking for, I recommend you take a look at the CUSOLVER/CUSPARSE docs to figure out which API calls you need. Every CUDA API call is available in CUDA.jl, so it I can guarantee you we did not remove functionality (with the sole exception for APIs that are have been by NVIDIA). Whether there’s high-level functionality wrapping those APIs is another question.
1 Like