diff --git a/ge/graph/build/memory/graph_mem_assigner.cc b/ge/graph/build/memory/graph_mem_assigner.cc index 94e6f4f7..3ea85ce0 100755 --- a/ge/graph/build/memory/graph_mem_assigner.cc +++ b/ge/graph/build/memory/graph_mem_assigner.cc @@ -2035,10 +2035,10 @@ void GraphMemoryAssigner::UpdateCurNodeInputDesc(const NodePtr &cur_node, } void GraphMemoryAssigner::CheckNeedCalcDistAndUpdateVisitInfo( - map>> &mem_block_visit_info, const size_t matched_mem_offset, const NodePtr &peer_out_node, const OutDataAnchorPtr &peer_out_anchor, + map>> &mem_block_visit_info, bool &is_need_calc_distance) { auto iter = mem_block_visit_info.find(matched_mem_offset); // cannot find visit info, peer_out_node must be a producer and this data is the first time to be visited. @@ -2073,11 +2073,11 @@ void GraphMemoryAssigner::CheckNeedCalcDistAndUpdateVisitInfo( } // calculate distance, update visit info, update prev_node input desc, update cur node input desc -void GraphMemoryAssigner::CalcDistanceAndUpdateDesc(map>> &mem_block_visit_info, - const size_t matched_mem_offset, +void GraphMemoryAssigner::CalcDistanceAndUpdateDesc(const size_t matched_mem_offset, const map &node_index_in_stream, NodePtr &node, const InDataAnchorPtr &in_data_anchor, + map>> &mem_block_visit_info, bool &is_need_skip) { int64_t distance = -1; auto prev_node = mem_block_visit_info[matched_mem_offset].first; @@ -2134,10 +2134,10 @@ void GraphMemoryAssigner::CalcDistanceAndUpdateDesc(map>> &mem_block_visit_info, const size_t matched_mem_offset, const NodePtr &node, - const InDataAnchorPtr &in_data_anchor) { + const InDataAnchorPtr &in_data_anchor, + map>> &mem_block_visit_info) { GE_IF_BOOL_EXEC(node->GetOpDesc() == nullptr, return); auto input_desc = node->GetOpDesc()->GetInputDesc(in_data_anchor->GetIdx()); bool is_end_of_inputmem_lifecycle = false; diff --git a/ge/graph/build/memory/graph_mem_assigner.h b/ge/graph/build/memory/graph_mem_assigner.h index 9607841e..91a852e9 100755 --- a/ge/graph/build/memory/graph_mem_assigner.h +++ b/ge/graph/build/memory/graph_mem_assigner.h @@ -212,23 +212,23 @@ class GraphMemoryAssigner { void UpdateCurNodeInputDesc(const NodePtr &cur_node, int64_t cur_node_input_index, int64_t distance); - void CheckNeedCalcDistAndUpdateVisitInfo(map>> &mem_block_visit_info, - const size_t matched_mem_offset, + void CheckNeedCalcDistAndUpdateVisitInfo(const size_t matched_mem_offset, const NodePtr &peer_out_node, const OutDataAnchorPtr &peer_out_anchor, + map>> &mem_block_visit_info, bool &is_need_calc_distance); - void CalcDistanceAndUpdateDesc(map>> &mem_block_visit_info, - const size_t matched_mem_offset, + void CalcDistanceAndUpdateDesc(const size_t matched_mem_offset, const map &node_index_in_stream, NodePtr &node, const InDataAnchorPtr &in_data_anchor, + map>> &mem_block_visit_info, bool &is_need_skip); - void DeleteVisitInfoWhenLifecycleEnded(map>> &mem_block_visit_info, - const size_t matched_mem_offset, + void DeleteVisitInfoWhenLifecycleEnded(const size_t matched_mem_offset, const NodePtr &node, - const InDataAnchorPtr &in_data_anchor); + const InDataAnchorPtr &in_data_anchor, + map>> &mem_block_visit_info,); MemoryOffsetMap memory_offset_; ge::ComputeGraphPtr compute_graph_;