Skip to content

Conversation

zou3519
Copy link
Contributor

@zou3519 zou3519 commented Sep 3, 2024

Stack from ghstack (oldest at bottom):

Fixes #135057

The bug was: in the situation that Dynamo graph breaks in the forward
and Compiled Autograd uses Dynamo to introspect the backward, we end up
running into a "Unsupported: inlining through SKIPFILES" error. The
solution is to mark the entirety of this module as inlineable.

Test Plan:

  • new test

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire @chauhang @rec

Fixes #135057

Test Plan:
- new test

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Sep 3, 2024

🔗 Helpful Links

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

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

✅ You can merge normally! (21 Unrelated Failures)

As of commit 5310d23 with merge base 7858045 (image):

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

zou3519 added a commit that referenced this pull request Sep 3, 2024
Fixes #135057

Test Plan:
- new test

ghstack-source-id: 7a30021
Pull Request resolved: #135066
@@ -172,6 +172,26 @@ def fn():

self.check_output_and_recompiles(fn)

def test_graph_break_custom_op(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

curious: does it mean we need to graph-break when custom op is used in compiled autograd graph?

(Traceable FSDP2 requires that compiled autograd backward graph has no graph break, so hoping graph-break here is not a requirement haha)

Copy link
Contributor Author

@zou3519 zou3519 Sep 3, 2024

Choose a reason for hiding this comment

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

curious: does it mean we need to graph-break when custom op is used in compiled autograd graph?

No. We are testing what happens if (1) a user has a custom op that graph breaks in the forward and (2) we use compiled autograd on this. Previously, this would raise an error. After this PR, it works

@zou3519 zou3519 added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 4, 2024
…rad"

Fixes #135057

The bug was: in the situation that Dynamo graph breaks in the forward
and Compiled Autograd uses Dynamo to introspect the backward, we end up
running into a "Unsupported: inlining through SKIPFILES" error. The
solution is to mark the entirety of this module as inlineable.

Test Plan:
- new test

[ghstack-poisoned]
…rad"

Fixes #135057

The bug was: in the situation that Dynamo graph breaks in the forward
and Compiled Autograd uses Dynamo to introspect the backward, we end up
running into a "Unsupported: inlining through SKIPFILES" error. The
solution is to mark the entirety of this module as inlineable.

Test Plan:
- new test

[ghstack-poisoned]
zou3519 added a commit that referenced this pull request Sep 4, 2024
Fixes #135057

The bug was: in the situation that Dynamo graph breaks in the forward
and Compiled Autograd uses Dynamo to introspect the backward, we end up
running into a "Unsupported: inlining through SKIPFILES" error. The
solution is to mark the entirety of this module as inlineable.

Test Plan:
- new test

ghstack-source-id: 63bfc87
Pull Request resolved: #135066
@zou3519 zou3519 marked this pull request as ready for review September 4, 2024 19:02
@zou3519
Copy link
Contributor Author

zou3519 commented Sep 4, 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

Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Sep 20, 2024
…h#135066)

Fixes pytorch#135057

The bug was: in the situation that Dynamo graph breaks in the forward
and Compiled Autograd uses Dynamo to introspect the backward, we end up
running into a "Unsupported: inlining through SKIPFILES" error. The
solution is to mark the entirety of this module as inlineable.

Test Plan:
- new test

Pull Request resolved: pytorch#135066
Approved by: https://github.com/bdhirsh, https://github.com/williamwen42, https://github.com/yanboliang
@github-actions github-actions bot deleted the gh/zou3519/1061/head branch October 5, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants