Skip to content

Commit

Permalink
typing compile_fx.py (#138033)
Browse files Browse the repository at this point in the history
Summary:
Type annotations for compile_fx.
- Some of the stuff here is pretty complicated (functions which return functions that take functions) so I bailed on those and used `Any` just to get the rest landed.
- There are also changes to type signatures in other files which I did just to let mypy know more about the types in compile_fx.py.

X-link: pytorch/pytorch#138033
Approved by: https://github.com/Skylion007

Reviewed By: wdvr

Differential Revision: D64714765

Pulled By: aorenste

fbshipit-source-id: 262f5cb9b2171e96ce9f895772bd5778ddb4ebe0
  • Loading branch information
aorenste authored and facebook-github-bot committed Oct 22, 2024
1 parent fb590d9 commit 1154318
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 @@ -516,7 +516,7 @@ def count_calls(g: fx.Graph) -> int:
return c


def identity(x):
def identity(x: T) -> T:
return x


Expand Down

0 comments on commit 1154318

Please sign in to comment.