未验证 提交 91040569 编写于 作者: H hong 提交者: GitHub

fix new ir program translator shaddow output (#55814)

上级 345de9a5
......@@ -163,6 +163,11 @@ void ProgramTranslator::InsertOperationToSingleBlock(const BlockDesc& block) {
auto& op_translator = OpTranslator::instance();
for (auto op : block.AllOps()) {
OpTranslateFn& fn = op_translator[op->Type()];
if (op->Type() == "shaddow_output") {
if (!param_map_.count(op->Input("x")[0])) {
continue;
}
}
ir::Operation* operation = fn(ctx_, &param_map_, *op, program_);
VLOG(10) << "[op translated][special]" << operation;
}
......@@ -180,6 +185,10 @@ void ProgramTranslator::SetParameterFromSingleBlock(const BlockDesc& block) {
need_set_parameter_op &= (param_map_.count(var_name) != 0);
if (need_set_parameter_op) {
ir::OpResult defining_op_result = param_map_[var_name].value;
if (!defining_op_result) {
continue;
}
ir::Operation* op = InsertSetParamaterOp(
ctx_, defining_op_result, parameter_name_mappings_[var_name]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册