Skip to content

Commit

Permalink
Remove useless lambdas (#113602)
Browse files Browse the repository at this point in the history
Summary:
Applies PLW0108 which removes useless lambda calls in Python, the rule is in preview so it is not ready to be enabled by default just yet. These are the autofixes from the rule.

X-link: pytorch/pytorch#113602
Approved by: https://github.com/albanD

Reviewed By: huydhn

Differential Revision: D51336713

fbshipit-source-id: c9534397327d71c5cdeb04ac31884879fb17818c
  • Loading branch information
Skylion007 authored and facebook-github-bot committed Nov 15, 2023
1 parent 1069310 commit 876017c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userbenchmark/dynamo/dynamobench/_dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ class CompileProfiler:
def __init__(self):
self.frame_count = 0
self.op_count = 0
self.backend_ctx_ctor = lambda: disable_cache_limit()
self.backend_ctx_ctor = disable_cache_limit

def __call__(self, gm: torch.fx.GraphModule, example_inputs):
self.frame_count += 1
Expand Down

0 comments on commit 876017c

Please sign in to comment.