| @@ -54,6 +54,7 @@ constexpr int kDumpJsonIndent = 2; | |||||
| constexpr int kShapeRangePairSize = 2; | constexpr int kShapeRangePairSize = 2; | ||||
| constexpr int kShapeRangeLow = 0; | constexpr int kShapeRangeLow = 0; | ||||
| constexpr int kShapeRangeHigh = 1; | constexpr int kShapeRangeHigh = 1; | ||||
| constexpr int kMaxFileNameLen = 128; | |||||
| map<string, GeAttrValue::ValueType> kAttrTypeDict = { | map<string, GeAttrValue::ValueType> kAttrTypeDict = { | ||||
| {"bool", GeAttrValue::VT_BOOL}, | {"bool", GeAttrValue::VT_BOOL}, | ||||
| @@ -363,8 +364,12 @@ Status SingleOpParser::ConvertToBuildParam(int index, | |||||
| return PARAM_INVALID; | return PARAM_INVALID; | ||||
| } | } | ||||
| file_name << kFileSuffix; | |||||
| build_param.file_name = file_name.str(); | build_param.file_name = file_name.str(); | ||||
| if (build_param.file_name.length() > kMaxFileNameLen) { | |||||
| GELOGI("Trim file name for it is too long, origin file name = %s", build_param.file_name.c_str()); | |||||
| build_param.file_name = build_param.file_name.substr(0, kMaxFileNameLen); | |||||
| } | |||||
| build_param.file_name += kFileSuffix; | |||||
| build_param.op_desc.reset(op_desc.release()); | build_param.op_desc.reset(op_desc.release()); | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||