Skip to content

Commit de4c76b

Browse files
committed
Use a smarter way to detect backward method.
1 parent 483599d commit de4c76b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tritonbench/utils/triton_op.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1518,6 +1518,6 @@ def run_and_capture(self, *args, **kwargs):
15181518
) as f:
15191519
f.write(sass)
15201520

1521-
@property
1522-
def has_bwd(self) -> bool:
1523-
return self.get_bwd_fn.__code__ is BenchmarkOperator.get_bwd_fn.__code__
1521+
@classmethod
1522+
def has_bwd(cls) -> bool:
1523+
return cls.get_bwd_fn is not BenchmarkOperator.get_bwd_fn

0 commit comments

Comments
 (0)