MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / release_tensor

Method release_tensor

imperative/src/impl/interpreter/interpreter_impl.cpp:762–770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760}
761
762void 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
772void ChannelImpl::regenerate(TensorInfo* dest) {
773 if (dest->evict_type == EvictType::DROP) {

Callers

nothing calls this directly

Calls 3

size_exceeds_thdMethod · 0.80
erase_candidateMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected