Skip to content

Conversation

@Erik-Lundell
Copy link
Collaborator

@Erik-Lundell Erik-Lundell commented Dec 12, 2025

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

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
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 12, 2025

🔗 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 Failure

As of commit 2da9794 with merge base d968e47 (image):

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.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 12, 2025
@Erik-Lundell Erik-Lundell added partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm ciflow/trunk release notes: arm Changes to the ARM backend delegate release notes: none Do not include this in the release notes and removed release notes: arm Changes to the ARM backend delegate labels Dec 12, 2025
@Erik-Lundell
Copy link
Collaborator Author

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]
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. partner: arm For backend delegation, kernels, demo, etc. from the 3rd-party partner, Arm release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants