Skip to content

Commit

Permalink
Use a smarter way to detect backward method.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Nov 20, 2024
1 parent c4cb4ca commit f2d52db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tritonbench/utils/triton_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,6 @@ def run_and_capture(self, *args, **kwargs):
) as f:
f.write(sass)

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

0 comments on commit f2d52db

Please sign in to comment.