microsoft / tensorflow-directml-plugin

DirectML PluggableDevice plugin for TensorFlow 2
Apache License 2.0
179 stars 23 forks source link

Fix memory leak in the emulated philox random kernels #284

Closed PatriceVignola closed 1 year ago

PatriceVignola commented 1 year ago

The RAII wrapper that we used to deallocate the output of the emulated philox random kernels that were run on the CPU through the Eager API wasn't actually deallocating the memory because we were passing a pointer that was always null. To fix this, we needed to pass a pointer to the pointer (TFE_TensorHandle**).