Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support CUDSS.jl #295

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

amontoison
Copy link
Member

@geoffroyleconte
I started to support CUDSS.jl in RipQP.jl but I have some difficulties to understand how to implement a K2CUDSSParams.

The KKT matrix must be stored as CuSparseMatrixCSR{T, Cint} and I don't know yet if we need to implement some GPU kernels to update the blocks.

I also don't know if we need to re-implement functions like init_pad! and solver_name.

cc @dpo

@amontoison amontoison marked this pull request as draft August 3, 2024 03:54
@geoffroyleconte
Copy link
Member

Hello @amontoison !
If you want to add another solver on CPU you only have to implement these structures and functions:
https://jso.dev/RipQP.jl/stable/switch_solv/#Advanced:-write-your-own-solver
However for GPUs, there may be additionnal functions to re-implement (dispatch for CUDA arrays) (see gpu_utils.jl file). You may also need to add additional functions, if you see errors messages with missing functions and scalar indexing, don't hesitate to send me the error message and I can try to redirect you to the part that needs to be modified.

The init_pad! function was used to separate memory allocation and initialization (for exemple separate vector allocations and computation of the symbolic analysis and first numerical factorization) but is not used (this was I feature I wanted to add for in-place solves of QPs but I did not have the time to implement it). You can see that it just returns the PreallocatedData object by default here:

function init_pad!(pad::PreallocatedData)

and I don't think that I specialized this functions for any of the subsolvers I implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants