KEMBAR78
Move post compile steps into post_compile1/post_compile2 method by ezyang · Pull Request #141656 · pytorch/pytorch · GitHub
Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Nov 27, 2024

[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/141656

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

✅ You can merge normally! (2 Unrelated Failures)

As of commit dc597d0 with merge base dbbebee (image):

UNSTABLE - The following jobs failed but were 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: 7cf1ceb
Pull Request resolved: #141656
static_input_idxs: Sequence[int],
fx_kwargs: _CompileFxKwargs,
inputs_to_check: Sequence[int],
boxed_forward_device_index: Optional[BoxedDeviceIndex],
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 just bashed arguments in here until all the free variables were lifted as arguments. It probably needs a little reordering / coalescing, will figure this out on the next PR.

compiled_graph = FxGraphCache.post_compile(
compiled_graph, example_inputs, cudagraphs, gm
)
compiled_graph.post_compile2(example_inputs, cudagraphs, gm)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is there post_compile1/post_compile2? It has to do with the FxGraphCache.load path above. I plan to refactor that too, but this is an intermediate step.

# We only return a string in aot mode, in which case we don't
# need to do any post-compilation steps: we just return the string,
# which is the filename of the compiled code.
return compiled_graph
Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can see above that post compile does nothing in AOT mode. I want to eventually have AOTInductor do its own custom post compile logic at this point. However, I think there really should only be one post compile method.

@ezyang ezyang added the topic: not user facing topic category label Nov 27, 2024
@ezyang ezyang requested a review from desertfire November 27, 2024 05:12
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@ezyang
Copy link
Contributor Author

ezyang commented Nov 27, 2024

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 27, 2024
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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: 1 jobs have failed, first few of them are: trunk / linux-focal-rocm6.2-py3.10 / test (default, 2, 2, linux.rocm.gpu)

Details for Dev Infra team Raised by workflow job

[ghstack-poisoned]
@ezyang
Copy link
Contributor Author

ezyang commented Nov 28, 2024

@pytorchbot merge -f "unrelated failures only"

@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

pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…rch#141656)

The intention for turning these into methods is so that the AOTInductor compile path can implement them differently. I haven't worked out the implications yet though, but this seemed like a good stopping point for now.

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

Pull Request resolved: pytorch#141656
Approved by: https://github.com/aorenste, https://github.com/jamesjwu, https://github.com/jansel
Esquains pushed a commit to Esquains/study1 that referenced this pull request Dec 15, 2024
Signed-off-by: Edward Z. Yang <ezyang@meta.com>

ghstack-source-id: 8e34983
Pull Request resolved: pytorch/pytorch#141656
@github-actions github-actions bot deleted the gh/ezyang/3022/head branch December 30, 2024 02:08
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.

5 participants