[tf.data] Fix a memory leak of `TrackingAllocator` objects when stats...
[tf.data] Fix a memory leak of `TrackingAllocator` objects when stats aggregation or modeling is enabled. Setting a stats collector on an executor automatically enables allocation tracking, which creates a `TrackingAllocator` in each `OpKernelContext` for an op that allocates tensors. The lightweight `StepStatsCollectorInterface` implementation in tf.data was missing a heretofore undocumented deallocation call for these allocator objects, and so they were leaking. PiperOrigin-RevId: 219709003
Loading
Please sign in to comment