Browse Source

mark attr distance

pull/1573/head
lichun 4 years ago
parent
commit
e071d75ba3
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      ge/graph/build/memory/graph_mem_assigner.cc

+ 3
- 2
ge/graph/build/memory/graph_mem_assigner.cc View File

@@ -36,6 +36,7 @@ namespace {
const int kAllInputAddrIsAtomic = -1; const int kAllInputAddrIsAtomic = -1;
const int kVirtualInputNodeMemoryReuse = 0; const int kVirtualInputNodeMemoryReuse = 0;
const int kVirtualOutputNodeMemoryReuse = 1; const int kVirtualOutputNodeMemoryReuse = 1;
const int kPrevNextDistanceNum = 2;
const int64_t kInvalidStream = -1; const int64_t kInvalidStream = -1;
const char *const kEngineNameGeLocal = "DNN_VM_GE_LOCAL_OP_STORE"; const char *const kEngineNameGeLocal = "DNN_VM_GE_LOCAL_OP_STORE";
// One state per bit cannot be repeated // One state per bit cannot be repeated
@@ -1979,7 +1980,7 @@ static void UpdatePrevNodeInputDesc(const NodePtr &prev_node,
continue; continue;
} }


if (prev_next_distances.size() == 2) {
if (prev_next_distances.size() == kPrevNextDistanceNum) {
prev_next_distances[1] = distance; prev_next_distances[1] = distance;
} else { } else {
GELOGW("Size of prev_next_distances is not 2."); GELOGW("Size of prev_next_distances is not 2.");
@@ -2114,7 +2115,7 @@ void GraphMemoryAssigner::MarkNodeDistanceAttr(const ComputeGraphPtr &compute_gr
GELOGW("Get ATTR_NAME_DATA_VISIT_DISTANCE failed."); GELOGW("Get ATTR_NAME_DATA_VISIT_DISTANCE failed.");
continue; continue;
} }
if (prev_next_distances.size() != 2) {
if (prev_next_distances.size() != kPrevNextDistanceNum) {
GELOGW("Size of prev_next_distance is not 2."); GELOGW("Size of prev_next_distance is not 2.");
continue; continue;
} else { } else {


Loading…
Cancel
Save