Commit 48ad5800 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[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
parent 25bb447d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment