MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetRecordsAndUnRef

Method GetRecordsAndUnRef

tensorflow/core/framework/tracking_allocator.cc:258–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258gtl::InlinedVector<AllocRecord, 4> TrackingAllocator::GetRecordsAndUnRef() {
259 bool should_delete;
260 gtl::InlinedVector<AllocRecord, 4> allocations;
261 {
262 mutex_lock lock(mu_);
263 allocations.swap(allocations_);
264 should_delete = UnRef();
265 }
266 if (should_delete) {
267 delete this;
268 }
269 return allocations;
270}
271
272gtl::InlinedVector<AllocRecord, 4> TrackingAllocator::GetCurrentRecords() {
273 gtl::InlinedVector<AllocRecord, 4> allocations;

Callers 5

~OpKernelContextMethod · 0.80
TESTFunction · 0.80
FinalizeMethod · 0.80
UpdateStatsFunction · 0.80

Calls 1

swapMethod · 0.45

Tested by 2

TESTFunction · 0.64