Browse Source

fix(extern_c_opr): let megbrain throw a exception when load extern c opr fails

GitOrigin-RevId: 16f5ceb8e3
tags/v1.6.0-rc1
Megvii Engine Team 3 years ago
parent
commit
a0c7e047f5
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/serialization/impl/extern_c_opr.cpp

+ 4
- 0
src/serialization/impl/extern_c_opr.cpp View File

@@ -518,6 +518,10 @@ cg::OperatorNodeBase* ExternCOprRunner::load(OprLoadContext& ctx,
if (auto trans = iter->second.second) {
desc = trans(desc);
}

mgb_throw_if(nullptr == desc, MegBrainError,
"loader create desc returns nullptr");

return make_from_desc(dump_name, inputs, desc, config);
}



Loading…
Cancel
Save