未验证 提交 e9b8feac 编写于 作者: Z zhangbo9674 提交者: GitHub

fix bug (#55471)

上级 8fe94d44
......@@ -89,7 +89,7 @@ const std::map<std::string, int>& OpYamlInfoParser::InputName2Id() const {
}
bool OpYamlInfoParser::HasInplace(const std::string& out_name) const {
auto inplace_info = std::get<3>(op_info_tuple_).inplace;
auto& inplace_info = std::get<3>(op_info_tuple_).inplace;
for (size_t i = 0; i < inplace_info.size(); i++) {
if (out_name == inplace_info[i].first) {
return true;
......@@ -100,7 +100,7 @@ bool OpYamlInfoParser::HasInplace(const std::string& out_name) const {
const std::string& OpYamlInfoParser::InplaceName(
const std::string& out_name) const {
auto inplace_info = std::get<3>(op_info_tuple_).inplace;
auto& inplace_info = std::get<3>(op_info_tuple_).inplace;
for (size_t i = 0; i < inplace_info.size(); i++) {
if (out_name == inplace_info[i].first) {
return inplace_info[i].second;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册