-
Notifications
You must be signed in to change notification settings - Fork 256
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
GPU memory leaked when destructing warp.Mesh #225
Comments
After an initial investigation, the problem seems to be the following:
During creation, the following memory block is allocated on the device (in Line 504 in ebcc90d
This allocation does not have a corresponding free_device() call and is thus leaked.
I am not well-versed enough with this code base to propose a nice fix. However, here is a "hacky" patch that resolves the problem: https://gist.github.com/MaxWipfli/3197354809752d377dd90bbd108e1992 |
Thanks @MaxWipfli, nice catch! Your fix is on the right track. I'll take a closer look and we'll get this leak patched up asap. |
Fix is now in |
We noticed that GPU memory usage increases when repeatedly creating (and destroying)
warp.Mesh
objects.Minimal Example:
Output:
As can be seen easily, the GPU memory usage increases steadily, despite the created
Mesh
being destroyed immediately.The has been tested on the lastest
main
commit (ebcc90d). There is no host memory leak when usingdevice = "cpu"
, as far as we can tell.The text was updated successfully, but these errors were encountered: