From 1e610379dbb41a298ee5adf6d6c00f1dc441531e Mon Sep 17 00:00:00 2001 From: "liyihan2@huawei.com" Date: Mon, 29 Mar 2021 17:28:06 +0800 Subject: [PATCH] common formats log optimize --- .../format_transfers/format_transfer_fractal_nz.cc | 11 +++++++---- .../format_transfers/format_transfer_fractal_zz.cc | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ge/common/formats/format_transfers/format_transfer_fractal_nz.cc b/ge/common/formats/format_transfers/format_transfer_fractal_nz.cc index 9e846726..eda3a5a9 100755 --- a/ge/common/formats/format_transfers/format_transfer_fractal_nz.cc +++ b/ge/common/formats/format_transfers/format_transfer_fractal_nz.cc @@ -225,7 +225,7 @@ Status TransFormatFromFracNzToNd(const TransArgs &args, TransResult &result, con TypeUtils::FormatToSerialString(args.src_format).c_str(), TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size); REPORT_INNER_ERROR("E19999", "Failed to trans format from %s to %s and allocate memory for dst buf %ld", - TypeUtils::FormatToSerialString(args.src_format).c_str(); + TypeUtils::FormatToSerialString(args.src_format).c_str(), TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -295,7 +295,8 @@ Status FormatTransferFractalNz::TransFormat(const TransArgs &args, TransResult & 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 datatype failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported", + 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()); @@ -337,7 +338,8 @@ Status FormatTransferFractalNz::TransShape(Format src_format, const ShapeVector 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 datatype failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported", + 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()); @@ -366,7 +368,8 @@ Status FormatTransferFractalNzND::TransFormat(const TransArgs &args, TransResult 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 datatype failed, trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported", + 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()); diff --git a/ge/common/formats/format_transfers/format_transfer_fractal_zz.cc b/ge/common/formats/format_transfers/format_transfer_fractal_zz.cc index 32e31582..a19f3fcf 100755 --- a/ge/common/formats/format_transfers/format_transfer_fractal_zz.cc +++ b/ge/common/formats/format_transfers/format_transfer_fractal_zz.cc @@ -313,7 +313,7 @@ Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult & ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); return ACL_ERROR_GE_DATATYPE_INVALID; } - if (!CheckShape(args.src_format, args.src_shape) || !IsShapeValid(args.dst_shape) { + if (!CheckShape(args.src_format, args.src_shape) || !IsShapeValid(args.dst_shape)) { GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Failed, not support trans format from %s to %s, src shape %s, dst shape %s, data type %s", TypeUtils::FormatToSerialString(args.src_format).c_str(),