Memory leak
Hi!
I am running a YOLO model on my Windows machine and I am having a very big memory leak that I have sourced down to the ortex library.
I am currently sending it an NX tensor (Torchx.Backend) as an input and I have removed all other code around it to make sure it is the actual running of the model that is the problem.
Below is a screenshot of my virtual memory growing steadly when the model is ran once each second.
Since I am running on Windows I cannot use valgrind or similar tools, and drMemory is also not working properly.
Is this a known problem with ortex or ort?
I assumed the resource handler in erlang was supposed to dealloc the resources that are shared between erlang and rustler?
Thanks!
Trying to compile and run under WSL with Valgrind now.
Interesting, thanks for opening this. You're correct, the Erlang garbage collection should be deallocating the memory when its reference count goes to 0. Do you have the test code that's causing memory growth? Sounds like something may be keeping a reference around. In general we haven't tested much on Windows so if there's something Windows specific to this issue I'm afraid I won't be of much help.
I experience the exact same for Ubuntu. Tried using Valgrind for my complete application but i do not think i will live long enough for it to complete execution 🫠 I will try to make minimal viable application to reproduce the problem! :)