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

Memory optimisation #40

Closed
rveltz opened this issue Nov 21, 2020 · 3 comments
Closed

Memory optimisation #40

rveltz opened this issue Nov 21, 2020 · 3 comments

Comments

@rveltz
Copy link
Contributor

rveltz commented Nov 21, 2020

Hi,

I am using KK in a very memory "limited" GPU. I would like to ask you a few questions to optimize my code:

  • I use arnoldi whereas the linear operator is hermitian (in a different basis, annoying to code). Would this save me half memory?
  • I repeatedly call eigsolve during continuation code (see BifurcationKit). Is there a way to re-use (some of) the previously allocated memory?
  • sometimes I run out of memory after a few restarts, I would expect this not to happen, the Krylov space has already been allocated. Is is expected?

If you have suggestions, please do not hesitate,

Thank you

Best regards.

@Jutho
Copy link
Owner

Jutho commented May 25, 2021

My apologies for failing to respond to this. To this date, KrylovKit is not the most memory friendly, i.e. it is not reusing memory from previous vectors (e.g. the Krylov subspace from the previous iteration). This, you can notice based on the fact that, if you implement the linear operator as a function, KrylovKit only requires, or in fact only accepts, an out of place method, which allocates a new vector for the result of the application of the linear map. Replacing this with in-place methods that reuse the memory has been on the todo list from day one, but so far has not happened. Hopefully I will find the time one day.

@rveltz
Copy link
Contributor Author

rveltz commented May 25, 2021

thank you

@Jutho
Copy link
Owner

Jutho commented Mar 16, 2022

I will close this in favor of Issue #9 , which is really the same issue at the core. Feel free to reopen if there is anything GPU specific that I should think about.

@Jutho Jutho closed this as completed Mar 16, 2022
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

2 participants