You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The core idea is to decorated all functions that create and destroy buffers and textures, and track memory usage there. It's a simple idea but I can see how it would give a very good estimate of actual usage.
There are many other things you could track like shaders, canvases, etc, but buffers and textures are most likely the main chunk of memory usage. It's good to start with something simple.
We could consider making this a feature of wgpu-py that can be toggled on/off, since it introduces some performance overhead that isn't desirable in production code.
We could include current memory usage information in the "reporting" functions that we have available.
The text was updated successfully, but these errors were encountered:
I saw this other library applying a neat strategy to track memory usage: https://github.com/greggman/webgpu-memory/blob/main/src/webgpu-memory.js
The core idea is to decorated all functions that create and destroy buffers and textures, and track memory usage there. It's a simple idea but I can see how it would give a very good estimate of actual usage.
There are many other things you could track like shaders, canvases, etc, but buffers and textures are most likely the main chunk of memory usage. It's good to start with something simple.
We could consider making this a feature of wgpu-py that can be toggled on/off, since it introduces some performance overhead that isn't desirable in production code.
We could include current memory usage information in the "reporting" functions that we have available.
The text was updated successfully, but these errors were encountered: