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

Opportunistic GC collection #2303

Closed
maleadt opened this issue Mar 25, 2024 · 2 comments
Closed

Opportunistic GC collection #2303

maleadt opened this issue Mar 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@maleadt
Copy link
Member

maleadt commented Mar 25, 2024

As suggested by @gbaraldi: keep track of GPU memory pressure (using some atomic globals), and when allocating opportunistically call the GC to avoid only reclaiming memory when we run out of it.

@BioTurboNick
Copy link

Not sure how it impacts your decision here, but I ran into a lack-of-GC issue here (FluxML/Flux.jl#2414) which was completely solved by running GC.gc(false) every other iteration. Running the full GC helped over nothing at all, but was still much slower than the incremental sweep.

@maleadt
Copy link
Member Author

maleadt commented Mar 30, 2024

Maybe you can try the linked PR? It needs tuning of the heuristic, so datapoints would be useful.

@maleadt maleadt closed this as completed Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants