Browse Source

move hccl_memcpy_pass to optimize1

pull/277/head
wangxiaotian22 4 years ago
parent
commit
9dbf39f12b
2 changed files with 2 additions and 3 deletions
  1. +2
    -0
      ge/graph/manager/graph_manager.cc
  2. +0
    -3
      ge/graph/preprocess/graph_preprocess.cc

+ 2
- 0
ge/graph/manager/graph_manager.cc View File

@@ -1962,6 +1962,8 @@ Status GraphManager::OptimizeStage1(ge::ComputeGraphPtr &compute_graph) {
} }
PassManager after_merge_passes; PassManager after_merge_passes;
GE_CHK_STATUS_RET( GE_CHK_STATUS_RET(
after_merge_passes.AddPass("OptimizeStage1_1::HcclMemcpyPass", new (std::nothrow) HcclMemcpyPass));
GE_CHK_STATUS_RET(
after_merge_passes.AddPass("OptimizeStage1_1::MergeInputMemcpyPass", new (std::nothrow) MergeInputMemcpyPass)); after_merge_passes.AddPass("OptimizeStage1_1::MergeInputMemcpyPass", new (std::nothrow) MergeInputMemcpyPass));
GE_CHK_STATUS_RET( GE_CHK_STATUS_RET(
after_merge_passes.AddPass("OptimizeStage1_1::SwitchDataEdgesBypass", new (std::nothrow) SwitchDataEdgesBypass)); after_merge_passes.AddPass("OptimizeStage1_1::SwitchDataEdgesBypass", new (std::nothrow) SwitchDataEdgesBypass));


+ 0
- 3
ge/graph/preprocess/graph_preprocess.cc View File

@@ -60,7 +60,6 @@
#include "graph/passes/get_original_format_pass.h" #include "graph/passes/get_original_format_pass.h"
#include "graph/passes/guarantee_const_pass.h" #include "graph/passes/guarantee_const_pass.h"
#include "graph/passes/hccl_group_pass.h" #include "graph/passes/hccl_group_pass.h"
#include "graph/passes/hccl_memcpy_pass.h"
#include "graph/passes/identity_pass.h" #include "graph/passes/identity_pass.h"
#include "graph/passes/infershape_pass.h" #include "graph/passes/infershape_pass.h"
#include "graph/passes/iterator_op_pass.h" #include "graph/passes/iterator_op_pass.h"
@@ -1691,8 +1690,6 @@ Status GraphPrepare::PrepareOptimize() {
PassManager graph_pass; PassManager graph_pass;
try { try {
(void)graph_pass.AddPass("PrepareOptimize::PrunePass", new PrunePass); (void)graph_pass.AddPass("PrepareOptimize::PrunePass", new PrunePass);
// todo 临时把hccl的memcpy插入放到图准备,为了防止其多插memcpy
(void)graph_pass.AddPass("PrepareOptimize::HcclMemcpyPass", new (std::nothrow) HcclMemcpyPass);
} catch (std::bad_alloc &e) { } catch (std::bad_alloc &e) {
GELOGE(INTERNAL_ERROR, "Add pass failed, bad memory allocation occurs."); GELOGE(INTERNAL_ERROR, "Add pass failed, bad memory allocation occurs.");
return INTERNAL_ERROR; return INTERNAL_ERROR;


Loading…
Cancel
Save