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

Method ~OpKernelContext

tensorflow/core/framework/op_kernel.cc:301–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301OpKernelContext::~OpKernelContext() {
302 for (TensorValue& value : outputs_) {
303 if (!value.is_ref()) {
304 delete value.tensor;
305 }
306 }
307 if (params_->record_tensor_accesses) referenced_tensors_.Destroy();
308 if (params_->track_allocations && !wrapped_allocators_.empty()) {
309 LOG(WARNING) << "OpKernelContext is tracking allocations but they are not "
310 << "being consumed by the StepStatsCollector.";
311 for (auto& wrapped_alloator : wrapped_allocators_) {
312 wrapped_alloator.second->GetRecordsAndUnRef();
313 }
314 }
315}
316
317Allocator* OpKernelContext::get_allocator(AllocatorAttributes attr) {
318 Allocator* allocator = nullptr;

Callers

nothing calls this directly

Calls 4

is_refMethod · 0.80
GetRecordsAndUnRefMethod · 0.80
DestroyMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected