Skip to content

Commit 2881411

Browse files
remove more unnecessary unwrapping code (#72955)
1 parent 68b9192 commit 2881411

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

paddle/fluid/pybind/eager_utils.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,10 +1278,6 @@ paddle::optional<paddle::Tensor> GetOptionalTensorFromArgs(
12781278
const phi::distributed::ProcessMesh* mesh) {
12791279
PyObject* obj = PyTuple_GET_ITEM(args, arg_idx);
12801280

1281-
if (PyTuple_Check(obj)) {
1282-
obj = PyTuple_GET_ITEM(obj, 0);
1283-
}
1284-
12851281
if (obj == nullptr || obj == Py_None) {
12861282
if (!dispensable) {
12871283
PADDLE_THROW(common::errors::InvalidArgument(
@@ -1611,10 +1607,6 @@ paddle::Tensor* GetTensorPtrFromArgs(const std::string& op_type,
16111607
bool dispensable) {
16121608
PyObject* obj = PyTuple_GET_ITEM(args, arg_idx);
16131609

1614-
if (PyTuple_Check(obj)) {
1615-
obj = PyTuple_GET_ITEM(obj, 0);
1616-
}
1617-
16181610
if (obj == nullptr || obj == Py_None) {
16191611
if (!dispensable) {
16201612
PADDLE_THROW(common::errors::InvalidArgument(

0 commit comments

Comments
 (0)