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

Method DeallocateRaw

src/cambricon/impl/magicmind_runtime_opr.cpp:143–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void MagicMindRuntimeOpr::CambriconAllocator::DeallocateRaw(void* ptr) {
144 {
145 auto iter = m_ptr2size.find(ptr);
146 mgb_assert(iter != m_ptr2size.end(), "ptr %p not found", ptr);
147 m_ptr2size.erase(iter);
148 }
149 m_cn.free_device(ptr);
150}
151
152/* ====================== MagicMindRuntimeOpr ==================== */
153MGB_DYN_TYPE_OBJ_FINAL_IMPL(MagicMindRuntimeOpr);

Callers

nothing calls this directly

Calls 4

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
free_deviceMethod · 0.45

Tested by

no test coverage detected