Browse Source

Add shape range check.

tags/v1.3.0
zhaozhixuan 4 years ago
parent
commit
f3e50acb9e
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      ge/graph/manager/graph_manager.cc

+ 2
- 2
ge/graph/manager/graph_manager.cc View File

@@ -490,8 +490,8 @@ Status GraphManager::ModifyDataIndex(const Graph &graph, const std::map<std::str
// The valid index starts with 0 and increases by 1, and num is equal to data_node.
if (indexes.size() != data_desc.size() || *first_iter != 0 || *end_iter != data_size - 1) {
auto iter = graph_option.find(OPTION_EXEC_DATA_INPUTS_SHAPE_RANGE);
bool enable_input_shape_range = (iter != graph_option.end()) && (!iter->second.empty());
if (enable_input_shape_range) {
if (iter != graph_option.end()) && (!iter->second.empty()) {
// If data inputs shape range is set, user must set valid data index.
REPORT_INNER_ERROR("E19999", "Input data index is invalid when data shape range enabled, please check!");
GELOGE(GRAPH_PARAM_INVALID, "[COMP][AddGraph]Input data index is invalid when data shape range enabled.");
return GRAPH_PARAM_INVALID;


Loading…
Cancel
Save