提交 22cf9de4 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!440 fix bug of deal ref pass

Merge pull request !440 from lianliguang/fix-bug-of-deal-ref-pass
......@@ -101,9 +101,9 @@ AnfNodePtr AddAdditionalToRefOutput(const FuncGraphPtr &func_graph, const CNodeP
auto origin_type = AnfAlgo::GetOutputDeviceDataType(origin_pair.first, origin_pair.second);
auto cur_format = AnfAlgo::GetOutputFormat(cnode, output_index);
auto cur_type = AnfAlgo::GetOutputDeviceDataType(cnode, output_index);
auto cur_shape = AnfAlgo::GetOutputInferShape(cnode, 0);
auto cur_shape = AnfAlgo::GetOutputInferShape(cnode, output_index);
// insert trans
if (origin_format != cur_format) {
if (origin_format != cur_format && cur_shape.size() > 1) {
auto kernel_select = std::make_shared<KernelSelect>();
final_node = AddTransOpNodeToGraph(func_graph, final_node, kernel_select, 0, cur_format, origin_format,
kTransDataOpName, false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册