Browse Source

error message add format

tags/v1.1.0
wangwenhua1@huawei.com 3 years ago
parent
commit
2be4579f0a
4 changed files with 6 additions and 4 deletions
  1. +1
    -0
      ge/common/formats/format_transfers/format_transfer_c1hwncoc0_hwcn.cc
  2. +3
    -4
      ge/common/formats/utils/formats_trans_utils.cc
  3. +1
    -0
      ge/common/formats/utils/formats_trans_utils.h
  4. +1
    -0
      inc/framework/common/debug/log.h

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

@@ -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 {


+ 3
- 4
ge/common/formats/utils/formats_trans_utils.cc View File

@@ -19,7 +19,6 @@
#include <cstdint> #include <cstdint>


#include "common/formats/utils/formats_definitions.h" #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/ge_log.h"
#include "framework/common/debug/log.h" #include "framework/common/debug/log.h"
#include "framework/common/ge_inner_error_codes.h" #include "framework/common/ge_inner_error_codes.h"
@@ -102,8 +101,8 @@ bool IsShapeEqual(const GeShape &src, const GeShape &dst) {
return true; return true;
} }


GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool IsTransShapeSrcCorrect(const TransArgs &args, std::vector<int64_t> &expect_shape) {
if (!args.src_shape.empty() && args.src_shape != expect_shape) {
bool IsTransShapeSrcCorrect(const TransArgs &args, std::vector<int64_t> &expect_shape) {
if (args.src_shape != expect_shape) {
std::string error = "Failed to trans format from" + std::string error = "Failed to trans format from" +
FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " +
FmtToStr(TypeUtils::FormatToSerialString(args.dst_format)) + ", invalid relationship between src shape " + 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; return true;
} }


GE_FUNC_DEV_VISIBILITY GE_FUNC_HOST_VISIBILITY bool IsTransShapeDstCorrect(const TransArgs &args, std::vector<int64_t> &expect_shape) {
bool IsTransShapeDstCorrect(const TransArgs &args, std::vector<int64_t> &expect_shape) {
if (!args.dst_shape.empty() && args.dst_shape != expect_shape) { if (!args.dst_shape.empty() && args.dst_shape != expect_shape) {
std::string error = "Failed to trans format from " + std::string error = "Failed to trans format from " +
FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " + FmtToStr(TypeUtils::FormatToSerialString(args.src_format)) + " to " +


+ 1
- 0
ge/common/formats/utils/formats_trans_utils.h View File

@@ -23,6 +23,7 @@
#include <vector> #include <vector>
#include "external/graph/types.h" #include "external/graph/types.h"
#include "graph/ge_tensor.h" #include "graph/ge_tensor.h"
#include "register/register_format_transfer.h"


namespace ge { namespace ge {
namespace formats { namespace formats {


+ 1
- 0
inc/framework/common/debug/log.h View File

@@ -23,6 +23,7 @@
#include "runtime/rt.h" #include "runtime/rt.h"
#include "common/string_util.h" #include "common/string_util.h"
#include "common/util.h" #include "common/util.h"
#include "common/util/error_manager/error_manager.h"
#include "framework/common/debug/ge_log.h" #include "framework/common/debug/ge_log.h"
#include "ge/ge_api_error_codes.h" #include "ge/ge_api_error_codes.h"




Loading…
Cancel
Save