From 2b0d88e3e268a5283b0cd731575e807e30aae121 Mon Sep 17 00:00:00 2001 From: simson <526422051@qq.com> Date: Mon, 7 Sep 2020 17:04:38 +0800 Subject: [PATCH] fix the bug of get id that string might has conflict with int --- mindspore/ccsrc/pipeline/pynative/pynative_execute.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index 9d9b2094a..f84834e33 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -137,10 +137,10 @@ static std::string GetId(const py::object &obj) { } if (py::isinstance(to_process)) { auto type_ptr = py::cast(to_process); - return prefix + type_ptr->ToString(); + return "type" + type_ptr->ToString(); } if (py::isinstance(to_process)) { - return prefix + std::string(py::str(to_process)); + return "s" + std::string(py::str(to_process)); } if (py::isinstance(to_process)) { return prefix + std::string(py::str(to_process)); -- GitLab