| 760 | } |
| 761 | |
| 762 | void ChannelImpl::release_tensor(TensorInfo* dest) { |
| 763 | MGB_RECORD_EVENT(TensorReleaseEvent, dest->id); |
| 764 | MGB_LOCK_GUARD(m_mutex); |
| 765 | dest->ptr.reset(); |
| 766 | auto& state = get_worker_state(); |
| 767 | if (dest->size_exceeds_thd(state.options.dtr_evictee_minimum_size)) { |
| 768 | m_dtr.erase_candidate(dest); |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | void ChannelImpl::regenerate(TensorInfo* dest) { |
| 773 | if (dest->evict_type == EvictType::DROP) { |
nothing calls this directly
no test coverage detected