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

[documentation] Add an optimized linear operator for sparse matrix-vector product on Nvidia GPUs #783

Closed
amontoison opened this issue Aug 26, 2023 · 1 comment · Fixed by #848
Assignees

Comments

@amontoison
Copy link
Member

For sparse matrix-vector products on Nvidia GPUs, we need to allocate some buffers.
The current implementation allocates a new buffer at each product A * v.
We could reuse the same buffer if we implement a linear operator based on the low-level CUDA wrappers.

@amontoison amontoison self-assigned this Aug 26, 2023
@amontoison
Copy link
Member Author

amontoison commented Dec 16, 2023

I did it in KrylovPreconditioners.jl.
The user just needs to do:

using KrylovPreconditioners
opA = KrylovOperator(A)

A can be a sparse COO, CSR or CSC matrices.
It also works for AMD GPUs.
I should add a section about it in Performance Tips or some remarks in the section GPU.

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