KEMBAR78
Inline FxGraphCache.load into its sole call site by ezyang · Pull Request #141681 · pytorch/pytorch · GitHub
Skip to content

Conversation

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 27, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/141681

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit 94447e7 with merge base 0f261e8 (image):

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
@ezyang ezyang added the topic: not user facing topic category label Nov 27, 2024
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 10509d1
Pull Request resolved: #141681
inputs_to_check,
local=config.fx_graph_cache,
remote=fx_graph_remote_cache,
compile_fx_fn = codegen_and_compile
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth making this a separate internal method instead of making this method that much longer?

Copy link
Contributor

Choose a reason for hiding this comment

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

yea, not rly sure this is an improvement lol..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm temporarily making things worse so I am able to easily refactor this code in relation to other code in this context. At the end, we may want to fold it back into a function, though I am not sure. Will reassess at the end.

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Nov 27, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 0ee9b91
Pull Request resolved: #141681
[ghstack-poisoned]
@ezyang
Copy link
Contributor Author

ezyang commented Nov 28, 2024

@pytorchbot merge -f "unrelated failures"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch cherry-pick -x 1e6544ef902eb7b3d937020388d6a7f0f73228b6 returned non-zero exit code 1

Auto-merging torch/_inductor/compile_fx.py
CONFLICT (content): Merge conflict in torch/_inductor/compile_fx.py
error: could not apply 1e6544ef902... Inline FxGraphCache.load into its sole call site
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Details for Dev Infra team Raised by workflow job

[ghstack-poisoned]
pytorchmergebot pushed a commit that referenced this pull request Nov 28, 2024
)

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141683
Approved by: https://github.com/jamesjwu, https://github.com/jansel
ghstack dependencies: #141681
pytorchmergebot pushed a commit that referenced this pull request Nov 29, 2024
I was constantly annoyed at the fact that we had a separate else branch for when cache was disabled which was distinct from when cache was bypassed. This diff gets rid of the disabled cache branch, so we use the same logic for bypass/disable. I actually think this change probably didn't actually matter much for the POC but I think it's cleaner.

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141685
Approved by: https://github.com/aorenste
ghstack dependencies: #141681, #141683
pytorchmergebot pushed a commit that referenced this pull request Nov 29, 2024
Stacked on top of #141685

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141688
Approved by: https://github.com/Skylion007, https://github.com/jansel
ghstack dependencies: #141681, #141683, #141685
pytorchmergebot pushed a commit that referenced this pull request Nov 29, 2024
Stacked on #141688

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141689
Approved by: https://github.com/jansel
ghstack dependencies: #141681, #141683, #141685, #141688
pytorchmergebot pushed a commit that referenced this pull request Nov 29, 2024
Stacked on #141689

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141691
Approved by: https://github.com/jansel
ghstack dependencies: #141681, #141683, #141685, #141688, #141689
pytorchmergebot pushed a commit that referenced this pull request Nov 30, 2024
Stacked on #141691

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: #141695
Approved by: https://github.com/aorenste
ghstack dependencies: #141681, #141683, #141685, #141688, #141689, #141691
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
I need to restructure the body of FxGraphCache.load with the outer if-else in its call site, so inline it goes!

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141681
Approved by: https://github.com/jamesjwu, https://github.com/jansel
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…rch#141683)

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141683
Approved by: https://github.com/jamesjwu, https://github.com/jansel
ghstack dependencies: pytorch#141681
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
I was constantly annoyed at the fact that we had a separate else branch for when cache was disabled which was distinct from when cache was bypassed. This diff gets rid of the disabled cache branch, so we use the same logic for bypass/disable. I actually think this change probably didn't actually matter much for the POC but I think it's cleaner.

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141685
Approved by: https://github.com/aorenste
ghstack dependencies: pytorch#141681, pytorch#141683
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
Stacked on top of pytorch#141685

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141688
Approved by: https://github.com/Skylion007, https://github.com/jansel
ghstack dependencies: pytorch#141681, pytorch#141683, pytorch#141685
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
Stacked on pytorch#141688

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141689
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#141681, pytorch#141683, pytorch#141685, pytorch#141688
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
Stacked on pytorch#141689

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141691
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#141681, pytorch#141683, pytorch#141685, pytorch#141688, pytorch#141689
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
Stacked on pytorch#141691

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: pytorch#141695
Approved by: https://github.com/aorenste
ghstack dependencies: pytorch#141681, pytorch#141683, pytorch#141685, pytorch#141688, pytorch#141689, pytorch#141691
@github-actions github-actions bot deleted the gh/ezyang/3023/head branch December 30, 2024 02:08
desai0007 pushed a commit to desai0007/test-repo-pytorch that referenced this pull request Feb 26, 2025
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 2d2f177
Pull Request resolved: pytorch/pytorch#141681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants