| @@ -105,7 +105,7 @@ Status CheckShapeRelation(const TransArgs &args, ShapeVector &hw_shape) { | |||||
| 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()); | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| if (!IsTransShapeSrcCorrect(args, expect_shape)) { | |||||
| if (!IsTransShapeSrcCorrect(args, expect_src_shape)) { | |||||
| return PARAM_INVALID; | return PARAM_INVALID; | ||||
| } | } | ||||
| return SUCCESS; | return SUCCESS; | ||||
| @@ -105,7 +105,7 @@ Status CheckShapeRelation(const TransArgs &args, ShapeVector &hw_shape) { | |||||
| 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()); | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| if (!IsTransShapeSrcCorrect(args, expect_shape)) { | |||||
| if (!IsTransShapeSrcCorrect(args, expect_src_shape)) { | |||||
| return PARAM_INVALID; | return PARAM_INVALID; | ||||
| } | } | ||||
| return SUCCESS; | return SUCCESS; | ||||
| @@ -36,7 +36,7 @@ Status CheckArgsForFracZToHwcn(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_FRACTAL_Z || args.dst_format != FORMAT_HWCN) { | if (args.src_format != FORMAT_FRACTAL_Z || args.dst_format != FORMAT_HWCN) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -63,7 +63,7 @@ Status CheckArgsForFracZToHwcn(const TransArgs &args) { | |||||
| src_shape.at(kFracZNi) != kNiSize || src_shape.at(kFracZN0) != n0) { | src_shape.at(kFracZNi) != kNiSize || src_shape.at(kFracZN0) != n0) { | ||||
| std::string error = "Failed to check relationship between src shape" + | std::string error = "Failed to check relationship between src shape" + | ||||
| FmtToStr(ShapeToString(src_shape)) + " and dst shape" + | FmtToStr(ShapeToString(src_shape)) + " and dst shape" + | ||||
| FmtToStr(ShapeToString(dst_shape)) + ; | |||||
| FmtToStr(ShapeToString(dst_shape)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return PARAM_INVALID; | return PARAM_INVALID; | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ Status CheckArgsForFracZToNchw(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_FRACTAL_Z || args.dst_format != FORMAT_NCHW) { | if (args.src_format != FORMAT_FRACTAL_Z || args.dst_format != FORMAT_NCHW) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ Status CheckArgsForFracZToNhwc(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_FRACTAL_Z || args.dst_format != FORMAT_NHWC) { | if (args.src_format != FORMAT_FRACTAL_Z || args.dst_format != FORMAT_NHWC) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -53,7 +53,7 @@ Status CheckArgsForHwcnToC1hwncoc0(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_HWCN || args.dst_format != FORMAT_C1HWNCoC0) { | if (args.src_format != FORMAT_HWCN || args.dst_format != FORMAT_C1HWNCoC0) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ Status CheckArgsForNc1hwc0ToNchw(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_NC1HWC0 || args.dst_format != FORMAT_NCHW) { | if (args.src_format != FORMAT_NC1HWC0 || args.dst_format != FORMAT_NCHW) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ Status CheckArgsForNc1hwc0ToNhwc(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_NC1HWC0 || args.dst_format != FORMAT_NHWC) { | if (args.src_format != FORMAT_NC1HWC0 || args.dst_format != FORMAT_NHWC) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -56,7 +56,7 @@ Status CheckArgsForNchwToNc1hwc0(const TransArgs &args) { | |||||
| if (args.src_format != FORMAT_NCHW || args.dst_format != FORMAT_NC1HWC0) { | if (args.src_format != FORMAT_NCHW || args.dst_format != FORMAT_NC1HWC0) { | ||||
| std::string error = "Dose not support trans format from " + | std::string error = "Dose not support trans format from " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + | ||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ; | |||||
| FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)); | |||||
| GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | GE_ERRORLOG_AND_ERRORMSG(UNSUPPORTED, error.c_str()); | ||||
| return UNSUPPORTED; | return UNSUPPORTED; | ||||
| } | } | ||||
| @@ -22,6 +22,7 @@ | |||||
| #include "common/formats/utils/formats_definitions.h" | #include "common/formats/utils/formats_definitions.h" | ||||
| #include "common/formats/utils/formats_trans_utils.h" | #include "common/formats/utils/formats_trans_utils.h" | ||||
| #include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
| #include "framework/common/debug/log.h" | |||||
| #include "graph/utils/type_utils.h" | #include "graph/utils/type_utils.h" | ||||
| namespace ge { | namespace ge { | ||||