-
Notifications
You must be signed in to change notification settings - Fork 360
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
fix: FakeTensors appearing in get_attr
calls
#2669
Conversation
- Register all constants as model parameters, which do not get fake-ified by the active FakeTensor context - Buffers and other constant registrations can be fake-ified, which is problematic for TRT tracing
dabc04f
to
88f7895
Compare
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.
Looks good to me! I'm just wondering if PyTorch has documentation to illustrate what kind of types will be fake-ified?
Thanks for the review - I haven't found any concrete documentation on this topic; this is mainly a workaround that I've found to work for a few key models and not break others. This documentation on |
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.
@gs-olive can you merge this one? |
Since testing is not working in CI, running the Dynamo test suite locally to verify |
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
Description
Fixes #2658
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: