common formats log optimize

pull/1393/head
liyihan2@huawei.com 4 years ago
parent 1e610379db
commit 6f08d5f0bb

@ -334,27 +334,23 @@ Status FormatTransferFractalNz::TransShape(Format src_format, const ShapeVector
Format dst_format, ShapeVector &dst_shape) {
if (!IsDataTypeSupport(data_type)) {
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID,
"[Check][Datatype]Failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(),
ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
"[Check][Datatype]Failed, trans format from %s to %s, src shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(src_format).c_str(), TypeUtils::FormatToSerialString(dst_format).c_str(),
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str());
REPORT_INNER_ERROR("E19999",
"Check datatype failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(),
ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
"Check datatype failed, trans format from %s to %s, src shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(src_format).c_str(),TypeUtils::FormatToSerialString(dst_format).c_str(),
ShapeToString(src_shape).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str());
return ACL_ERROR_GE_DATATYPE_INVALID;
}
if (!CheckShape(src_format, src_shape)) {
GELOGE(ACL_ERROR_GE_SHAPE_INVALID,
"[Check][Shape]Failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(),
ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
REPORT_INNER_ERROR("E19999", "Check shape failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).c_str(),
ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
"[Check][Shape]Failed, trans format from %s to %s, src shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(src_format).c_str(), TypeUtils::FormatToSerialString(dst_format).c_str(),
ShapeToString(src_shape).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str());
REPORT_INNER_ERROR("E19999", "Check shape failed, trans format from %s to %s, src shape %s, data type %s is not supported",
TypeUtils::FormatToSerialString(src_format).c_str(), TypeUtils::FormatToSerialString(args.dst_format).c_str(),
ShapeToString(src_shape).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str());
return ACL_ERROR_GE_SHAPE_INVALID;
}
ShapeVector hw_shape;

@ -118,14 +118,14 @@ Status CheckShapeRelation(const TransArgs &args, ShapeVector &hw_shape) {
ShapeVector expect_src_shape;
auto ret = TransShapeToFracZz(args.dst_shape, args.src_data_type, expect_src_shape, hw_shape);
if (ret != SUCCESS) {
GELOGE(ret, "[Transfer][ShapeToFracZz] Failed from %s to %s, shape %s to %s, data type %s, error_code %u",
GELOGE(ret, "[Transfer][ShapeToFracZz] Failed from %s to %s, shape %s to %s, data type %s",
TypeUtils::FormatToSerialString(args.dst_format).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(), ShapeToString(args.dst_shape).c_str(),
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), ret);
REPORT_INNER_ERROR(ret, "Failed to transfer shape from %s to %s, shape %s to %s, data type %s, error_code %u",
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
REPORT_INNER_ERROR(ret, "Failed to transfer shape from %s to %s, shape %s to %s, data type %s",
TypeUtils::FormatToSerialString(args.dst_format).c_str(),
TypeUtils::FormatToSerialString(args.src_format).c_str(), ShapeToString(args.dst_shape).c_str(),
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), ret);
ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
return ret;
}
if (!IsTransShapeSrcCorrect(args, expect_src_shape)) {

Loading…
Cancel
Save