From b68de64969236368a338d1174cfe6b103a6c9adc Mon Sep 17 00:00:00 2001 From: yepei6 Date: Wed, 31 Mar 2021 11:34:11 +0800 Subject: [PATCH] modify the support of Ellipsis in parse for python3.8 --- mindspore/ccsrc/pipeline/jit/parse/parse.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/ccsrc/pipeline/jit/parse/parse.cc b/mindspore/ccsrc/pipeline/jit/parse/parse.cc index 521e16b6945..e617813b7a0 100644 --- a/mindspore/ccsrc/pipeline/jit/parse/parse.cc +++ b/mindspore/ccsrc/pipeline/jit/parse/parse.cc @@ -581,6 +581,9 @@ AnfNodePtr Parser::ParseConstant(const FunctionBlockPtr &, const py::object &nod } else if (py::isinstance(obj)) { MS_LOG(INFO) << "The Constant is none:" << (std::string)py::str(obj); return NewValueNode(kNone); + } else if (py::isinstance(obj)) { + MS_LOG(INFO) << "The Constance is ellipsis:" << (std::string)py::str(obj); + return NewValueNode(kEllipsis); } else { // no else actually MS_EXCEPTION(TypeError) << "Unsupported Constant type : " << (std::string)py::str(obj);