From 1574a8623be10085678de136e34e5565a50e885b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=91=E9=A9=AC=E5=B0=8F=E7=8C=AB?= <1435130236@qq.com> Date: Mon, 9 Jan 2023 10:33:14 +0800 Subject: [PATCH] [Bug fixes] remove duplicated element_size (#49631) * remove dumplicate element_size * remove tensor_methon_* method --- paddle/fluid/pybind/eager_method.cc | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/paddle/fluid/pybind/eager_method.cc b/paddle/fluid/pybind/eager_method.cc index 529876a660..443dbd1557 100644 --- a/paddle/fluid/pybind/eager_method.cc +++ b/paddle/fluid/pybind/eager_method.cc @@ -1745,14 +1745,6 @@ static PyObject* tensor_method_get_rows(TensorObject* self, EAGER_CATCH_AND_THROW_RETURN_NULL } -static PyObject* tensor_methon_element_size(TensorObject* self, - PyObject* args, - PyObject* kwargs) { - EAGER_TRY - return ToPyObject(paddle::experimental::SizeOf(self->tensor.dtype())); - EAGER_CATCH_AND_THROW_RETURN_NULL -} - static PyObject* tensor__reset_grad_inplace_version(TensorObject* self, PyObject* args, PyObject* kwargs) { @@ -2136,10 +2128,6 @@ PyMethodDef variable_methods[] = { (PyCFunction)(void (*)(void))tensor_method_get_rows, METH_VARARGS | METH_KEYWORDS, NULL}, - {"element_size", - (PyCFunction)(void (*)(void))tensor_methon_element_size, - METH_VARARGS | METH_KEYWORDS, - NULL}, {"_reset_grad_inplace_version", (PyCFunction)(void (*)(void))tensor__reset_grad_inplace_version, METH_VARARGS | METH_KEYWORDS, -- GitLab