format log optimize

pull/1438/head
liyihan2@huawei.com 4 years ago
parent 4027a44402
commit 018d171ead

@ -33,9 +33,9 @@ Status TransShapeNchwToNc1hwc0(const std::vector<int64_t> &src_shape, DataType d
int64_t c0 = GetCubeSizeByDataType(data_type); int64_t c0 = GetCubeSizeByDataType(data_type);
if (c0 <= 0) { if (c0 <= 0) {
GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Get][Cube]Failed, the data type %s is invalid", GELOGE(ACL_ERROR_GE_DATATYPE_INVALID, "[Get][Cube]Failed, the data type %s is invalid",
TypsUtils::DataTypeToSerialString(data_type).c_str()); TypeUtils::DataTypeToSerialString(data_type).c_str());
REPORT_CALL_ERROR("E19999", "Failed to get cube size, the data type %s is invalid", REPORT_CALL_ERROR("E19999", "Failed to get cube size, the data type %s is invalid",
TypsUtils::DataTypeToSerialString(data_type).c_str()); TypeUtils::DataTypeToSerialString(data_type).c_str());
return ACL_ERROR_GE_DATATYPE_INVALID; return ACL_ERROR_GE_DATATYPE_INVALID;
} }
if (!CheckShapeValid(src_shape, kNchwDimsNum)) { if (!CheckShapeValid(src_shape, kNchwDimsNum)) {

@ -50,7 +50,7 @@ std::map<Format, std::map<Format, std::vector<int64_t>>> perm_args{
bool IsShapeArgValid(const std::vector<int64_t> &src_shape, const std::vector<int64_t> &perm_arg) { bool IsShapeArgValid(const std::vector<int64_t> &src_shape, const std::vector<int64_t> &perm_arg) {
if (src_shape.empty()) { if (src_shape.empty()) {
std::string error = "Failed to transpose, empty src shape"; std::string error = "Failed to transpose, empty src shape";
GE_ERRORLOG_AND_ERRORMSG((ACL_ERROR_GE_SHAPE_INVALID, error.c_str()); GE_ERRORLOG_AND_ERRORMSG(ACL_ERROR_GE_SHAPE_INVALID, error.c_str());
GELOGE((ACL_ERROR_GE_SHAPE_INVALID, "[Trans][Shape]Failed, empty src shape"); GELOGE((ACL_ERROR_GE_SHAPE_INVALID, "[Trans][Shape]Failed, empty src shape");
return false; return false;
} }

Loading…
Cancel
Save