未验证 提交 1574a862 编写于 作者: 骑马小猫 提交者: GitHub

[Bug fixes] remove duplicated element_size (#49631)

* remove dumplicate element_size

* remove tensor_methon_* method
上级 926c4bd2
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册