Browse Source

!7441 No need to add atomic for communication op's output

Merge pull request !7441 from laiyongqiang/no_atomic_for_comm_output
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
149ff936ff
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      mindspore/ccsrc/runtime/device/ascend/kernel_build_ascend.cc

+ 7
- 1
mindspore/ccsrc/runtime/device/ascend/kernel_build_ascend.cc View File

@@ -234,7 +234,13 @@ std::map<AnfNodePtr, std::vector<size_t>> GetCommunicationOpInputInfo(
for (size_t i = 0; i < input_num; i++) { for (size_t i = 0; i < input_num; i++) {
auto input_node = kernel->input(i + 1); auto input_node = kernel->input(i + 1);
auto kernel_input = AnfAlgo::VisitKernelWithReturnType(input_node, 0, true); auto kernel_input = AnfAlgo::VisitKernelWithReturnType(input_node, 0, true);
MS_LOG(INFO) << " Add atomic clean for single communication op input, comm:" << kernel->fullname_with_scope()
if (AnfAlgo::IsCommunicationOp(kernel_input.first)) {
// no need to add atomic for communication op's output
MS_LOG(INFO) << "No need to add atomic clean for communication op "
<< kernel_input.first->fullname_with_scope() << "'s output";
continue;
}
MS_LOG(INFO) << "Add atomic clean for single communication op input, comm:" << kernel->fullname_with_scope()
<< " input_node: " << kernel_input.first->fullname_with_scope() << " input_node: " << kernel_input.first->fullname_with_scope()
<< " index: " << kernel_input.second; << " index: " << kernel_input.second;
auto iter = comm_input_info_map.find(kernel_input.first); auto iter = comm_input_info_map.find(kernel_input.first);


Loading…
Cancel
Save