Skip to content

Add VecchiaKKT.jl#35

Closed
CalebDerrickson wants to merge 0 commit intomasterfrom
dev
Closed

Add VecchiaKKT.jl#35
CalebDerrickson wants to merge 0 commit intomasterfrom
dev

Conversation

@CalebDerrickson
Copy link
Collaborator

See if this passes tests

@CalebDerrickson
Copy link
Collaborator Author

I'll do more testing...

@CalebDerrickson
Copy link
Collaborator Author

@amontoison

if iVecchiaMLE.mode == 1 # CPU
output = madnlp(model, print_level=MadNLP_Print_Level(iVecchiaMLE.MadNLP_print_level))
elseif iVecchiaMLE.mode == 2 # GPU
output = madnlp(model, print_level=MadNLP_Print_Level(iVecchiaMLE.MadNLP_print_level), kkt_system=VecchiaKKTSystem)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the VecchiaKKTSystem is only on GPU?
We should add another option in iVecchiaMLE to choose between the default KKT system and the Vecchia one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that because the potrf and potrs batched are CUDA kernels, so I would imagine we would need to port everything to GPU. Also, I use CuVectors for S. For the case when the mode is CPU, I would think we want the internals to stay on CPU, no?

Also, for the KKT system thing, this should only be a meaningful choice for GPU mode, due to my reasoning above. @amontoison

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still a one time cost on CPU. Even if we don't have the batch LAPACK routines, solving 100 KKT systems with this formulation will probably lead to a speed-up.

@amontoison
Copy link
Member

We should have a dispatch with this function:
https://github.com/MadNLP/MadNLP.jl/blob/master/lib/MadNLPGPU/src/LinearSolvers/cudss.jl#L101

I need to investigate why it's not working.

@amontoison amontoison changed the title Dev Add VecchiaKKT.jl Mar 11, 2025
@amontoison amontoison force-pushed the dev branch 2 times, most recently from 9ff0d15 to 1ea8fa7 Compare March 11, 2025 18:29
@amontoison amontoison deleted the dev branch March 11, 2025 19:58
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