diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index d60db1afe4..86b46566c0 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -283,6 +283,8 @@ std::string GetSingleOpGraphInfo(const OpExecInfoPtr &op_exec_info, }); (void)graph_info.append(std::to_string(input_tensors[index]->data_type())); graph_info += "_"; + (void)graph_info.append(input_tensors[index]->padding_type()); + graph_info += "_"; auto tensor_addr = input_tensors[index]->device_address(); if (tensor_addr != nullptr) { (void)graph_info.append(std::to_string(std::dynamic_pointer_cast(tensor_addr)->type_id())); diff --git a/mindspore/core/utils/check_convert_utils.cc b/mindspore/core/utils/check_convert_utils.cc index d2734bf367..a1cb5b5044 100644 --- a/mindspore/core/utils/check_convert_utils.cc +++ b/mindspore/core/utils/check_convert_utils.cc @@ -427,7 +427,7 @@ TypePtr CheckAndConvertUtils::CheckTensorTypeSame(const std::mapsecond; MS_EXCEPTION_IF_NULL(type); - if (type->isa()) { + if (!type->isa()) { MS_EXCEPTION(TypeError) << "The " << prim_name << "'s" << types.begin()->first << " input must be a tensor but got " << type->ToString(); }