Skip to content

Commit

Permalink
fix a bug which is triggered by the lack of __class__.op_type (#51101)
Browse files Browse the repository at this point in the history
* fix a bug which is triggered by the lack of __class__.op_type

* remove two "self.__class__.op_type = self.op_type"
  • Loading branch information
Vvsmile authored Mar 6, 2023
1 parent e205492 commit 203a62b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/paddle/fluid/tests/unittests/op_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,7 @@ def check_output_with_place(
if prim_checker.is_only_check_prim():
self.only_prim = True
return

# disable legacy dygraph check when check_eager is True
if check_eager:
check_dygraph = False
Expand Down Expand Up @@ -2102,6 +2103,7 @@ def check_output(
self.check_compile_vs_runtime(fetch_list, outs)

def check_output_customized(self, checker, custom_place=None):
self.__class__.op_type = self.op_type
places = self._get_places()
if custom_place:
places.append(custom_place)
Expand Down

0 comments on commit 203a62b

Please sign in to comment.