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

Manually Freeing CUDA Memory #698

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Conversation

TomaszTB
Copy link
Contributor

You were creating GpuMats without closing them. Fortunately the JavaCPP deallocator thread closed them properly, but I have trust issues with that thread because it has failed on me in the past. This PR does the memory management without relying on the JavaCPP deallocator thread.

Before: see how the GPU memory usage fluctuates a bunch
Before

After: GPU memory usage is stable
After

This is running the NadiaContinuousHikingKinSim, btw

Copy link
Contributor

@PotatoPeeler3000 PotatoPeeler3000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@TomaszTB TomaszTB merged commit d7205fb into develop Feb 27, 2025
63 of 68 checks passed
@TomaszTB TomaszTB deleted the bugfix/safer-memory-management branch February 27, 2025 19:46
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

Successfully merging this pull request may close these issues.

2 participants