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.