提交 a4f0e581 编写于 作者: M Megvii Engine Team

fix(mgb/extern_c_opr): throw exception when extern c opr loader was created

GitOrigin-RevId: bf48e1f3bb9fce733174522024504e9b1289c5be
上级 e5217db9
......@@ -515,6 +515,10 @@ cg::OperatorNodeBase* ExternCOprRunner::load(OprLoadContext& ctx,
auto data = ctx.load_shared_buf_with_len();
auto desc = iter->second.first.create_desc(inputs.size(), data.data(),
data.size());
mgb_throw_if(nullptr == desc, MegBrainError,
"loader create desc returns nullptr");
if (auto trans = iter->second.second) {
desc = trans(desc);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册