Browse Source

!11896 fix bug about split node optimizer.

From: @liu_xiao_93
Reviewed-by: @wuxuejian,@liangchenghui
Signed-off-by: @liangchenghui
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 5 years ago
parent
commit
de54033dfc
2 changed files with 2 additions and 3 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/optimizer/ascend/enhancer/split_n_optimizer.cc
  2. +1
    -2
      mindspore/ccsrc/runtime/device/ascend/tasksink/task_generator.cc

+ 1
- 1
mindspore/ccsrc/backend/optimizer/ascend/enhancer/split_n_optimizer.cc View File

@@ -135,7 +135,7 @@ bool OutputCheck(const FuncGraphPtr &func_graph, const AnfNodePtr &node) {
MS_LOG(INFO) << "Next node is not a AICore node, can not optimizer.";
return false;
}
if (func_graph->output() == item || AnfAlgo::CheckPrimitiveType(node, prim::kPrimReturn)) {
if (func_graph->output() == item || AnfAlgo::CheckPrimitiveType(item, prim::kPrimReturn)) {
MS_LOG(INFO) << "Next node is graph output or return, can not optimizer.";
return false;
}


+ 1
- 2
mindspore/ccsrc/runtime/device/ascend/tasksink/task_generator.cc View File

@@ -171,8 +171,7 @@ bool TaskGenerator::LaunchKernel(const CNodePtr &anf_node_ptr, uint32_t stream_i
input->addr =
static_cast<uint8_t *>(split_input0_device_address->ptr_) + (prenode_with_index.second * input->size);
MS_LOG(INFO) << "Change " << anf_node_ptr->fullname_with_scope() << "'s input " << i << " address to "
<< split_input0_device_address->ptr_ << " + "
<< "prenode_with_index.second * input->size";
<< split_input0_device_address->ptr_ << " + " << prenode_with_index.second * input->size;
}
}
kernel_inputs.push_back(input);


Loading…
Cancel
Save