Memory leak with tensorflow-metal

I am trying the new tensorflow-metal release. The good news is that I see a boost in speed when executing my models. The bad news is that whenever it I run it, it leaks memory. So if I run the prediction 1000x I end up with 50GB of memory usage and eventually run out. The same code works when using stock tensorflow, albeit slower.

I tried using pympler to find a leak, but the output didn't really look different between tensorflow-metal and normal tensorflow. I suspect the leak is in native code, so that wouldn't really help.

Known issue? Ideas on how to debug? Open to anything really.

Hi dandiep! Could you please provide the network or small repro case so we can investigate that? Thanks.

Hi @dandiep, Could you please try with the latest tensorflow-metal plugin (tensorflow-metal==0.1.2) and see if the issue is still seen ? We have fixed bunch of different memory leaks observed. If the issue still exists, please provide a reproducible case so that we can verify it at our end.

Memory leak with tensorflow-metal
 
 
Q