Browse Source

!14236 add tensor reshepe type for pynative graph info

From: @lianliguang
Reviewed-by: @chujinjin,@zhoufeng54
Signed-off-by:
pull/14236/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
af3ae89774
2 changed files with 3 additions and 1 deletions
  1. +2
    -0
      mindspore/ccsrc/pipeline/pynative/pynative_execute.cc
  2. +1
    -1
      mindspore/core/utils/check_convert_utils.cc

+ 2
- 0
mindspore/ccsrc/pipeline/pynative/pynative_execute.cc View File

@@ -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<device::DeviceAddress>(tensor_addr)->type_id()));


+ 1
- 1
mindspore/core/utils/check_convert_utils.cc View File

@@ -427,7 +427,7 @@ TypePtr CheckAndConvertUtils::CheckTensorTypeSame(const std::map<std::string, Ty
}
auto type = types.begin()->second;
MS_EXCEPTION_IF_NULL(type);
if (type->isa<TensorType>()) {
if (!type->isa<TensorType>()) {
MS_EXCEPTION(TypeError) << "The " << prim_name << "'s" << types.begin()->first << " input must be a tensor but got "
<< type->ToString();
}


Loading…
Cancel
Save