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

fix legacy name converter bug (#55144)

上级 44049cb4
......@@ -93,6 +93,15 @@ class OpNameNormalizer {
legacy_name.replace(pos, target.length(), data);
}
return legacy_name;
} else if (is_grad_op && !is_grad_arg) {
// backwward op using forward args: like trace_grad using forward input
std::string target = "_grad";
size_t type_pos = op_type.find(target);
std::string legacy_name =
this->GetLegacyArgName(op_type.substr(0, type_pos), arg_name);
return legacy_name;
}
if (op_arg_name_mappings.find(op_type) == op_arg_name_mappings.end()) {
return UnderscoreToCamelCase(arg_name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册