!24145 Fix output type mismatch of ResizeBilinear

Merge pull request !24145 from chenhaozhe/fix-resizebilinear-mismatch
This commit is contained in:
i-robot 2021-09-27 02:56:07 +00:00 committed by Gitee
commit 37aa41f5d2
1 changed files with 4 additions and 0 deletions

View File

@ -68,6 +68,10 @@ AnfNodePtr CastSameTypeEliminater::operator()(const OptimizerPtr &, const AnfNod
node->func_graph()->NewCNode({NewValueNode(prim::kPrimDepend), src_, node->cast<CNodePtr>()->input(2)});
return new_depend;
}
// Temporary patch for the output dtype mismatch, ResizeBilinear on Ascend always return Float32 tensor.
if (IsPrimitiveCNode(node->cast<CNodePtr>()->input(1), prim::kPrimResizeBilinear)) {
return nullptr;
}
return src_;
}