File tree Expand file tree Collapse file tree 3 files changed +0
-12
lines changed
Expand file tree Collapse file tree 3 files changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,7 @@ namespace py = pybind11; // NOLINT
6161namespace paddle ::pybind {
6262
6363static bool PyCheckInteger (PyObject *obj) {
64- #if PY_VERSION_HEX < 0x03000000
65- return (PyLong_Check (obj) || PyInt_Check (obj)) && !PyBool_Check (obj);
66- #else
6764 return PyLong_Check (obj) && !PyBool_Check (obj);
68- #endif
6965}
7066
7167using paddle::distributed::auto_parallel::DistTensorSpec;
Original file line number Diff line number Diff line change @@ -56,11 +56,7 @@ using egr::InputsContainDistTensor;
5656namespace paddle ::pybind {
5757
5858static bool PyCheckInteger (PyObject* obj) {
59- #if PY_VERSION_HEX < 0x03000000
60- return (PyLong_Check (obj) || PyInt_Check (obj)) && !PyBool_Check (obj);
61- #else
6259 return PyLong_Check (obj) && !PyBool_Check (obj);
63- #endif
6460}
6561
6662static bool IsNumpyType (PyObject* obj) {
Original file line number Diff line number Diff line change @@ -245,11 +245,7 @@ inline T GetDenseTensorValue(const phi::DenseTensor* x) {
245245static Py_ssize_t GetSliceIndexFromPyObject (PyObject* obj);
246246// Slice related methods
247247static bool PyCheckInteger (PyObject* obj) {
248- #if PY_VERSION_HEX < 0x03000000
249- return (PyLong_Check (obj) || PyInt_Check (obj)) && !PyBool_Check (obj);
250- #else
251248 return PyLong_Check (obj) && !PyBool_Check (obj);
252- #endif
253249}
254250
255251static bool IsNumpyType (PyObject* obj) {
You can’t perform that action at this time.
0 commit comments