Clear GPU memory
See original GitHub issueDear jax team,
I’d like to use jax alongside other tools running on GPU in the same pipeline. Is there a possibility to “encapsulate” the usage of jax/XLA so that the GPU is freed afterwards? Even if I would have to copy over the DeviceArray
s into numpy manually.
Maybe something like:
with jax.Block():
result = some_jitted_fun(a, b, c)
result = onp.copy(result)
I can imagine the (design of) handling of objects and their GPU memory is not straightforward, if not practically impossible. Could I at least tell jax to use the GPU only incrementally instead of filling the memory completely on import?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:21 (9 by maintainers)
Top Results From Across the Web
How can I flush GPU memory using CUDA (physical reset is ...
Quitting applications seems to free the memory they use. Quit everything you don't need, or quit applications one-by-one to see how much memory...
Read more >7 Tested Methods to Fix Your GPU Memory is Full Message
1. Adjust paging file settings for the game drive · 2. Update the graphics driver · 3. Use the 3GB switch · 4....
Read more >Your GPU memory is full? Try these fixes to resolve it! - YouTube
Your GPU memory is full? Try these fixes to resolve it!This video will show you how to do it!Try the following solutions to...
Read more >How to Clear GPU Memory Windows 11 - YouTube
How to Clear GPU Memory Windows 11 Search Google for - hows.tech windows commands The page has complete list of Windows Commands.
Read more >How to flush / garbage collect GPU memory - Windows 10
1 Answer 1 · Open Windows Powershell ISE and copy paste the following code into it. {. #Disable the GPU · Replace "GPU...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update on this?
If you’d like to delete all on-device buffers, you can now reach directly into the underlying C++ internals like this:
You’ll get errors about trying to use a deleted buffer if you try to use an existing references to these buffers. Note these APIs are still subject to change as well!