[UPDATED PROTOTYPE] Use dynamo fake tensor mode in aot_autograd, move aot_autograd compilation to lowering time#89672
Closed
ezyang wants to merge 8 commits intogh/ezyang/1591/basefrom
Closed
[UPDATED PROTOTYPE] Use dynamo fake tensor mode in aot_autograd, move aot_autograd compilation to lowering time#89672ezyang wants to merge 8 commits intogh/ezyang/1591/basefrom
ezyang wants to merge 8 commits intogh/ezyang/1591/basefrom
Conversation
… aot_autograd compilation to lowering time After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
This was referenced Nov 25, 2022
Closed
Closed
Closed
…ograd, move aot_autograd compilation to lowering time" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ograd, move aot_autograd compilation to lowering time" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
…ograd, move aot_autograd compilation to lowering time" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
Chillee
reviewed
Nov 28, 2022
Collaborator
Chillee
left a comment
There was a problem hiding this comment.
Tentatively LGTM, might need to read more closely.
Collaborator
|
Gonna look at tests on this one. |
Collaborator
|
Oh this is missing the C++ fix @ezyang |
Closed
wconstab
reviewed
Nov 28, 2022
| fake_submod = deepcopy_to_fake_tensor(real_mod, fake_mode) | ||
| else: | ||
| fake_submod = real_mod | ||
| pass |
Contributor
There was a problem hiding this comment.
when is not fake_mode? and why this pass?
bdhirsh
reviewed
Nov 29, 2022
| else: | ||
| # Fallback, in case fake_tensor was not set | ||
| # Particularly for graph args that are not tensors | ||
| result.extend(arg.get_examples()) |
Collaborator
There was a problem hiding this comment.
Two questions about this comment:
(1) The return type of this func is List[torch.Tensor], is that wrong? (comment implies we have to worry about non-tensor graph args)
(2) Should this function maintain the invariant that it never returns real tensors, and assert here that get_examples() in the fallback only returns non-tensors?
…ograd, move aot_autograd compilation to lowering time" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> cc mlazos soumith voznesenskym yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
ezyang
commented
Dec 1, 2022
| self.tx.output.graphargs.append( | ||
| GraphArg(self.get_source(), value, False) | ||
| ) | ||
| graph_arg = None |
Contributor
Author
There was a problem hiding this comment.
There's no need to define graph_arg here
voznesenskym
added a commit
that referenced
this pull request
Dec 2, 2022
…grad compilation to lowering time [Merger of 89672 and 89773]" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) cc mlazos soumith yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
voznesenskym
added a commit
that referenced
this pull request
Dec 2, 2022
…grad compilation to lowering time [Merger of 89672 and 89773]" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) cc mlazos soumith yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
voznesenskym
added a commit
that referenced
this pull request
Dec 2, 2022
…grad compilation to lowering time [Merger of 89672 and 89773]" After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) cc mlazos soumith yanboliang penguinwu anijain2305 EikanWang jgong5 Guobing-Chen chunyuan-w XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx peterbell10 desertfire [ghstack-poisoned]
pytorchmergebot
pushed a commit
that referenced
this pull request
Dec 3, 2022
…ation to lowering time [Merger of 89672 and 89773] (#90039) After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) Pull Request resolved: #90039 Approved by: https://github.com/ezyang
pytorchmergebot
pushed a commit
that referenced
this pull request
Dec 5, 2022
…ation to lowering time [Merger of 89672 and 89773] (#90039) After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) Pull Request resolved: #90039 Approved by: https://github.com/ezyang
voznesenskym
added a commit
that referenced
this pull request
Dec 5, 2022
…ation to lowering time [Merger of 89672 and 89773] (#90039) After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) Pull Request resolved: #90039 Approved by: https://github.com/ezyang fix
voznesenskym
added a commit
that referenced
this pull request
Dec 6, 2022
…ation to lowering time [Merger of 89672 and 89773] (#90039) After all of the preparatory commits, this is a subset of the changes in #89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR #89672, which is a rewrite of an older PR of mine (#89392), with CI Fixes on top of it (#89773) Pull Request resolved: #90039 Approved by: https://github.com/ezyang fix
kulinseth
pushed a commit
to kulinseth/pytorch
that referenced
this pull request
Dec 10, 2022
…ation to lowering time [Merger of 89672 and 89773] (pytorch#90039) After all of the preparatory commits, this is a subset of the changes in pytorch#89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR pytorch#89672, which is a rewrite of an older PR of mine (pytorch#89392), with CI Fixes on top of it (pytorch#89773) Pull Request resolved: pytorch#90039 Approved by: https://github.com/ezyang
kulinseth
pushed a commit
to kulinseth/pytorch
that referenced
this pull request
Dec 10, 2022
…ation to lowering time [Merger of 89672 and 89773] (pytorch#90039) After all of the preparatory commits, this is a subset of the changes in pytorch#89392 that actually change us to propagating fake tensors to backends. Signed-off-by: Edward Z. Yang <ezyangfb.com> This is the merger of Ed's PR pytorch#89672, which is a rewrite of an older PR of mine (pytorch#89392), with CI Fixes on top of it (pytorch#89773) Pull Request resolved: pytorch#90039 Approved by: https://github.com/ezyang
Contributor
Author
|
obsolete |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
After all of the preparatory commits, this is a subset of the
changes in #89392 that actually
change us to propagating fake tensors to backends.
Signed-off-by: Edward Z. Yang ezyang@fb.com
cc @mlazos @soumith @voznesenskym @yanboliang @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @chunyuan-w @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @desertfire