Commit 46f4acae authored by amy.zhuang's avatar amy.zhuang

Fix a bug.

parent 0e8be7e3
......@@ -1172,12 +1172,19 @@ void runtime::cpu::CPU_ExternalFunction::process_in_place_concat(
bool found_last_concat = true;
for (auto user : concat->get_users())
{
if (dynamic_pointer_cast<ngraph::op::Concat>(user))
if (auto user_concat = dynamic_pointer_cast<ngraph::op::Concat>(user))
{
if (auto op_annotations = user_concat->get_op_annotations())
{
auto in_place_oi_pairs = op_annotations->get_in_place_oi_pairs();
if (in_place_oi_pairs.size() > 0)
{
found_last_concat = false;
break;
}
}
}
}
if (found_last_concat)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment