未验证 提交 a698eb7d 编写于 作者: H HongyuJia 提交者: GitHub

[Polish utils/pybind.h] Delete p_tensor_type in pybind.h (#51715)

上级 ff40a7e5
...@@ -21,8 +21,8 @@ DECLARE_string(tensor_operants_mode); ...@@ -21,8 +21,8 @@ DECLARE_string(tensor_operants_mode);
namespace paddle { namespace paddle {
namespace pybind { namespace pybind {
PyTypeObject* p_tensor_type; PyTypeObject* p_tensor_type = nullptr;
PyTypeObject* p_string_tensor_type; PyTypeObject* p_string_tensor_type = nullptr;
bool PyCheckTensor(PyObject* obj) { bool PyCheckTensor(PyObject* obj) {
if (!p_tensor_type) { if (!p_tensor_type) {
......
...@@ -24,8 +24,6 @@ namespace py = pybind11; ...@@ -24,8 +24,6 @@ namespace py = pybind11;
namespace paddle { namespace paddle {
namespace pybind { namespace pybind {
extern PyTypeObject* p_tensor_type;
typedef struct { typedef struct {
PyObject_HEAD paddle::Tensor tensor; PyObject_HEAD paddle::Tensor tensor;
// Weak references // Weak references
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册