From 4ff9fe435a6406fc9c120b4fcddb838e497e0228 Mon Sep 17 00:00:00 2001 From: hong <43953930+phlrain@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:20:25 +0800 Subject: [PATCH] remove duplicate code (#40758) * remove duplicate code; * add some line; test=document_fix --- paddle/fluid/pybind/eager_utils.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/paddle/fluid/pybind/eager_utils.cc b/paddle/fluid/pybind/eager_utils.cc index 6817fa4bf04..bac5ea11548 100644 --- a/paddle/fluid/pybind/eager_utils.cc +++ b/paddle/fluid/pybind/eager_utils.cc @@ -31,6 +31,7 @@ limitations under the License. */ #include "paddle/phi/common/data_type.h" #include "paddle/phi/core/compat/convert_utils.h" #include "paddle/phi/core/dense_tensor.h" + namespace paddle { namespace pybind { @@ -66,8 +67,6 @@ int TensorDtype2NumpyDtype(phi::DataType dtype) { return pybind11::detail::NPY_UINT16_; case phi::DataType::FLOAT16: return pybind11::detail::NPY_FLOAT16_; - case phi::DataType::BFLOAT16: - return pybind11::detail::NPY_UINT16_; case phi::DataType::FLOAT32: return pybind11::detail::npy_api::NPY_FLOAT_; case phi::DataType::FLOAT64: -- GitLab