From 33d609ebada9eb36ff9e2014da67393d24b73f27 Mon Sep 17 00:00:00 2001 From: zhengyuanhua Date: Fri, 12 Mar 2021 10:16:56 +0800 Subject: [PATCH] remove check shape by shape range --- ge/hybrid/executor/node_state.cc | 4 ---- ge/ir_build/ge_ir_build.cc | 14 -------------- 2 files changed, 18 deletions(-) diff --git a/ge/hybrid/executor/node_state.cc b/ge/hybrid/executor/node_state.cc index 14284c0f..3834478c 100644 --- a/ge/hybrid/executor/node_state.cc +++ b/ge/hybrid/executor/node_state.cc @@ -77,10 +77,6 @@ Status ShapeInferenceState::UpdateInputShape(int idx, const GeTensorDesc &target std::lock_guard 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()); diff --git a/ge/ir_build/ge_ir_build.cc b/ge/ir_build/ge_ir_build.cc index cb025954..bd1be318 100644 --- a/ge/ir_build/ge_ir_build.cc +++ b/ge/ir_build/ge_ir_build.cc @@ -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> 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; - } - } } }