-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion to check if fake tensors have leaked into python #1447
Conversation
Seems fine, but tests are failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but you have a couple of errors
Yes, the goal was to run CI to uncover any such issues. Happy that CI uncovered atleast one. It seems to be Fake tensor issue as well. We should fix that one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually not that familiar with GraphArg
or how it is used. Also, the test is failing correctly returns non-fake tensors which makes me a little suspect of this. We could also error in aot_eager instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix tests before landing
641e505
to
17f9650
Compare
17f9650
to
740130c
Compare
@jansel Can you please review again as I added some Update - Removed the eq code because.I later realized that dataclasses have |
I am seeing a fake tensor in
frame.f_locals
which is confusing to me. And I think this is wrong. Fake tensor is internal, and when someone runs a graph with real inputs, none of the output should be a FakeTensor.So, adding an assertion to catch it somewhat early to help debug and share some repros.