Skip to content

Replace FakeTensorUpdater copy with Torch import - #4260

Merged
narendasan merged 1 commit into
pytorch:mainfrom
benjaminglass1:update_faketensorupdater_init
May 20, 2026
Merged

narendasan merged 1 commit into
pytorch:mainfrom
benjaminglass1:update_faketensorupdater_init

Conversation

@benjaminglass1

@benjaminglass1 benjaminglass1 commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

#4017 added a copy of torch._inductor.fx_utils.FakeTensorUpdater to the repo, with some minor changes. The original class is being updated to handle subgraphs and HOPs, and fix corner cases, in pytorch/pytorch#159523. Rather than once again copying all the new code over, I've changed to subclassing from FakeTensorUpdater and only implementing the interface changes.

Type of change

  • Port of PyTorch feature updates

Checklist:

  • My code follows the style guidelines of this project (You can use the linters)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas and hacks
  • I have made corresponding changes to the documentation
  • I have added tests to verify my fix or my feature
  • New and existing unit tests pass locally with my changes
  • I have added the relevant labels to my PR in so that relevant reviewers are notified

@meta-cla meta-cla Bot added the cla signed label May 13, 2026
@github-actions github-actions Bot added component: lowering Issues re: The lowering / preprocessing passes component: core Issues re: The core compiler component: api [Python] Issues re: Python API component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths labels May 13, 2026
@github-actions
github-actions Bot requested a review from zewenli98 May 13, 2026 17:18
@narendasan
narendasan requested a review from cehongwang May 14, 2026 15:37
@benjaminglass1
benjaminglass1 force-pushed the update_faketensorupdater_init branch from ea959c9 to 0d093c7 Compare May 15, 2026 16:05
@benjaminglass1

Copy link
Copy Markdown
Contributor Author

Updated with a compatibility patch, to handle the fact that this code is not in a release yet.

@benjaminglass1
benjaminglass1 marked this pull request as ready for review May 15, 2026 16:06
@narendasan

Copy link
Copy Markdown
Collaborator

@cehongwang Can you review when you get back?

@benjaminglass1
benjaminglass1 force-pushed the update_faketensorupdater_init branch from 0d093c7 to 8567fbe Compare May 15, 2026 17:03

@cehongwang cehongwang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@benjaminglass1

Copy link
Copy Markdown
Contributor Author

As far as I can tell, test failures are unrelated to this PR. @cehongwang Can you merge?

@narendasan
narendasan merged commit 1ac8670 into pytorch:main May 20, 2026
79 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed component: api [Python] Issues re: Python API component: core Issues re: The core compiler component: dynamo Issues relating to the `torch.compile` or `torch._dynamo.export` paths component: lowering Issues re: The lowering / preprocessing passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants