Browse Source

!5846 fix the bug of get id

Merge pull request !5846 from Simson/bugfix
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
2ccb74c913
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mindspore/ccsrc/pipeline/pynative/pynative_execute.cc

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

@@ -137,10 +137,10 @@ static std::string GetId(const py::object &obj) {
}
if (py::isinstance<mindspore::Type>(to_process)) {
auto type_ptr = py::cast<mindspore::TypePtr>(to_process);
return prefix + type_ptr->ToString();
return "type" + type_ptr->ToString();
}
if (py::isinstance<py::str>(to_process)) {
return prefix + std::string(py::str(to_process));
return "s" + std::string(py::str(to_process));
}
if (py::isinstance<py::int_>(to_process)) {
return prefix + std::string(py::str(to_process));


Loading…
Cancel
Save