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 AMDGPU.jl v1.0 in MadNLPGPU.jl #380

Open
amontoison opened this issue Nov 21, 2024 · 7 comments
Open

Support AMDGPU.jl v1.0 in MadNLPGPU.jl #380

amontoison opened this issue Nov 21, 2024 · 7 comments

Comments

@amontoison
Copy link
Member

No description provided.

@sshin23
Copy link
Member

sshin23 commented Nov 21, 2024

do we have a linear solver?

@amontoison
Copy link
Member Author

amontoison commented Nov 21, 2024

Yes :)
I solve KKT systems related to crystal sensing problems (40M of variables) with Krylov solvers.
These problems can be preconditioned efficiently and solved in a matrix-free way.

@sshin23
Copy link
Member

sshin23 commented Nov 21, 2024

I see. Makes sense. Are you doing IPM or is it purely Newton?

@amontoison
Copy link
Member Author

amontoison commented Nov 21, 2024

We are doing primal-dual IPM.
We can see the problem as a QP where we call two linear operators (ifft and then fft).
We wanted to use MadQP.jl but it doesn't support GPUs yet.

cc @frapac

@amontoison
Copy link
Member Author

I thought that AMDGPU.jl was a dependency of MadNLPGPU.jl but it's AMD.jl.
We don't have anything for AMD GPUs.
I can quickly interface the LAPACK routines of rocSOLVER.

@KSepetanc
Copy link

KSepetanc commented Jan 5, 2025

Will Krylov approach be implemented for CUDA as well? How it compares to cuDSS?

@amontoison
Copy link
Member Author

amontoison commented Jan 5, 2025

Krylov.jl works with all GPU backends. We just need to implement a custom KKT system with the API of MadNLP.jl.
We have this example:
https://github.com/exanauts/CompressedSensingIPM.jl/blob/main/kkt.jl

We have a paper that should be submitted very soon with excellent results.
cuDSS can't be used in our application because we have problems with 350 millions of variables and materializing the Hessian of the Lagrangian will be dense (dense Vandermonde matrix that represents fft / ifft operators).

In optimization solvers, direct methods (like cuDSS or HSL) are generally more relevant because of ill-conditioning but for specific applications Krylov methods works well and could be also the only solution.
Compressed sensing is one of them.

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

No branches or pull requests

3 participants