diff --git a/ge/common/formats/format_transfers/datatype_transfer.cc b/ge/common/formats/format_transfers/datatype_transfer.cc index b1df4f53..d6773823 100644 --- a/ge/common/formats/format_transfers/datatype_transfer.cc +++ b/ge/common/formats/format_transfers/datatype_transfer.cc @@ -155,7 +155,8 @@ Status DataTypeTransfer::TransDataType(const CastArgs &args, TransResult &result std::shared_ptr dst(new (std::nothrow) uint8_t[total_size], std::default_delete()); if (dst == nullptr) { GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to alloc the memory for dst buf %zu, data size %zu", total_size, args.src_data_size); + "[Allocate][DSTMemory]Failed, memory for dst buf %zu, data size %zu", total_size, args.src_data_size); + REPORT_INNER_ERROR("E19999", "Failed to allocate memory for dst buf %zu, data size %zu", total_size, args.src_data_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } diff --git a/ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc b/ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc index 20f493d7..c3779834 100644 --- a/ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc +++ b/ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc @@ -49,11 +49,13 @@ Status CheckArgsForC1hwncoc0ToHwcn(const TransArgs &args) { return ACL_ERROR_GE_DATATYPE_INVALID; } if (!CheckShapeValid(src_shape, kC1hwncoc0DimsNum)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check src shape %s", ShapeToString(src_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][SrcShape]Failed, src shape %s", ShapeToString(src_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check src shape %s", ShapeToString(src_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } if (!CheckShapeValid(dst_shape, kHwcnDimsNum)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s.", ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][DSTShape]Failed, dst shape %s.", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } auto cube_size = GetCubeSizeByDataType(args.src_data_type); @@ -74,9 +76,12 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, int size std::shared_ptr dst(new (std::nothrow) uint8_t[total_size], std::default_delete()); if (dst == nullptr) { GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld, shape %s", + "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld, shape %s", TypeUtils::FormatToSerialString(args.src_format).c_str(), TypeUtils::FormatToSerialString(args.dst_format).c_str(), total_size, ShapeToString(args.dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to trans format from %s to %s and allocate memory for dst buf %ld, shape %s", + TypeUtils::FormatToSerialString(args.src_format).c_str(), + TypeUtils::FormatToSerialString(args.dst_format).c_str(), total_size, ShapeToString(args.dst_shape).c_str()); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -116,10 +121,12 @@ Status GetDstDataAfterTrans(const TransArgs &args, TransResult &result, int size static_cast(size)); if (ret != EOK) { GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to copy data from C1HWNCoC0[%ld, %ld, %ld, %ld, %ld, %ld] offset %ld to " + "[Operate][Memory]Failed to copy data from C1HWNCoC0[%ld, %ld, %ld, %ld, %ld, %ld] offset %ld to " "HWCN[%ld, %ld, %ld, %ld] offset %ld, err-code %d", - c1_idx, h_idx, w_idx, n_idx, co_idx, c0_idx, src_offset, h_idx, w_idx, c_idx, n_idx, dst_offset, - ret); + c1_idx, h_idx, w_idx, n_idx, co_idx, c0_idx, src_offset, h_idx, w_idx, c_idx, n_idx, dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to copy data from C1HWNCoC0[%ld, %ld, %ld, %ld, %ld, %ld] offset %ld to " + "HWCN[%ld, %ld, %ld, %ld] offset %ld, err-code %d", + c1_idx, h_idx, w_idx, n_idx, co_idx, c0_idx, src_offset, h_idx, w_idx, c_idx, n_idx, dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -145,8 +152,8 @@ Status FormatTransferC1hwncoc0Hwcn::TransFormat(const TransArgs &args, TransResu result.length = static_cast(total_size); return SUCCESS; } - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Get %ld total size from dst shape %s, src shape %s.", total_size, - ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Get %ld total size from dst shape %s, src shape %s.", + total_size, ShapeToString(args.dst_shape).c_str(), ShapeToString(args.src_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } GELOGD("Begin to trans format from C1HWNCoC0 to HWCN, src shape %s, data type %s, dst shape %s, memory size %ld.", @@ -154,9 +161,12 @@ Status FormatTransferC1hwncoc0Hwcn::TransFormat(const TransArgs &args, TransResu ShapeToString(args.dst_shape).c_str(), total_size); ret = GetDstDataAfterTrans(args, result, size, total_size); if (ret != SUCCESS) { - GELOGE(ret, "Failed to get data after trans, src shape %s, data type %s, dst shape %s, memory size %ld", + GELOGE(ret, "[Get][Data]Failed when 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(), - ShapeToString(args.dst_shape).c_str(), total_size); + ShapeToString(args.dst_shape).c_str(), total_size, ret); + REPORT_INNER_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(), + ShapeToString(args.dst_shape).c_str(), total_size, ret); return ret; } return SUCCESS; diff --git a/ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc b/ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc index 0508a1a5..4c09268c 100644 --- a/ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc +++ b/ge/common/formats/format_transfers/format_transfer_dhwcn_fracz3D.cc @@ -1,4 +1,4 @@ -/** +/**` * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -95,9 +95,12 @@ Status TransFormatDhwckToFz3D(const TransArgs &args, TransResult &result) { std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size], std::default_delete()); if (dst == nullptr) { GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -123,9 +126,9 @@ Status TransFormatDhwckToFz3D(const TransArgs &args, TransResult &result) { args.data + src_idx * data_size, static_cast(data_size)); } if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d, pad mode %d", + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } diff --git a/ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc b/ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc index 8dd1757b..e3244b8a 100644 --- a/ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc +++ b/ge/common/formats/format_transfers/format_transfer_dhwnc_fracz3D_transpose.cc @@ -95,10 +95,12 @@ Status TransFormatDhwncToFz3DTranspose(const TransArgs &args, TransResult &resul std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size], std::default_delete()); if (dst == nullptr) { - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate[DSTMemory]]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -124,9 +126,9 @@ Status TransFormatDhwncToFz3DTranspose(const TransArgs &args, TransResult &resul args.data + src_idx * data_size, static_cast(data_size)); } if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d, pad mode %d", + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } 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 fccdb57b..9e846726 100755 --- a/ge/common/formats/format_transfers/format_transfer_fractal_nz.cc +++ b/ge/common/formats/format_transfers/format_transfer_fractal_nz.cc @@ -87,7 +87,8 @@ Status TransShapeToFracNz(const ShapeVector &src_shape, DataType data_type, Shap hw_shape.push_back(DIM_DEFAULT_VALUE); hw_shape.push_back(src_shape[kNdDimIndexN]); if (!IsShapeValid(dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][DSTShape]Failed, dst shape %s", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } return SUCCESS; @@ -106,7 +107,8 @@ Status TransShapeToFracNz(const ShapeVector &src_shape, DataType data_type, Shap hw_shape.push_back(src_shape[size - kNdDimCountBackwardsWH]); hw_shape.push_back(src_shape[size - kNdDimCountBackwardsW]); if (!IsShapeValid(dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][DSTShape]Failed, dst shape %s", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } return SUCCESS; @@ -117,10 +119,14 @@ Status CheckShapeRelation(const TransArgs &args, ShapeVector &hw_shape) { ShapeVector expect_src_shape; auto ret = TransShapeToFracNz(args.dst_shape, args.src_data_type, expect_src_shape, hw_shape); if (ret != SUCCESS) { - GELOGE(ret, "Trans shape from %s to %s, shape %s to %s, data type %s failed", + GELOGE(ret, "[Transfer][ShapeToFracNz]Failed, shape from %s to %s, shape %s to %s, data type %s, error_code:%u", 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()); + ShapeToString(args.src_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str(), ret); + REPORT_INNER_ERROR("E19999", "Failed to tranfer shape from %s to %s, shape %s to %s, data type %s, error_code:%u", + 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); return ret; } if (!IsTransShapeSrcCorrect(args, expect_src_shape)) { @@ -139,10 +145,12 @@ Status TransFormatFromNdToFracNz(const TransArgs &args, TransResult &result, con std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size](), std::default_delete()); if (dst == nullptr) { - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -176,8 +184,8 @@ Status TransFormatFromNdToFracNz(const TransArgs &args, TransResult &result, con auto ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size * w0)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED,"[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -191,8 +199,8 @@ Status TransFormatFromNdToFracNz(const TransArgs &args, TransResult &result, con auto ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED,"[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -213,10 +221,12 @@ Status TransFormatFromFracNzToNd(const TransArgs &args, TransResult &result, con std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size], std::default_delete()); if (dst == nullptr) { - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -250,8 +260,8 @@ Status TransFormatFromFracNzToNd(const TransArgs &args, TransResult &result, con ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size * w0)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -265,8 +275,8 @@ Status TransFormatFromFracNzToNd(const TransArgs &args, TransResult &result, con ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -281,18 +291,26 @@ Status TransFormatFromFracNzToNd(const TransArgs &args, TransResult &result, con Status FormatTransferFractalNz::TransFormat(const TransArgs &args, TransResult &result) { if (!IsDataTypeSupport(args.src_data_type)) { GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, - "Trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported", + "[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()); + 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()); return ACL_ERROR_GE_DATATYPE_INVALID; } if (!CheckShape(args.src_format, args.src_shape) || !IsShapeValid(args.dst_shape)) { GELOGE(ACL_ERROR_GE_SHAPE_INVALID, - "Trans format from %s to %s, src shape %s, dst shape %s, data type %s is not supported", + "[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()); return ACL_ERROR_GE_SHAPE_INVALID; } GELOGD("Begin to trans format from %s to %s, src shape %s, dst shape %s, data type %s", @@ -315,16 +333,26 @@ Status FormatTransferFractalNz::TransShape(Format src_format, const ShapeVector Format dst_format, ShapeVector &dst_shape) { if (!IsDataTypeSupport(data_type)) { GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, - "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()); + "[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()); + 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()); return ACL_ERROR_GE_DATATYPE_INVALID; } if (!CheckShape(src_format, src_shape)) { GELOGE(ACL_ERROR_GE_SHAPE_INVALID, - "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()); + "[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()); return ACL_ERROR_GE_SHAPE_INVALID; } ShapeVector hw_shape; @@ -334,19 +362,27 @@ Status FormatTransferFractalNz::TransShape(Format src_format, const ShapeVector Status FormatTransferFractalNzND::TransFormat(const TransArgs &args, TransResult &result) { if (!IsDataTypeSupport(args.src_data_type)) { GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, - "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, 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 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()); return ACL_ERROR_GE_DATATYPE_INVALID; } if (!IsShapeValid(args.src_shape) || !CheckShape(args.dst_format, args.dst_shape)) { GELOGE(ACL_ERROR_GE_SHAPE_INVALID, - "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, 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()); return ACL_ERROR_GE_SHAPE_INVALID; } GELOGD("Begin to trans format from %s to %s, src shape %s, dst shape %s, data type %s", diff --git a/ge/common/formats/format_transfers/format_transfer_fractal_z.cc b/ge/common/formats/format_transfers/format_transfer_fractal_z.cc index c629a381..6893aecb 100644 --- a/ge/common/formats/format_transfers/format_transfer_fractal_z.cc +++ b/ge/common/formats/format_transfers/format_transfer_fractal_z.cc @@ -73,8 +73,8 @@ Status TransShapeToFz(int64_t n, int64_t c, int64_t h, int64_t w, DataType data_ dst_shape.push_back(kNiSize); dst_shape.push_back(c0); if (!IsShapeValid(dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", - ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Failed, dst shape %s", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } return SUCCESS; @@ -102,8 +102,8 @@ Status TransShapeToFzWithGroups(int64_t n, int64_t c, int64_t h, int64_t w, Data dst_shape.push_back(16); dst_shape.push_back(cube_k); if (!IsShapeValid(dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", - ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][Shape]Failed, dst shape %s", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } return SUCCESS; @@ -190,10 +190,12 @@ Status TransFormatFromNchwToFz(const TransArgs &args, TransResult &result) { std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size], std::default_delete()); GE_CHK_BOOL_TRUE_EXEC_WITH_LOG( dst == nullptr, - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION;); for (int64_t vfi = 0; vfi < vf_cnt; vfi++) { @@ -237,9 +239,9 @@ Status TransFormatFromNchwToFz(const TransArgs &args, TransResult &result) { } } if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d pad mode %d", offset, - ret, need_pad_zero); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED,"[Operate][DSTMemory]Failed at offset %ld, error-code %d pad mode %d", + offset, ret, need_pad_zero); + REPORT_INNER_ERROR("E19999","Failed to operate dst memory at offset %ld, error-code %d pad mode %d", offset, ret, need_pad_zero); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -260,8 +262,10 @@ Status TransFormatHwcnToFzWithGroups(const TransArgs &args, TransResult &result, int64_t cin_ori = c_dim; int64_t cout_ori = n_dim / groups; if (cin_ori == 0 || cout_ori == 0) { - GELOGE(GRAPH_FAILED, "Cin_ori, cout_ori must not be equal 0, and current cin_ori, cout_ori," - "groups are %ld %ld %ld",cin_ori, cout_ori, groups); + GELOGE(GRAPH_FAILED, "[Check][Param]Failed, cin_ori, cout_ori must not be equal 0, and current cin_ori, cout_ori, groups are %ld %ld %ld", + cin_ori, cout_ori, groups); + REPORT_INNER_ERROR("E19999", "Check graph param failed, cin_ori, cout_ori must not be equal 0," + "and current cin_ori, cout_ori, groups are %ld %ld %ld", cin_ori, cout_ori, groups); return GRAPH_FAILED; } const int64_t cube_k = GetCubeSizeByDataType(args.src_data_type); @@ -282,14 +286,18 @@ Status TransFormatHwcnToFzWithGroups(const TransArgs &args, TransResult &result, errno_t ret = EOK; std::shared_ptr dst(new (std::nothrow) uint8_t[size_output_data], std::default_delete()); if (dst == nullptr) { - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", - TypeUtils::FormatToSerialString(args.src_format).c_str(), - TypeUtils::FormatToSerialString(args.dst_format).c_str(), size_output_data); + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", + TypeUtils::FormatToSerialString(args.src_format).c_str(), + TypeUtils::FormatToSerialString(args.dst_format).c_str(), size_output_data); + 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.dst_format).c_str(), size_output_data); return ACL_ERROR_GE_MEMORY_ALLOCATION; } ret = memset_s(dst.get(), static_cast(size_output_data), 0, static_cast(size_output_data)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "Failed to operate the dst memory, ret is %d", ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed, ret is %d", ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory, ret is %d", ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } for (int64_t g = 0; g < groups; g++) { @@ -352,10 +360,12 @@ Status TransFormatHwcnToFz(const TransArgs &args, TransResult &result) { std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size], std::default_delete()); GE_CHK_BOOL_TRUE_EXEC_WITH_LOG( dst == nullptr, - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION;); for (int64_t c1i = 0; c1i < c1; c1i++) { @@ -375,9 +385,8 @@ Status TransFormatHwcnToFz(const TransArgs &args, TransResult &result) { static_cast(data_size)); } else { if (protected_size < data_size) { - GELOGE(ACL_ERROR_GE_PARAM_INVALID, - "Failed to operate the dst memory, protected_size is %ld and size is %ld", - protected_size, data_size); + GELOGE(ACL_ERROR_GE_PARAM_INVALID,"[Operate][DSTMemory]Failed, protected_size is %ld and size is %ld", protected_size, data_size); + REPORT_INNER_ERROR("E19999","Operate dst memory failed, protected_size is %ld and size is %ld", protected_size, data_size); return ACL_ERROR_GE_PARAM_INVALID; } int64_t src_idx = hi * wcn + wi * cn + (c1i * c0 + c0i) * n + n1n0i; @@ -388,10 +397,9 @@ Status TransFormatHwcnToFz(const TransArgs &args, TransResult &result) { } } if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d, pad mode %d", - dst_offset, ret, pad_zero); - return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed, at offset %ld, error-code %d, pad mode %d", + dst_offset, ret, pad_zero); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memoery at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } } @@ -430,10 +438,11 @@ Status TransFormatNhwcToFz(const TransArgs &args, TransResult &result) { std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size], std::default_delete()); GE_CHK_BOOL_TRUE_EXEC_WITH_LOG( dst == nullptr, - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", - TypeUtils::FormatToSerialString(args.src_format).c_str(), - TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size); + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", + 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION;); for (int64_t c1i = 0; c1i < c1; c1i++) { @@ -453,10 +462,8 @@ Status TransFormatNhwcToFz(const TransArgs &args, TransResult &result) { static_cast(data_size)); } else { if (protected_size < data_size) { - GELOGE(ACL_ERROR_GE_PARAM_INVALID, - "Failed to operate the dst memory, protected_size is %ld and size is %ld", - protected_size, data_size); - return ACL_ERROR_GE_PARAM_INVALID; + GELOGE(ACL_ERROR_GE_PARAM_INVALID, "[Operate][DSTMemory]Failed, protected_size is %ld and size is %ld", protected_size, data_size); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory, protected_size is %ld and size is %ld", protected_size, data_size); return ACL_ERROR_GE_PARAM_INVALID; } int64_t src_idx = n1n0i * hwc + hi * wc + wi * c + (c1i * c0 + c0i); char *dst_data = reinterpret_cast(dst.get() + dst_offset); @@ -466,10 +473,9 @@ Status TransFormatNhwcToFz(const TransArgs &args, TransResult &result) { } } if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d, pad mode %d", + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); - return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d, pad mode %d", dst_offset, ret, pad_zero); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } } 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 c36bffb5..32e31582 100755 --- a/ge/common/formats/format_transfers/format_transfer_fractal_zz.cc +++ b/ge/common/formats/format_transfers/format_transfer_fractal_zz.cc @@ -86,8 +86,8 @@ Status TransShapeToFracZz(const ShapeVector &src_shape, DataType data_type, Shap hw_shape.push_back(DIM_DEFAULT_VALUE); hw_shape.push_back(src_shape[kNdDimIndexN]); if (!IsShapeValid(dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", - ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][DSTShape]Failed, dst shape %s", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } return SUCCESS; @@ -106,8 +106,8 @@ Status TransShapeToFracZz(const ShapeVector &src_shape, DataType data_type, Shap hw_shape.push_back(src_shape[size - kNdDimCountBackwardsWH]); hw_shape.push_back(src_shape[size - kNdDimCountBackwardsW]); if (!IsShapeValid(dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "Failed to check dst shape %s", - ShapeToString(dst_shape).c_str()); + GELOGE(ACL_ERROR_GE_SHAPE_INVALID, "[Check][DSTShape]Failed, dst shape %s", ShapeToString(dst_shape).c_str()); + REPORT_INNER_ERROR("E19999", "Failed to check dst shape %s", ShapeToString(dst_shape).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } return SUCCESS; @@ -118,10 +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, "Trans shape from %s to %s, shape %s to %s, data type %s failed", + GELOGE(ret, "[Transfer][ShapeToFracZz] Failed from %s to %s, shape %s to %s, data type %s, error_code %u", 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()); + 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", + 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); return ret; } if (!IsTransShapeSrcCorrect(args, expect_src_shape)) { @@ -140,10 +144,12 @@ Status TransFormatFromNdToFracZz(const TransArgs &args, TransResult &result, con std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size](), std::default_delete()); if (dst == nullptr) { - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } // The src&dst_shape can be written as times*H*W & times*H1*W1*H0*W0, respectively. dst_shape_size >= kDimNum4D @@ -180,8 +186,8 @@ Status TransFormatFromNdToFracZz(const TransArgs &args, TransResult &result, con auto ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size * w0)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -197,8 +203,8 @@ Status TransFormatFromNdToFracZz(const TransArgs &args, TransResult &result, con auto ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -220,10 +226,12 @@ Status TransFormatFromFracZzToNd(const TransArgs &args, TransResult &result, con std::shared_ptr dst(new (std::nothrow) uint8_t[dst_size](), std::default_delete()); if (dst == nullptr) { - GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, - "Failed to trans format from %s to %s, can not alloc the memory for dst buf %ld", + GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "[Allocate][DSTMemory]Failed to trans format from %s to %s, memory for dst buf %ld", 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 allcoate memory for dst buf %ld", + TypeUtils::FormatToSerialString(args.src_format).c_str(), + TypeUtils::FormatToSerialString(args.dst_format).c_str(), dst_size); return ACL_ERROR_GE_MEMORY_ALLOCATION; } @@ -261,8 +269,8 @@ Status TransFormatFromFracZzToNd(const TransArgs &args, TransResult &result, con auto ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size * w0)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -278,8 +286,8 @@ Status TransFormatFromFracZzToNd(const TransArgs &args, TransResult &result, con auto ret = memcpy_s(dst.get() + dst_offset, static_cast(protected_size), args.data + src_offset, static_cast(size)); if (ret != EOK) { - GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, - "Failed to operate the dst memory at offset %ld, error-code %d", dst_offset, ret); + GELOGE(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "[Operate][DSTMemory]Failed at offset %ld, error-code %d", dst_offset, ret); + REPORT_INNER_ERROR("E19999", "Failed to operate dst memory at offset %ld, error-code %d", dst_offset, ret); return ACL_ERROR_GE_MEMORY_OPERATE_FAILED; } } @@ -295,18 +303,26 @@ Status TransFormatFromFracZzToNd(const TransArgs &args, TransResult &result, con Status FormatTransferFractalZz::TransFormat(const TransArgs &args, TransResult &result) { if (!IsDataTypeSupport(args.src_data_type)) { GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, - "Not support trans format from %s to %s, src shape %s, dst shape %s, data type %s", + "[Check][Datatype]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.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, 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.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), + 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, - "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.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), + "[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.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, 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.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), + ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } GELOGD("Begin to trans format from %s to %s, src shape %s, dst shape %s, data type %s", @@ -329,16 +345,22 @@ Status FormatTransferFractalZz::TransShape(Format src_format, const ShapeVector Format dst_format, ShapeVector &dst_shape) { if (!IsDataTypeSupport(data_type)) { GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, - "Not support trans format from %s to %s, src shape %s, data type %s", + "[Check][Datatype]Failed, not support trans format from %s to %s, src shape %s, data type %s", 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 datatype Failed, not support trans format from %s to %s, src shape %s, data type %s", + 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, - "Not support trans format from %s to %s, src shape %s, data type %s", + "[Check][Shape]Failed, not support trans format from %s to %s, src shape %s, data type %s", 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, not support trans format from %s to %s, src shape %s, data type %s", + 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_SHAPE_INVALID; } ShapeVector hw_shape; @@ -348,19 +370,26 @@ Status FormatTransferFractalZz::TransShape(Format src_format, const ShapeVector Status FormatTransferFractalZzND::TransFormat(const TransArgs &args, TransResult &result) { if (!IsDataTypeSupport(args.src_data_type)) { GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, - "Not support trans format from %s to %s, src shape %s, dst shape %s, data type %s", + "[Check][Datatype]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.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, 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.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), + ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); return ACL_ERROR_GE_DATATYPE_INVALID; } if (!IsShapeValid(args.src_shape) || !CheckShape(args.dst_format, args.dst_shape)) { - GELOGE(ACL_ERROR_GE_SHAPE_INVALID, - "Not support trans format from %s to %s, src shape %s, dst shape %s, data type %s", + 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(), 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, 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.dst_format).c_str(), ShapeToString(args.src_shape).c_str(), + ShapeToString(args.dst_shape).c_str(), TypeUtils::DataTypeToSerialString(args.src_data_type).c_str()); return ACL_ERROR_GE_SHAPE_INVALID; } GELOGD("Begin to trans format from %s to %s, src shape %s, dst shape %s, data type %s",