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

Method erase

src/custom/impl/manager.cpp:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122bool CustomOpManager::erase(const std::string& name) {
123 MGB_LOCK_GUARD(m_op_mtx);
124 auto iter = m_name2op.find(name);
125 if (iter == m_name2op.end()) {
126 mgb_log_warn(
127 "Erase Custom Op Failed! %s has not been registered", name.c_str());
128 return false;
129 }
130 std::shared_ptr<const CustomOp> op = iter->second;
131 m_id2op.erase(op->runtime_id());
132 m_name2op.erase(op->op_type());
133 return true;
134}
135
136RunTimeId CustomOpManager::to_id(const std::string& name) const {
137 std::shared_ptr<const CustomOp> op = find(name);

Callers 15

update_inputMethod · 0.45
update_outputMethod · 0.45
decrypt_modelMethod · 0.45
LITE_destroy_tensorFunction · 0.45
LITE_destroy_networkFunction · 0.45
unregister_loaderMethod · 0.45
bcast_addrMethod · 0.45
bcast_nccluniqueidMethod · 0.45
~LockBaseMethod · 0.45
removeMethod · 0.45
TESTFunction · 0.45
~CustomLibMethod · 0.45

Calls 4

findMethod · 0.45
endMethod · 0.45
runtime_idMethod · 0.45
op_typeMethod · 0.45

Tested by 1

TESTFunction · 0.36