diff --git a/python/paddle/fluid/tests/unittests/eager_op_test.py b/python/paddle/fluid/tests/unittests/eager_op_test.py index 76d36a1c456adce71d94a7c3f7c6fa3830673bee..f75ca8fb3a7364e674faf03e3999f5dd92e53ac8 100644 --- a/python/paddle/fluid/tests/unittests/eager_op_test.py +++ b/python/paddle/fluid/tests/unittests/eager_op_test.py @@ -1522,7 +1522,7 @@ class OpTest(unittest.TestCase): core._set_prim_all_enabled(False) core.set_prim_eager_enabled(False) - if hasattr(self, "use_custom_device") and self.use_custom_device(): + if hasattr(self, "use_custom_device") and self.use_custom_device: check_dygraph = False def find_imperative_actual(target_name, dygraph_outs, place): @@ -2069,7 +2069,7 @@ class OpTest(unittest.TestCase): if self.is_xpu_op(): self.__class__.use_xpu = True - if hasattr(self, "use_custom_device") and self.use_custom_device(): + if hasattr(self, "use_custom_device") and self.use_custom_device: check_dygraph = False places = self._get_places() @@ -2232,7 +2232,7 @@ class OpTest(unittest.TestCase): only_check_prim=False, atol=1e-5, ): - if hasattr(self, "use_custom_device") and self.use_custom_device(): + if hasattr(self, "use_custom_device") and self.use_custom_device: check_dygraph = False self._check_grad_helper() @@ -2271,7 +2271,7 @@ class OpTest(unittest.TestCase): numeric_place=None, atol=1e-5, ): - if hasattr(self, "use_custom_device") and self.use_custom_device(): + if hasattr(self, "use_custom_device") and self.use_custom_device: check_dygraph = False core._set_prim_all_enabled(False) @@ -2492,7 +2492,7 @@ class OpTest(unittest.TestCase): no_grad_set=None, check_dygraph=True, ): - if hasattr(self, "use_custom_device") and self.use_custom_device(): + if hasattr(self, "use_custom_device") and self.use_custom_device: check_dygraph = False with fluid.dygraph.base.guard(place=place):