Skip to content

Commit

Permalink
Add profiling for backward (#120540)
Browse files Browse the repository at this point in the history
Summary:
Fixes #ISSUE_NUMBER

X-link: pytorch/pytorch#120540
Approved by: https://github.com/anijain2305

Reviewed By: kit1980

Differential Revision: D54192278

Pulled By: mlazos

fbshipit-source-id: 7e813e112f5ce7b36c1fe62f2018494d495b5dc2
  • Loading branch information
mlazos authored and facebook-github-bot committed Feb 27, 2024
1 parent 3c38692 commit a08683b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ def tabulate(rows, headers):
)


def maybe_cprofile(func):
if config.cprofile:
return cprofile_wrapper(func)
return func


def cprofile_wrapper(func):
@wraps(func)
def profile_wrapper(*args, **kwargs):
Expand Down

0 comments on commit a08683b

Please sign in to comment.