add reshepe type for graph cache

pull/14236/head
LianLiguang 4 years ago
parent 7ad3a60568
commit bda7fc5153

@ -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()));

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