forked from mindspore-Ecosystem/mindspore
!47553 Fix cast bug in GE
Merge pull request !47553 from liangzelang/master
This commit is contained in:
commit
67123d32ed
|
@ -48,7 +48,7 @@ AnfNodePtr CreateCastNode(const FuncGraphPtr &graph, const AnfNodePtr &input, co
|
|||
AnfNodePtr cast = graph->NewCNode({NewValueNode(std::make_shared<Primitive>(kCastOpName)), input});
|
||||
common::AnfAlgo::SetOutputTypeAndDetailShape({dst_type}, {common::AnfAlgo::GetOutputDetailShape(input, 0)},
|
||||
cast.get());
|
||||
common::AnfAlgo::SetNodeAttr(kAttrDstType, MakeValue(static_cast<size_t>(dst_type)), cast);
|
||||
common::AnfAlgo::SetNodeAttr(kAttrDstType, TypeIdToType(dst_type), cast);
|
||||
cast->set_scope(input->scope());
|
||||
return cast;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue