From 566ccfef295995897247ef2f637bb86f30b8a639 Mon Sep 17 00:00:00 2001 From: Weilong Wu Date: Mon, 16 May 2022 12:54:44 +0800 Subject: [PATCH] [Eager] Fix test_model.py under eager in windows-openblas ci (#42756) * [Eager] Fix test_model.py under eager in windows-openblas ci * Use || in this case * recover _in_eager_mode_ --- paddle/fluid/pybind/eager_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/pybind/eager_utils.cc b/paddle/fluid/pybind/eager_utils.cc index 90d7024f7a..acdaa0293b 100644 --- a/paddle/fluid/pybind/eager_utils.cc +++ b/paddle/fluid/pybind/eager_utils.cc @@ -1045,7 +1045,7 @@ paddle::experimental::Scalar CastNumpy2Scalar(PyObject* obj, } else if (type_name == "numpy.int64") { int64_t value = CastPyArg2Long(obj, op_type, arg_pos); return paddle::experimental::Scalar(value); - } else if (type_name == "numpy.int32") { + } else if (type_name == "numpy.int32" || type_name == "numpy.intc") { int value = CastPyArg2Int(obj, op_type, arg_pos); return paddle::experimental::Scalar(value); } else { -- GitLab