@@ -69,10 +69,10 @@ Status CheckOptionsValid(const std::map<string, string> &options) { | |||
auto job_id_iter = options.find(OPTION_EXEC_JOB_ID); | |||
if (job_id_iter != options.end()) { | |||
if (job_id_iter->second.length() > kMaxStrLen) { | |||
GELOGE(PARAM_INVALID,"[Check][JobId]Failed," | |||
GELOGE(PARAM_INVALID, "[Check][JobId]Failed," | |||
"the job_id [%s] string length: %zu > max string length: %d", | |||
job_id_iter->second.c_str(), job_id_iter->second.length(), kMaxStrLen); | |||
REPORT_INPUT_ERROR("E10051", std::vector<std::string>({"id","length"}), | |||
REPORT_INPUT_ERROR("E10051", std::vector<std::string>({"id", "length"}), | |||
std::vector<std::string>({job_id_iter->second, | |||
std::to_string(kMaxStrLen)})); | |||
return FAILED; | |||
@@ -244,7 +244,7 @@ std::string GEGetWarningMsg() { | |||
// Initialize session,which calls innerSession | |||
Session::Session(const std::map<string, string> &options) { | |||
ErrorManager::GetInstance().SetStage(error_message::kInitialize, error_message::kOther); | |||
GELOGT(TRACE_INIT, "Session Constructor start"); | |||
GELOGT(TRACE_INIT, "Start to construct session."); | |||
ErrorManager::GetInstance().GenWorkStreamIdDefault(); | |||
// check init status | |||
@@ -332,7 +332,7 @@ Session::Session(const std::map<AscendString, AscendString> &options) { | |||
// session destructor | |||
Session::~Session() { | |||
ErrorManager::GetInstance().SetStage(error_message::kFinalize, error_message::kFinalize); | |||
GELOGT(TRACE_INIT, "Session Destructor start"); | |||
GELOGT(TRACE_INIT, "Start to destruct session."); | |||
// 0.check init status | |||
if (!g_ge_initialized) { | |||
GELOGW("GE is not yet initialized or is finalized."); | |||
@@ -602,16 +602,16 @@ Status Session::RunGraph(uint32_t graph_id, const std::vector<Tensor> &inputs, s | |||
Status Session::RunGraphWithStreamAsync(uint32_t graph_id, void *stream, const std::vector<Tensor> &inputs, | |||
std::vector<Tensor> &outputs) { | |||
ErrorManager::GetInstance().SetStage(error_message::kModelCompile, error_message::kOther); | |||
GELOGT(TRACE_INIT, "Session run graph with stream async start"); | |||
GELOGT(TRACE_INIT, "Start to run graph with stream async."); | |||
ErrorManager::GetInstance().GenWorkStreamIdBySessionGraph(sessionId_, graph_id); | |||
std::shared_ptr<GELib> instance_ptr = ge::GELib::GetInstance(); | |||
if (instance_ptr == nullptr) { | |||
GELOGE(GE_CLI_GE_NOT_INITIALIZED, | |||
"[Run][Graph]Run graph with stream asyn failed, the GELib instance is nullptr," | |||
"[Run][Graph]Run graph with stream async failed, the GELib instance is nullptr," | |||
"session id = %lu, graph id = %u, stream = %p.", sessionId_, graph_id, stream); | |||
REPORT_INNER_ERROR("E19999", | |||
"Run graph with stream asyn failed, the GELib instance is nullptr" | |||
"Run graph with stream async failed, the GELib instance is nullptr" | |||
"session id = %lu, graph id = %u, stream = %p.", sessionId_, graph_id, stream); | |||
return FAILED; | |||
} | |||
@@ -66,21 +66,21 @@ void DumpOp::SetDynamicModelInfo(const string &dynamic_model_name, const string | |||
static void SetOpMappingLoopAddr(uintptr_t step_id, uintptr_t loop_per_iter, uintptr_t loop_cond, | |||
toolkit::aicpu::dump::OpMappingInfo &op_mapping_info) { | |||
if (step_id != 0) { | |||
GELOGI("step_id exists."); | |||
GELOGI("Exists step_id."); | |||
op_mapping_info.set_step_id_addr(static_cast<uint64_t>(step_id)); | |||
} else { | |||
GELOGI("step_id is null."); | |||
} | |||
if (loop_per_iter != 0) { | |||
GELOGI("loop_per_iter exists."); | |||
GELOGI("Exists loop_per_iter."); | |||
op_mapping_info.set_iterations_per_loop_addr(static_cast<uint64_t>(loop_per_iter)); | |||
} else { | |||
GELOGI("loop_per_iter is null."); | |||
} | |||
if (loop_cond != 0) { | |||
GELOGI("loop_cond exists."); | |||
GELOGI("Exists loop_cond."); | |||
op_mapping_info.set_loop_cond_addr(static_cast<uint64_t>(loop_cond)); | |||
} else { | |||
GELOGI("loop_cond is null."); | |||
@@ -253,7 +253,7 @@ Status DumpOp::LaunchDumpOp() { | |||
} | |||
if (device_id < 0) { | |||
GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "[Check][DeviceId]Failed, device_id %d", device_id); | |||
REPORT_INNER_ERROR("E19999","Check device_id %d failed", device_id); | |||
REPORT_INNER_ERROR("E19999", "Check device_id %d failed", device_id); | |||
return ACL_ERROR_GE_INTERNAL_ERROR; | |||
} | |||
toolkit::aicpu::dump::OpMappingInfo op_mapping_info; | |||
@@ -72,8 +72,7 @@ Status CheckArgsForFracZToNchw(const TransArgs &args) { | |||
if (src_shape.at(kFracZHWC1) != dst_shape.at(kNchwH) * dst_shape.at(kNchwW) * c1 || | |||
src_shape.at(kFracZC0) != c0 || src_shape.at(kFracZNi) != kNiSize || src_shape.at(kFracZN0) != n0) { | |||
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, | |||
"[Check][Shape]Failed to check relationship between src and dst shape, " | |||
"src shape %s, dst shape %s", | |||
"[Check][Shape]Failed to check relationship between src and dst shape, src shape %s, dst shape %s", | |||
ShapeToString(src_shape).c_str(), ShapeToString(dst_shape).c_str()); | |||
REPORT_INNER_ERROR("E19999", "Failed to check relationship between src and dst shape, " | |||
"src shape %s, dst shape %s", | |||
@@ -138,9 +137,9 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, const in | |||
"[Operate][Memory]Failed to copy data from FracZ offset %ld to " | |||
"NCHW[%ld, %ld, %ld, %ld] offset %ld, err-code %d", | |||
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret); | |||
REPORT_CALL_ERROR("E19999","Failed to copy data from FracZ offset %ld to " | |||
REPORT_CALL_ERROR("E19999", "Failed to copy data from FracZ offset %ld to " | |||
"NCHW[%ld, %ld, %ld, %ld] offset %ld, err-code %d", | |||
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret ); | |||
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret); | |||
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; | |||
} | |||
} | |||
@@ -44,23 +44,20 @@ Status CheckArgsForFracZToNhwc(const TransArgs &args) { | |||
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Check][DataType]Failed, " | |||
"shape from FORMAT_FRACTAL_Z to NCHW, invalid data type %s", | |||
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); | |||
REPORT_INNER_ERROR("E19999", "Failed to trans shape from FORMAT_FRACTAL_Z to NCHW, " | |||
"invalid data type %s", | |||
REPORT_INNER_ERROR("E19999", "Failed to trans shape from FORMAT_FRACTAL_Z to NCHW, invalid data type %s", | |||
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); | |||
return ACL_ERROR_GE_DATATYPE_INVALID; | |||
} | |||
if (!CheckShapeValid(src_shape, kFracZDimsNum)) { | |||
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Value is invalid, src shape %s", | |||
ShapeToString(src_shape).c_str()); | |||
REPORT_CALL_ERROR("E19999", "Src shape %s check invalid", | |||
ShapeToString(src_shape).c_str()); | |||
REPORT_CALL_ERROR("E19999", "Src shape %s check invalid", ShapeToString(src_shape).c_str()); | |||
return ACL_ERROR_GE_SHAPE_INVALID; | |||
} | |||
if (!CheckShapeValid(dst_shape, kNhwcDimsNum)) { | |||
GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Value is invalid, dst shape %s", | |||
ShapeToString(dst_shape).c_str()); | |||
REPORT_CALL_ERROR("E19999", "Dst shape %s check invalid", | |||
ShapeToString(dst_shape).c_str()); | |||
REPORT_CALL_ERROR("E19999", "Dst shape %s check invalid", ShapeToString(dst_shape).c_str()); | |||
return ACL_ERROR_GE_SHAPE_INVALID; | |||
} | |||
int64_t c0 = GetCubeSizeByDataType(args.src_data_type); | |||
@@ -138,7 +135,7 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, int size | |||
"[Operate][Memory]Failed to copy data from FracZ offset %ld to " | |||
"NCHW[%ld, %ld, %ld, %ld] offset %ld, err-code %d", | |||
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret); | |||
REPORT_CALL_ERROR("E19999","Failed to copy data from FracZ offset %ld to " | |||
REPORT_CALL_ERROR("E19999", "Failed to copy data from FracZ offset %ld to " | |||
"NCHW[%ld, %ld, %ld, %ld] offset %ld, err-code %d", | |||
src_offset, n_idx, c_idx, h_idx, w_idx, dst_offset, ret); | |||
return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; | |||
@@ -185,7 +182,7 @@ Status FormatTransferFracZNhwc::TransFormat(const TransArgs &args, TransResult & | |||
ShapeToString(args.src_shape).c_str(), | |||
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), | |||
ShapeToString(args.dst_shape).c_str(), total_size, ret); | |||
REPORT_CALL_ERROR("E19999","Failed to get data after trans, src shape %s, data type %s, " | |||
REPORT_CALL_ERROR("E19999", "Failed to get data after trans, src shape %s, data type %s, " | |||
"dst shape %s, memory size %ld, error_code %u", | |||
ShapeToString(args.src_shape).c_str(), | |||
TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), | |||
@@ -112,11 +112,10 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, const in | |||
total_size, ShapeToString(args.dst_shape).c_str(), | |||
TypeUtils::FormatToSerialString(args.src_format).c_str(), | |||
TypeUtils::FormatToSerialString(args.dst_format).c_str()); | |||
REPORT_CALL_ERROR("E19999", "Failed to alloc the memory for dst buf %ld, " | |||
"shape %s when trans format from %s to %s", | |||
total_size, ShapeToString(args.dst_shape).c_str(), | |||
TypeUtils::FormatToSerialString(args.src_format).c_str(), | |||
TypeUtils::FormatToSerialString(args.dst_format).c_str()); | |||
REPORT_CALL_ERROR("E19999", "Failed to alloc the memory for dst buf %ld, shape %s when trans format from %s to %s", | |||
total_size, ShapeToString(args.dst_shape).c_str(), | |||
TypeUtils::FormatToSerialString(args.src_format).c_str(), | |||
TypeUtils::FormatToSerialString(args.dst_format).c_str()); | |||
return ACL_ERROR_GE_MEMORY_ALLOCATION; | |||
} | |||
@@ -47,7 +47,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY Status TransFormat(const TransArg | |||
GELOGE(ACL_ERROR_GE_PARAM_INVALID, "[Check][Shape]Failed, input data is null " | |||
"or shape size not euqal to 0, src_shape %s", | |||
ShapeToString(args.src_shape).c_str()); | |||
REPORT_CALL_ERROR("E19999","Failed to check shape, input data is null " | |||
REPORT_CALL_ERROR("E19999", "Failed to check shape, input data is null " | |||
"or shape size not equal to 0, src_shape %s", | |||
ShapeToString(args.src_shape).c_str()); | |||
return ACL_ERROR_GE_PARAM_INVALID; | |||
@@ -79,7 +79,8 @@ Status ModelHelper::SaveModelPartition(std::shared_ptr<OmFileSaveHelper> &om_fil | |||
Status ModelHelper::SaveSizeToModelDef(const GeModelPtr &ge_model) { | |||
vector<int64_t> om_info; | |||
auto ge_model_weight = ge_model->GetWeight(); | |||
GELOGD("SaveSizeToModelDef weight_data_size is %zu, %p", ge_model_weight.GetSize(), ge_model_weight.GetData()); | |||
GELOGD("SaveSizeToModelDef weight_data_size is %zu, ge_model_weight data is %p", ge_model_weight.GetSize(), | |||
ge_model_weight.GetData()); | |||
om_info.push_back(ge_model_weight.GetSize()); | |||
TBEKernelStore tbe_kernel_store = ge_model->GetTBEKernelStore(); | |||
@@ -284,7 +285,7 @@ Status ModelHelper::SaveAllModelPartiton(std::shared_ptr<OmFileSaveHelper>& om_f | |||
if (SaveModelWeights(om_file_save_helper, ge_model, model_index) != SUCCESS) { | |||
GELOGE(FAILED, "[Save][ModelWeights]Failed, model %s, model index %zu", | |||
ge_model->GetName().c_str(), model_index); | |||
REPORT_CALL_ERROR("E19999","ModelHelper save mode weights failed, model %s, model index %zu", | |||
REPORT_CALL_ERROR("E19999", "ModelHelper save mode weights failed, model %s, model index %zu", | |||
ge_model->GetName().c_str(), model_index); | |||
return FAILED; | |||
} | |||
@@ -441,7 +442,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmRoo | |||
GELOGE(INTERNAL_ERROR, "[Save][AllModelPartition]Failed, model name %s, cur_index %zu", | |||
model_name.c_str(), cur_index); | |||
REPORT_CALL_ERROR("E19999", "Save all model %s partition failed, cur_index %zu", | |||
model_name.c_str(), cur_index); | |||
model_name.c_str(), cur_index); | |||
return INTERNAL_ERROR; | |||
} | |||
} | |||
@@ -459,7 +460,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmRoo | |||
GELOGE(FAILED, "[Save][Model]OmFileSaveHelper save model eturn fail, output_file %s", | |||
output_file.c_str()); | |||
REPORT_CALL_ERROR("E19999", "OmFileSaveHelper save model return fail, output_file %s", | |||
output_file.c_str()); | |||
output_file.c_str()); | |||
return FAILED; | |||
} | |||
return SUCCESS; | |||
@@ -601,7 +602,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadModel(c | |||
FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadRootModel(const ge::ModelData &model_data) { | |||
if (model_data.model_data == nullptr || model_data.model_len == 0) { | |||
GELOGE(ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID, "[Load][RootModel] " | |||
"Model_data is nullptr or model_data_size is 0"); | |||
"Model_data is nullptr or model data is empty."); | |||
REPORT_INNER_ERROR("E19999", "Load root model failed, model_data is nullptr or its size is 0"); | |||
return ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID; | |||
} | |||
@@ -628,7 +629,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadRootMod | |||
//model verison 1.0 file header does not have model_num member | |||
is_unknown_shape_model_ = file_header_->version >= ge::MODEL_VERSION && | |||
file_header_->model_num > kStatiOmFileModelNum; | |||
GELOGD("cur om model is ge root model or no %d, model version %u", is_unknown_shape_model_, file_header_->version); | |||
GELOGD("Cur om model is ge root model or no %d, model version %u", is_unknown_shape_model_, file_header_->version); | |||
OmFileLoadHelper om_load_helper; | |||
if (is_unknown_shape_model_) { | |||
@@ -650,7 +651,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadRootMod | |||
GELOGE(status, "[Generate][GERootModel]Failed"); | |||
return status; | |||
} | |||
GELOGD("in ModelHelper::LoadRootModel, is_assign_model_ is setted to true!"); | |||
GELOGD("In ModelHelper::LoadRootModel, is_assign_model_ is setted to true!"); | |||
is_assign_model_ = true; | |||
return SUCCESS; | |||
} | |||
@@ -790,7 +791,7 @@ Status ModelHelper::LoadWeights(OmFileLoadHelper &om_load_helper) { | |||
if (om_load_helper.GetModelPartition(ModelPartitionType::WEIGHTS_DATA, partition) != SUCCESS) { | |||
GELOGE(FAILED, "[Get][ModelWeightPartition]Failed, GetWeight size:%u", partition.size); | |||
REPORT_CALL_ERROR("E19999", "[Get][ModelPartition]Failed, GetWeight size:%u", | |||
partition.size); | |||
partition.size); | |||
return FAILED; | |||
} | |||
ge::Buffer weight = ge::Buffer::CopyFrom(partition.data, partition.size); | |||
@@ -805,7 +806,7 @@ Status ModelHelper::LoadWeights(OmFileLoadHelper &om_load_helper, GeModelPtr &cu | |||
if (om_load_helper.GetModelPartition(ModelPartitionType::WEIGHTS_DATA, partition, mode_index) != SUCCESS) { | |||
GELOGE(FAILED, "[Get][ModelPartition]Failed, GetWeight size:%u", partition.size); | |||
REPORT_CALL_ERROR("E19999", "[Get][ModelPartition]Failed, GetWeight size:%u", | |||
partition.size); | |||
partition.size); | |||
return FAILED; | |||
} | |||
ge::Buffer weight = ge::Buffer::CopyFrom(partition.data, partition.size); | |||
@@ -444,17 +444,16 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status | |||
OpUtils::GetShapeDataFromConstTensor(const ConstGeTensorPtr &tensor, DataType type, std::vector<int64_t> &dims) { | |||
if (tensor == nullptr) { | |||
GELOGE(PARAM_INVALID, "[Check][Param]Input tensor is nullptr"); | |||
REPORT_INNER_ERROR("E19999","Input tensor is nullptr"); | |||
REPORT_INNER_ERROR("E19999", "Input tensor is nullptr"); | |||
return PARAM_INVALID; | |||
} | |||
// If the tensor data is a vector, the shape dimension must be 1 | |||
if (tensor->GetTensorDesc().GetShape().GetDims().size() > 1) { | |||
GELOGE(PARAM_INVALID, "[Check][Param]The dimension of the input tensor shape " | |||
"cannot be more than 1, it is %zu", | |||
GELOGE(PARAM_INVALID, "[Check][Param]The dimension of the input tensor shape cannot be more than 1, it is %zu", | |||
tensor->GetTensorDesc().GetShape().GetDims().size()); | |||
REPORT_CALL_ERROR("E19999", "The dimension of the input tensor shape %zu invalid, " | |||
"more than 1", tensor->GetTensorDesc().GetShape().GetDims().size()); | |||
REPORT_CALL_ERROR("E19999", "The dimension of the input tensor shape %zu invalid, more than 1", | |||
tensor->GetTensorDesc().GetShape().GetDims().size()); | |||
return PARAM_INVALID; | |||
} | |||
@@ -473,8 +472,8 @@ OpUtils::GetShapeDataFromConstTensor(const ConstGeTensorPtr &tensor, DataType ty | |||
dims.push_back(shape_data[i]); | |||
} | |||
} else { | |||
GELOGE(PARAM_INVALID, "[Check][DataType]Invalid, type only can be DT_INT32 or DT_INT64, " | |||
"type is %s", TypeUtils::DataTypeToSerialString(type).c_str()); | |||
GELOGE(PARAM_INVALID, "[Check][DataType]Invalid, type only can be DT_INT32 or DT_INT64, type is %s", | |||
TypeUtils::DataTypeToSerialString(type).c_str()); | |||
REPORT_INNER_ERROR("E19999", "Data type %s check invalid, only can be DT_INT32 or DT_INT64", | |||
TypeUtils::DataTypeToSerialString(type).c_str()); | |||
return PARAM_INVALID; | |||
@@ -304,7 +304,7 @@ std::string DNNEngineManager::GetHostCpuEngineName(const std::vector<OpInfo> &op | |||
GELOGE(FAILED, "[Get][HostCpuEngineName]Failed, HostCpuEngine not support [%s, %s]", | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
REPORT_INNER_ERROR("E19999", "Get HostCpuEngineName failed, HostCpuEngine not support [%s, %s]", | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
return ""; | |||
} | |||
@@ -436,7 +436,7 @@ Status DNNEngineManager::ParserEngineMessage(const json engines_json, const std: | |||
GELOGE(FAILED, "[Check][Param]There are the same engine %s message in the json file", | |||
engine_id.c_str()); | |||
REPORT_INNER_ERROR("E19999", "There are the same engine %s message in the json file", | |||
engine_id.c_str()); | |||
engine_id.c_str()); | |||
return FAILED; | |||
} | |||
engines.emplace(engine_id, engine_conf_ptr); | |||
@@ -684,7 +684,8 @@ Status GraphMemoryAssigner::AssignContinuousInputMemory(const ge::NodePtr &node, | |||
bool is_allocated_first_input = is_continuous_input_allocated && (in_data_anchor->GetIdx() == 0); | |||
if (is_allocated_first_input) { | |||
std::map<int32_t, int32_t> out2ins; | |||
GE_CHK_STATUS_RET(TryGetNodeRefIndexes(node, out2ins), "[Get][RefIndexes]fail for node: %s", node->GetName().c_str()); | |||
GE_CHK_STATUS_RET(TryGetNodeRefIndexes(node, out2ins), "[Get][RefIndexes]fail for node: %s", | |||
node->GetName().c_str()); | |||
// output is beginning offset, set offset for input; only support this case now | |||
if ((out2ins.size() == 1) && (out2ins.begin()->second == 0) && (reverse_refresh)) { | |||
auto peer_output_offset = output_list.at(peer_out_data_anchor->GetIdx()); | |||
@@ -246,7 +246,8 @@ Status ModelBuilder::SetInputOutputDesc() { | |||
} | |||
// if user set input node format ND, the expected node for data and netoutput format is ND in | |||
// final graph. | |||
if ((compute_graph_->GetParentGraph() == nullptr) && (GetLocalOmgContext().format == domi::DOMI_TENSOR_ND) && (!node_op_desc->HasAttr("_is_single_op")) && | |||
if ((compute_graph_->GetParentGraph() == nullptr) && (GetLocalOmgContext().format == domi::DOMI_TENSOR_ND) && | |||
(!node_op_desc->HasAttr("_is_single_op")) && | |||
((node_op_desc->GetType() == DATA_TYPE) || (node_op_desc->GetType() == NETOUTPUT))) { | |||
auto inputDescsPtr = node_op_desc->GetAllInputsDescPtr(); | |||
auto outputDescsPtr = node_op_desc->GetAllOutputsDescPtr(); | |||
@@ -704,7 +704,7 @@ Status GraphExecutor::GetCurShape(const uint32_t model_id, std::vector<int64_t> | |||
} | |||
Status GraphExecutor::GetOpAttr(uint32_t model_id, const std::string &op_name, const std::string &attr_name, | |||
std::string &attr_value) { | |||
std::string &attr_value) { | |||
auto model_manager = ge::ModelManager::GetInstance(); | |||
GE_CHECK_NOTNULL(model_manager); | |||
Status ret = model_manager->GetOpAttr(model_id, op_name, attr_name, attr_value); | |||
@@ -489,7 +489,7 @@ Status VarManager::UpdateVarMemSize(rtMemType_t memory_type, int64_t mem_size) { | |||
mem_resource = MemResource::BuildMemResourceFromType(memory_type); | |||
if (mem_resource == nullptr) { | |||
REPORT_CALL_ERROR("E19999", "memory_type:%d invalid or New MemResource fail, session_id:%lu", | |||
memory_type, session_id_); | |||
memory_type, session_id_); | |||
GELOGE(ge::INTERNAL_ERROR, "[Alloc][MemResource] failed, memory_type:%u, session_id:%lu", | |||
memory_type, session_id_); | |||
return ge::INTERNAL_ERROR; | |||
@@ -275,7 +275,8 @@ Status HcomOmeUtil::GetHcclOperationType(const ge::ConstOpDescPtr &op_desc, Hccl | |||
"check invalid", ATTR_HOROVOD_ATTR_REDUCE_TYPE.c_str(), | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str(), horovod_op_type); | |||
GELOGE(PARAM_INVALID, "[Check][Param] Attr:%s in Op:%s(%s), horovod_op_type value:%ld is not support now", | |||
ATTR_HOROVOD_ATTR_REDUCE_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), horovod_op_type); | |||
ATTR_HOROVOD_ATTR_REDUCE_TYPE.c_str(), op_desc->GetName().c_str(), op_desc->GetType().c_str(), | |||
horovod_op_type); | |||
return PARAM_INVALID; | |||
} | |||
op_type = iter->second; | |||
@@ -451,7 +451,7 @@ Status AtomicAddrCleanPass::CompileUnknownGraphOp(const vector<NodePtr> &atomic_ | |||
GE_TIMESTAMP_ADD(UnknownGraphCompileOp); | |||
if (ret != ge::SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Call CompileOp failed, kernel_lib_name:%s, ret:%d", | |||
kernel_lib_name.c_str(), ret); | |||
kernel_lib_name.c_str(), ret); | |||
GELOGE(ret, "Compile atomic op failed, kernel lib name is %s", kernel_lib_name.c_str()); | |||
return ret; | |||
} | |||
@@ -29,7 +29,8 @@ Status AttachStreamLabelPass::Run(ComputeGraphPtr graph) { | |||
std::map<NodePtr, NodePtr> branch_head_nodes; | |||
FindNodes(graph, need_label_nodes, enter_nodes, branch_head_nodes); | |||
for (const auto &node : need_label_nodes) { | |||
GE_CHK_STATUS_RET(UpdateCondBranch(node, branch_head_nodes), "Update cond branch failed, start node:%s.", node->GetName().c_str()); | |||
GE_CHK_STATUS_RET(UpdateCondBranch(node, branch_head_nodes), "Update cond branch failed, start node:%s.", | |||
node->GetName().c_str()); | |||
} | |||
GE_CHK_STATUS_RET(UpdateEnterNode(enter_nodes), "UpdateEnterNode failed."); | |||
@@ -62,7 +62,7 @@ Status BitcastPass::CheckDstDataType(const OpDescPtr op_desc, ge::DataType &dst_ | |||
if (!ge::AttrUtils::GetDataType(op_desc, kAttrNameType, dst_data_type)) { | |||
REPORT_CALL_ERROR("E19999", "Get Attr:%s of op:%s(%s) failed", | |||
kAttrNameType, op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
kAttrNameType, op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
GELOGE(PARAM_INVALID, "Node failed to get attribute type."); | |||
return PARAM_INVALID; | |||
} | |||
@@ -166,7 +166,7 @@ Status CondPass::GetCondInfoForWhile(const NodePtr &node, ComputeGraphPtr &graph | |||
if (iter == subgraph_names_to_index.end()) { | |||
REPORT_INNER_ERROR("E19999", "subgraph name:%s not exist in SubgraphNameIndexes map of op:%s(%s), " | |||
"check invalid", ATTR_NAME_WHILE_COND.c_str(), | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
GELOGE(FAILED, "Get cond_graph index failed, while_node:%s.", node->GetName().c_str()); | |||
return FAILED; | |||
} | |||
@@ -65,13 +65,13 @@ Status CtrlEdgeTransferPass::Run(ge::ComputeGraphPtr graph) { | |||
for (auto &in_control_node : n->GetInControlNodes()) { | |||
GE_CHECK_NOTNULL(in_control_node); | |||
GE_CHK_GRAPH_STATUS_RET(ge::GraphUtils::RemoveEdge(in_control_node->GetOutControlAnchor(), | |||
n->GetInControlAnchor()), "remove edge failed"); | |||
n->GetInControlAnchor()), "remove edge failed"); | |||
for (auto &out_node : n->GetOutNodes()) { | |||
if (out_node == nullptr) { | |||
continue; | |||
} | |||
GE_CHK_GRAPH_STATUS_RET(ge::GraphUtils::AddEdge(in_control_node->GetOutControlAnchor(), | |||
out_node->GetInControlAnchor()), "add edge failed."); | |||
out_node->GetInControlAnchor()), "add edge failed."); | |||
} | |||
} | |||
} | |||
@@ -340,13 +340,13 @@ Status HcclMemcpyPass::InsertAssignAfterBroadcastIfNeed(const ComputeGraphPtr &g | |||
} | |||
ret = assign_out_control_anchor->LinkTo(in_data_anchor->GetOwnerNode()->GetInControlAnchor()); | |||
if (ret != SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", | |||
"Op:%s(%s) out index:%d link to op:%s(%s) in index:%d failed", | |||
assign_out_control_anchor->GetOwnerNode()->GetName().c_str(), | |||
assign_out_control_anchor->GetOwnerNode()->GetType().c_str(), assign_out_control_anchor->GetIdx(), | |||
in_data_anchor->GetOwnerNode()->GetName().c_str(), | |||
in_data_anchor->GetOwnerNode()->GetType().c_str(), | |||
in_data_anchor->GetIdx()); | |||
REPORT_CALL_ERROR("E19999", "Op:%s(%s) out index:%d link to op:%s(%s) in index:%d failed", | |||
assign_out_control_anchor->GetOwnerNode()->GetName().c_str(), | |||
assign_out_control_anchor->GetOwnerNode()->GetType().c_str(), | |||
assign_out_control_anchor->GetIdx(), | |||
in_data_anchor->GetOwnerNode()->GetName().c_str(), | |||
in_data_anchor->GetOwnerNode()->GetType().c_str(), | |||
in_data_anchor->GetIdx()); | |||
GELOGE(INTERNAL_ERROR, "The op %s link control anchor %s fail.", | |||
assign_out_control_anchor->GetOwnerNode()->GetName().c_str(), | |||
in_data_anchor->GetOwnerNode()->GetName().c_str()); | |||
@@ -78,8 +78,6 @@ Status InplaceSupportCheckPass::Run(NodePtr &node) { | |||
AddRePassNode(node); | |||
break; | |||
} | |||
GELOGD("InplaceSupportCheckPass success"); | |||
return SUCCESS; | |||
} | |||
} // namespace ge |
@@ -29,7 +29,7 @@ Status MarkGraphUnknownStatusPass::Run(ComputeGraphPtr graph) { | |||
bool forced_unknown = false; | |||
for (const auto &node : graph->GetDirectNode()) { | |||
GE_CHK_GRAPH_STATUS_RET(ge::NodeUtils::GetNodeUnknownShapeStatus(*node, is_unknown_shape), | |||
"Get node[%s] shape status failed!", node->GetName().c_str()); | |||
"Get node[%s] shape status failed!", node->GetName().c_str()); | |||
if (is_unknown_shape) { | |||
break; | |||
} | |||
@@ -1020,7 +1020,7 @@ Status MultiBatchClonePass::SetShapeToData(const std::vector<int64_t> &shapes, c | |||
if (!IsGetNextType(data)) { | |||
if (NodeUtils::UpdateInputShape(*data, kDataInIndex, data_shape) != GRAPH_SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Update input desc shape to op:%s(%s) failed, index:%u", | |||
data->GetName().c_str(), data->GetType().c_str(), kDataInIndex); | |||
data->GetName().c_str(), data->GetType().c_str(), kDataInIndex); | |||
GELOGE(INTERNAL_ERROR, "Failed to update input shape for data %s", data->GetName().c_str()); | |||
return INTERNAL_ERROR; | |||
} | |||
@@ -759,7 +759,7 @@ Status MultiBatchPass::AttachStreamLabel(uint32_t batch_idx, const std::string & | |||
GELOGD("Attach stream_label %s to node %s.", stream_label.c_str(), cur_desc->GetName().c_str()); | |||
if (SetStreamLabel(cur_node, stream_label) != SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Set stream_label:%s to op:%s(%s) failed", | |||
stream_label.c_str(), cur_node->GetName().c_str(), cur_node->GetType().c_str()); | |||
stream_label.c_str(), cur_node->GetName().c_str(), cur_node->GetType().c_str()); | |||
GELOGE(FAILED, "Set stream_label failed, node:%s.", cur_node->GetName().c_str()); | |||
return FAILED; | |||
} | |||
@@ -73,7 +73,7 @@ Status NetOutputPass::GetRetvalOutputInfo(const ge::NodePtr &node, | |||
if (iter != targets_.end()) { | |||
targets_.erase(iter); | |||
targets_.insert(src_node_ptr); | |||
GELOGI("node [%s] is in user def targets, do not output result to user!", node->GetName().c_str()); | |||
GELOGI("Node [%s] is in user def targets, do not output result to user!", node->GetName().c_str()); | |||
} | |||
is_include_special_node_ = true; | |||
return SUCCESS; | |||
@@ -105,7 +105,7 @@ Status NetOutputPass::GetOutputNode(const ge::ComputeGraphPtr &graph, std::vecto | |||
for (auto &ele : graph->GetGraphOutNodesInfo()) { | |||
auto iter = targets_.find(ele.first); | |||
if (iter != targets_.end()) { | |||
GELOGI("user set out node [%s] is found in user def targets, out node is prio!", ele.first->GetName().c_str()); | |||
GELOGI("User set out node [%s] is found in user def targets, out node is prior!", ele.first->GetName().c_str()); | |||
targets_.erase(iter); | |||
} | |||
@@ -213,7 +213,7 @@ Status NetOutputPass::UpdateNetOutputDesc(const ge::NodePtr &net_output) { | |||
std::vector<bool> is_input_const; | |||
for (const auto &in_anchor : net_output->GetAllInDataAnchors()) { | |||
GE_CHECK_NOTNULL(in_anchor); | |||
uint32_t index = static_cast<uint32_t>(in_anchor->GetIdx()); | |||
auto index = static_cast<uint32_t>(in_anchor->GetIdx()); | |||
if (index >= net_output_desc->GetAllInputsDesc().size()) { | |||
REPORT_INNER_ERROR("E19999", "Node:%s(%s) has in_anchor index:%u >= its input desc num:%zu, check invalid", | |||
net_output_desc->GetName().c_str(), net_output_desc->GetType().c_str(), index, | |||
@@ -369,10 +369,9 @@ Status NetOutputPass::UnLinkDataAnchorOfNetoutput(const ge::ComputeGraphPtr &gra | |||
if (!CheckNodeIsInOutputNodes(graph, node)) { | |||
ret = in_data_anchor->Unlink(peer_out_anchor); | |||
if (ret != SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", | |||
"Op:%s(%s) out index:%d unlink from op:%s(%s) in index:%d failed", | |||
net_out_node->GetName().c_str(), net_out_node->GetType().c_str(), in_data_anchor->GetIdx(), | |||
node->GetName().c_str(), node->GetType().c_str(), peer_out_anchor->GetIdx()); | |||
REPORT_CALL_ERROR("E19999", "Op:%s(%s) out index:%d unlink from op:%s(%s) in index:%d failed", | |||
net_out_node->GetName().c_str(), net_out_node->GetType().c_str(), in_data_anchor->GetIdx(), | |||
node->GetName().c_str(), node->GetType().c_str(), peer_out_anchor->GetIdx()); | |||
GELOGE(INTERNAL_ERROR, "Unlink peer_out_anchor fail!"); | |||
return ret; | |||
} | |||
@@ -565,7 +564,7 @@ Status NetOutputPass::AddNetOutputNodeToGraph(const ge::ComputeGraphPtr &graph, | |||
GELOGI("[NETOUTPUT PASS] Add net output node succeed"); | |||
return SUCCESS; | |||
} | |||
GELOGI("[NETOUTPUT PASS] Output node size:%lu.", output_nodes_info.size()); | |||
GELOGI("[NETOUTPUT PASS] Output node size:%zu.", output_nodes_info.size()); | |||
if (output_nodes_info.empty()) { | |||
// because retval node is contained by output_nodes_info, here means targets is non-empty | |||
output_node = graph->AddNode(net_output_desc); | |||
@@ -170,7 +170,7 @@ Status PassUtils::SetOutNodeWeight(const OutDataAnchorPtr &out_data_anchor, cons | |||
// restore control inputs to dynamically added constant ops, if any | |||
for (const auto &src_out_control_anchor : src_out_control_anchors) { | |||
GE_CHK_GRAPH_STATUS_RET(GraphUtils::AddEdge(src_out_control_anchor, dynamic_const_node->GetInControlAnchor()), | |||
"add edge failed"); | |||
"add edge failed"); | |||
} | |||
} | |||
@@ -51,7 +51,7 @@ std::vector<std::pair<NodePtr, InDataAnchorPtr>> GetOutDataNodesByIndex(const No | |||
auto out_anchor = node->GetOutDataAnchor(index); | |||
if (out_anchor == nullptr) { | |||
REPORT_INNER_ERROR("E19999", "Node:%s(%s) has no index:%d out data anchor, check invalid", | |||
node->GetName().c_str(), node->GetType().c_str(), index); | |||
node->GetName().c_str(), node->GetType().c_str(), index); | |||
GELOGE(PARAM_INVALID, "Failed to get out data nodes of index %d from node %s, the anchor does not exists", index, | |||
node->GetName().c_str()); | |||
return {}; | |||
@@ -1077,9 +1077,9 @@ graphStatus TransOpWithoutReshapeFusionPass::RelinkControlEdge(const int index, | |||
peer_in_anchor->GetOwnerNode()->GetName().c_str()); | |||
if (GraphUtils::AddEdge(new_trans_nodes.back()->GetOutControlAnchor(), peer_in_anchor) != GRAPH_SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Add control edge between op:%s(%s) and op:%s(%s) failed", | |||
new_trans_nodes.back()->GetName().c_str(), new_trans_nodes.back()->GetType().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetName().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetType().c_str()); | |||
new_trans_nodes.back()->GetName().c_str(), new_trans_nodes.back()->GetType().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetName().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetType().c_str()); | |||
return GRAPH_FAILED; | |||
} | |||
} | |||
@@ -1103,9 +1103,9 @@ graphStatus TransOpWithoutReshapeFusionPass::RelinkControlEdge(const int index, | |||
peer_in_anchor->GetOwnerNode()->GetName().c_str()); | |||
if (GraphUtils::AddEdge(new_trans_nodes.back()->GetOutControlAnchor(), peer_in_anchor) != GRAPH_SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Add control edge between op:%s(%s) and op:%s(%s) failed", | |||
new_trans_nodes.back()->GetName().c_str(), new_trans_nodes.back()->GetType().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetName().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetType().c_str()); | |||
new_trans_nodes.back()->GetName().c_str(), new_trans_nodes.back()->GetType().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetName().c_str(), | |||
peer_in_anchor->GetOwnerNode()->GetType().c_str()); | |||
return GRAPH_FAILED; | |||
} | |||
} | |||
@@ -87,10 +87,10 @@ Status ByPassTransNode(NodePtr &trans_node, NodePtr &ref_node) { | |||
ret = GraphUtils::AddEdge(prev_trans_node_out_anchor, ref_in_anchor); | |||
if (ret != GRAPH_SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Add edge between op:%s(%s)(index:%d) and op:%s(%s)(index:0) failed", | |||
prev_trans_node_out_anchor->GetOwnerNode()->GetName().c_str(), | |||
prev_trans_node_out_anchor->GetOwnerNode()->GetType().c_str(), | |||
prev_trans_node_out_anchor->GetIdx(), | |||
ref_node->GetName().c_str(), ref_node->GetType().c_str()); | |||
prev_trans_node_out_anchor->GetOwnerNode()->GetName().c_str(), | |||
prev_trans_node_out_anchor->GetOwnerNode()->GetType().c_str(), | |||
prev_trans_node_out_anchor->GetIdx(), | |||
ref_node->GetName().c_str(), ref_node->GetType().c_str()); | |||
GELOGE(INTERNAL_ERROR, | |||
"Failed to add edge between ref node %s " | |||
"and the prev node of trans node %s", | |||
@@ -241,7 +241,7 @@ NodePtr CreateTransNode(const std::string &name, const std::string &node_type, c | |||
ret = op_desc->AddInputDesc(shape_desc->GetOutputDesc(0)); | |||
if (ret != GRAPH_SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Add input desc into op:%s(%s) failed", | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | |||
GELOGE(INTERNAL_ERROR, "Failed to add the first input for reshape %s", name.c_str()); | |||
return nullptr; | |||
} | |||
@@ -837,7 +837,7 @@ Status ProcessInputNC1HWC0DynShape(NodePtr &node_ptr, bool &is_dynamic_batch, No | |||
old_shape = switchn_output->GetShape(); | |||
if (ModifyFormatAndShapeForSingleTensor(switchn_output) != SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Modify format and shape of output:%u in op:%s(%s) failed", i, | |||
switchn_op_desc->GetName().c_str(), switchn_op_desc->GetType().c_str()); | |||
switchn_op_desc->GetName().c_str(), switchn_op_desc->GetType().c_str()); | |||
GELOGE(INTERNAL_ERROR, "modify format and shape failed"); | |||
return FAILED; | |||
} | |||
@@ -1266,8 +1266,8 @@ Status MultiBatchGraphCopyer::LinkNodeToMerge(const NodePtr &node, int out_index | |||
auto ret = GraphUtils::AddEdge(src_node->GetOutDataAnchor(out_index), merge->GetInDataAnchor(i)); | |||
if (ret != GRAPH_SUCCESS) { | |||
REPORT_CALL_ERROR("E19999", "Add edge between op:%s(%s)(index:%d) and op:%s(%s)(index:%zu) failed", | |||
src_node->GetName().c_str(), src_node->GetType().c_str(), out_index, | |||
merge->GetName().c_str(), merge->GetType().c_str(), i); | |||
src_node->GetName().c_str(), src_node->GetType().c_str(), out_index, | |||
merge->GetName().c_str(), merge->GetType().c_str(), i); | |||
GELOGE(INTERNAL_ERROR, | |||
"Failed to add edge between copyed node %s(%d) to inserted merge node %s(%zu), error-code %u", | |||
copyed_nodes[i]->GetName().c_str(), out_index, merge->GetName().c_str(), i, ret); | |||
@@ -420,9 +420,8 @@ Status AiCoreOpTask::CalcTilingInfo(const NodePtr &node, OpRunInfo &tiling_info) | |||
} | |||
Status AiCoreOpTask::UpdateArgs(TaskContext &task_context) { | |||
size_t expected_arg_count = task_context.NumInputs() + task_context.NumOutputs() + | |||
task_context.NumWorkspaces() | |||
- output_indices_to_skip_.size(); | |||
size_t expected_arg_count = task_context.NumInputs() + task_context.NumOutputs() + task_context.NumWorkspaces() - | |||
output_indices_to_skip_.size(); | |||
if (tiling_buffer_ != nullptr) { | |||
++expected_arg_count; | |||
} | |||
@@ -61,6 +61,6 @@ class RtsTaskFactory { | |||
REGISTER_RTS_TASK_CREATOR_UNIQ_HELPER(__COUNTER__, task_type, task_clazz) | |||
#define REGISTER_RTS_TASK_CREATOR_UNIQ_HELPER(ctr, type, clazz) \ | |||
RtsTaskFactory::RtsTaskRegistrar g_##type##_Creator##ctr(type, []()-> RtsNodeTaskPtr { return MakeShared<clazz>(); }) | |||
RtsTaskFactory::RtsTaskRegistrar g_##type##_Creator##ctr(type, []()->RtsNodeTaskPtr { return MakeShared<clazz>(); }) | |||
#endif // GE_HYBRID_NODE_EXECUTOR_RTS_TASK_FACTORY_H_ |
@@ -37,6 +37,9 @@ const size_t kMaxNDDimNum = 4; | |||
const size_t kMinNDDimNum = 1; | |||
const size_t kSquareBracketsSize = 2; | |||
const size_t kRangePairSize = 2; | |||
const size_t kShapeRangeSize = 2; | |||
const size_t kShapeRangeStrIndex = 2; | |||
const size_t kShapeRangeStrSize = 3; | |||
// datatype/formats from user to GE, Unified to util interface file later | |||
const std::map<std::string, ge::DataType> kOutputTypeSupportDatatype = { | |||
{"FP32", ge::DT_FLOAT}, {"FP16", ge::DT_FLOAT16}, {"UINT8", ge::DT_UINT8}}; | |||
@@ -434,7 +437,7 @@ Status ParseInputShapeRange(const std::string &shape_range, | |||
std::vector<std::vector<std::pair<int64_t, int64_t>>> &range) { | |||
GELOGD("Input shape range %s", shape_range.c_str()); | |||
if (shape_range.size() < 2) { | |||
if (shape_range.size() < kShapeRangeSize) { | |||
REPORT_INPUT_ERROR("E10048", std::vector<std::string>({"shape_range", "reason", "sample"}), | |||
std::vector<std::string>({shape_range, kInputShapeRangeSizeInvalid, kInputShapeRangeSample4})); | |||
GELOGE(PARAM_INVALID, "[Parse][ShapeRange] str:%s invalid, reason: %s, correct sample is %s.", | |||
@@ -451,7 +454,7 @@ Status ParseInputShapeRange(const std::string &shape_range, | |||
return PARAM_INVALID; | |||
} | |||
for (auto &shape_range_str : shape_range_set) { | |||
if (shape_range_str.size() < 3) { | |||
if (shape_range_str.size() < kShapeRangeStrSize) { | |||
// shape_range_str should be "[2~3,1" | |||
// or ",[2~3,1". because we should trim '[' or ',[' | |||
// so shape_range_str.size() < 3 is invalid | |||
@@ -462,7 +465,7 @@ Status ParseInputShapeRange(const std::string &shape_range, | |||
shape_range_str = shape_range_str.substr(1, shape_range_str.size()); | |||
} | |||
if (ge::StringUtils::StartWith(shape_range_str, ",")) { | |||
shape_range_str = shape_range_str.substr(2, shape_range_str.size()); | |||
shape_range_str = shape_range_str.substr(kShapeRangeStrIndex, shape_range_str.size()); | |||
} | |||
// parse shape_range of single input. eg. "1~20,3,3~6,-1" | |||