Skip to content

Commit

Permalink
Remove ignored modes workaround (#135502)
Browse files Browse the repository at this point in the history
Summary:
X-link: pytorch/pytorch#135502
Approved by: https://github.com/anijain2305
ghstack dependencies: #134732, #133137, #135443, #135444, #135422

Reviewed By: jeanschmidt

Differential Revision: D62737308

Pulled By: mlazos

fbshipit-source-id: d436c5b5db309e64f17d51dad30a8936567f9a3e
  • Loading branch information
mlazos authored and facebook-github-bot committed Sep 16, 2024
1 parent 99ea924 commit 6b1c40b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3083,16 +3083,10 @@ def is_parameter_freezing():
return torch._inductor.config.freezing and not torch.is_grad_enabled()


def get_torch_function_mode_stack(filter_ignored=True):
from .variables.torch_function import IGNORED_MODES

stack = [
def get_torch_function_mode_stack():
return [
get_torch_function_mode_stack_at(i) for i in range(_len_torch_function_stack())
]
if filter_ignored:
stack = [mode for mode in stack if type(mode) not in IGNORED_MODES]

return stack


def get_torch_function_mode_stack_at(ind):
Expand Down

0 comments on commit 6b1c40b

Please sign in to comment.