Browse Source

remove check shape by shape range

tags/v1.2.0
zhengyuanhua 3 years ago
parent
commit
33d609ebad
2 changed files with 0 additions and 18 deletions
  1. +0
    -4
      ge/hybrid/executor/node_state.cc
  2. +0
    -14
      ge/ir_build/ge_ir_build.cc

+ 0
- 4
ge/hybrid/executor/node_state.cc View File

@@ -77,10 +77,6 @@ Status ShapeInferenceState::UpdateInputShape(int idx, const GeTensorDesc &target

std::lock_guard<std::mutex> lk(mu_);
auto &input_desc = input_tensor_desc[idx];
if (CheckInputShapeByShapeRange(input_desc, target) != SUCCESS) {
GELOGE(FAILED, "[%s] Check input shape by shape range failed.", node_item.NodeName().c_str());
return FAILED;
}
GeShape shape = target.GetShape();
input_desc.SetShape(shape);
input_desc.SetOriginShape(target.GetOriginShape());


+ 0
- 14
ge/ir_build/ge_ir_build.cc View File

@@ -319,20 +319,6 @@ graphStatus Impl::UpdateDataOpAttr(const Graph &graph) {
GELOGE(GRAPH_FAILED, "Update data op [%s] shape range failed.", op->GetName().c_str());
return GRAPH_FAILED;
}
if (shape_range_map.empty()) {
auto tensor_input = op->MutableInputDesc(0);
GE_CHECK_NOTNULL(tensor_input);
GeShape shape = tensor_input->GetShape();
std::vector<std::pair<int64_t, int64_t>> shape_range;
if (tensor_input->GetShapeRange(shape_range) != GRAPH_SUCCESS) {
GELOGE(GRAPH_FAILED, "[%s] Get shape range failed.", op->GetName().c_str());
return GRAPH_FAILED;
}
if (TensorUtils::CheckShapeByShapeRange(shape, shape_range) != SUCCESS) {
GELOGE(GRAPH_FAILED, "[%s] Check shape by shape range failed.", op->GetName().c_str());
return GRAPH_FAILED;
}
}
}
}



Loading…
Cancel
Save