| 299 | } |
| 300 | |
| 301 | OpKernelContext::~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 | |
| 317 | Allocator* OpKernelContext::get_allocator(AllocatorAttributes attr) { |
| 318 | Allocator* allocator = nullptr; |
nothing calls this directly
no test coverage detected