remove check shape by shape range

pull/1237/head
zhengyuanhua 4 years ago
parent 9f027029d5
commit 33d609ebad

@ -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());

@ -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