Commit 588b00bc authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

Replace `OpKernelContext::wrapped_allocators()` with `ConsumeWrappedAllocators()`.

This change makes the ownership transfer from `OpKernelContext` the stats collection machinery explicit, and should prevent memory leaks in future. It also logs a warning if the wrapped allocators are not consumed by a stats collector, which indicates that the code is taking a more expensive allocation path for no purpose.

PiperOrigin-RevId: 220171712
parent 99b04804
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment