From 5a0e8f81f82aaddf368ea95a4399b76e8fe85a60 Mon Sep 17 00:00:00 2001 From: liangzelang Date: Tue, 25 Aug 2020 09:48:08 +0800 Subject: [PATCH] fix wrong value of int-type Node bug in pynative --- mindspore/ccsrc/pipeline/pynative/pynative_execute.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index ff7949cce43..e53bf09c02b 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -772,7 +772,9 @@ std::string PynativeExecutor::GetCellId(const py::object &cell, const py::args & if (node_abs_map_.find(arg_id) != node_abs_map_.end()) { cell_id += node_abs_map_[arg_id]->ToString(); } else { - AbstractBasePtr abs = abstract::FromValueInside(PyAttrValue(args[i]), true); + auto abs = PyAttrValue(args[i])->ToAbstract(); + auto config = abstract::AbstractBase::kBroadenTensorOnly; + abs = abs->Broaden(config); cell_id += abs->ToString(); node_abs_map_[arg_id] = abs; }