-
Notifications
You must be signed in to change notification settings - Fork 514
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 Leak and Performance Degradation in GraphMemoryManagement
due to Unreleased Nodes
#2487
Comments
Is it relevant to #2042? |
Thank you for pointing this out! This issue may indeed be related to #2042, but it is definitely connected to #2333. In fact, the However, the root cause here seems to be that Let me know if I can provide additional details! |
@jnamika Could you provide the minimal example? or is MNIST enough? How long does it take to reproduce? 2 days? I'd like to track the issue, but I can't solve it since I am not familiar with GMM. |
Before I could create a minimal example, I found a solution and have submitted the pull request #2488 with the fix. |
Describe the bug
There appears to be a node leak in the
GraphMemoryManagement
. By adding a debug line at the end ofGraphMemoryManagement::free_unavailable_nodes()
to displayself.nodes.len()
, we can observe that the size of self.nodes increases by one with each call.To Reproduce
The issue can be reproduced regardless of the backend. For example, running
burn/examples/mnist
demonstrates the memory leak.Expected behavior
GraphMemoryManagement
should delete unneeded nodes as expected, preventing any memory leaks.Additional context

The
GraphMemoryManagement::clear_unused_roots()
method performs a linear search overself.nodes
, so as training progresses and leaked nodes accumulate, the overall performance gradually degrades.The text was updated successfully, but these errors were encountered: