Browse Source

common formats log optimize

tags/v1.3.0
liyihan2@huawei.com 4 years ago
parent
commit
1e610379db
2 changed files with 8 additions and 5 deletions
  1. +7
    -4
      ge/common/formats/format_transfers/format_transfer_fractal_nz.cc
  2. +1
    -1
      ge/common/formats/format_transfers/format_transfer_fractal_zz.cc

+ 7
- 4
ge/common/formats/format_transfers/format_transfer_fractal_nz.cc View File

@@ -225,7 +225,7 @@ Status TransFormatFromFracNzToNd(const TransArgs &args, TransResult &result, con
TypeUtils::FormatToSerialString(args.src_format).c_str(), TypeUtils::FormatToSerialString(args.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size); 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", 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); TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size);
return ACL_ERROR_GE_MEMORY_ALLOCATION; 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.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).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()); 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.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).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()); 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.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).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()); 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.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).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()); 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.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).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()); 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.src_format).c_str(),
TypeUtils::FormatToSerialString(args.dst_format).c_str(), ShapeToString(args.src_shape).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()); ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());


+ 1
- 1
ge/common/formats/format_transfers/format_transfer_fractal_zz.cc View File

@@ -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()); ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str());
return ACL_ERROR_GE_DATATYPE_INVALID; 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, 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", "[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(), TypeUtils::FormatToSerialString(args.src_format).c_str(),


Loading…
Cancel
Save