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 16b559c4..85f4038e 100644 --- a/ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc +++ b/ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc @@ -22,6 +22,7 @@ #include "common/formats/utils/formats_definitions.h" #include "common/formats/utils/formats_trans_utils.h" #include "framework/common/debug/ge_log.h" +#include "framework/common/debug/log.h" #include "graph/utils/type_utils.h" namespace ge { diff --git a/ge/common/formats/utils/formats_trans_utils.cc b/ge/common/formats/utils/formats_trans_utils.cc index b48874f0..8a4b0729 100755 --- a/ge/common/formats/utils/formats_trans_utils.cc +++ b/ge/common/formats/utils/formats_trans_utils.cc @@ -19,7 +19,6 @@ #include #include "common/formats/utils/formats_definitions.h" -#include "common/util/error_manager/error_manager.h" #include "framework/common/debug/ge_log.h" #include "framework/common/debug/log.h" #include "framework/common/ge_inner_error_codes.h" @@ -102,8 +101,8 @@ bool IsShapeEqual(const GeShape &src, const GeShape &dst) { return true; } -GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool IsTransShapeSrcCorrect(const TransArgs &args, std::vector &expect_shape) { - if (!args.src_shape.empty() && args.src_shape != expect_shape) { +bool IsTransShapeSrcCorrect(const TransArgs &args, std::vector &expect_shape) { + if (args.src_shape != expect_shape) { std::string error = "Failed to trans format from" + FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ", invalid relationship between src shape " + @@ -115,7 +114,7 @@ GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool IsTransShapeSrcCorrect(const return true; } -GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool IsTransShapeDstCorrect(const TransArgs &args, std::vector &expect_shape) { +bool IsTransShapeDstCorrect(const TransArgs &args, std::vector &expect_shape) { if (!args.dst_shape.empty() && args.dst_shape != expect_shape) { std::string error = "Failed to trans format from " + FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + diff --git a/ge/common/formats/utils/formats_trans_utils.h b/ge/common/formats/utils/formats_trans_utils.h index a6c27d36..848e8b3a 100755 --- a/ge/common/formats/utils/formats_trans_utils.h +++ b/ge/common/formats/utils/formats_trans_utils.h @@ -23,6 +23,7 @@ #include #include "external/graph/types.h" #include "graph/ge_tensor.h" +#include "register/register_format_transfer.h" namespace ge { namespace formats { diff --git a/inc/framework/common/debug/log.h b/inc/framework/common/debug/log.h index 575779bf..2e5a8566 100644 --- a/inc/framework/common/debug/log.h +++ b/inc/framework/common/debug/log.h @@ -23,6 +23,7 @@ #include "runtime/rt.h" #include "common/string_util.h" #include "common/util.h" +#include "common/util/error_manager/error_manager.h" #include "framework/common/debug/ge_log.h" #include "ge/ge_api_error_codes.h"