-
Notifications
You must be signed in to change notification settings - Fork 756
Use default FakeTensorMode when calling module without input #16222
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
base: main
Are you sure you want to change the base?
Conversation
Before, _ExportPassBase set self.tracer.fake_tensor_mode to a default value, but didn't use it when tracing. This caused operators that only have fake tensor implementations to crash. Signed-off-by: Erik Lundell <[email protected]> Change-Id: I8d7ef0cc841b0e46cd04ea4ed941b761798a76d2
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16222
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 6 Cancelled Jobs, 1 Unrelated FailureAs of commit 2da9794 with merge base d968e47 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
It is hard for me to asses the side effects of this change but I think it makes sense. Can I get help getting the correct person to review this? @digantdesai |
| fake_tensor_mode = i.fake_mode | ||
| if fake_tensor_mode is None: | ||
| self.tracer.fake_tensor_mode = FakeTensorMode(allow_non_fake_inputs=True) | ||
| fake_tensor_mode = nullcontext() # type: ignore[assignment] |
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.
@angelayi @tugsbayasgalan what is the difference between None and nullcontext() for fake tensor mode
Before, _ExportPassBase set self.tracer.fake_tensor_mode to a default value, but didn't use it when tracing. This caused operators that only have fake tensor implementations to crash.
cc @freddan80 @per @zingo @oscarandersson8218 @digantdesai