From a6027ff7af0583b75cd57e9920a76df047fc3e6b Mon Sep 17 00:00:00 2001 From: chujinjin Date: Thu, 13 Aug 2020 18:53:29 +0800 Subject: [PATCH] fix ssim precision error in pynative mode --- mindspore/ccsrc/pipeline/pynative/pynative_execute.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index dc1a1f3b85..4c86d33fe4 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -329,6 +329,12 @@ std::string GetSingleOpGraphInfo(const OpExecInfoPtr &op_exec_info, (void)std::for_each(tensor_shape.begin(), tensor_shape.end(), [&](const auto &dim) { (void)graph_info.append(std::to_string(dim) + "_"); }); (void)graph_info.append(std::to_string(tensor->data_type()) + "_"); + if (tensor->device_address() != nullptr) { + (void)graph_info.append( + std::to_string(std::dynamic_pointer_cast(tensor->device_address())->type_id()) + "_"); + (void)graph_info.append(std::dynamic_pointer_cast(tensor->device_address())->format() + + "_"); + } } // get prim and abstract info (void)graph_info.append(op_exec_info->prim_id + "_");