| 1043 | } |
| 1044 | |
| 1045 | void OpKernelContext::clear_recorded_memory() { |
| 1046 | mutex_lock l(stats_mu_); |
| 1047 | temp_memory_allocated_ = 0; |
| 1048 | persistent_memory_allocated_ = 0; |
| 1049 | if (temp_tensor_buffer_and_size_) { |
| 1050 | temp_tensor_buffer_and_size_->clear(); |
| 1051 | } |
| 1052 | if (persistent_alloc_ids_) { |
| 1053 | persistent_alloc_ids_->clear(); |
| 1054 | } |
| 1055 | } |
| 1056 | |
| 1057 | // OpKernel registration ------------------------------------------------------ |
| 1058 |