-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[fx][const_fold] Refactor to use base split module to simplify, and correctly handle non-single-Tensor outputs #65933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slow For more information, please take a look at the CI Flow Wiki. |
a41cd9a
to
3d29535
Compare
3d29535
to
cabbafd
Compare
cabbafd
to
332a5b2
Compare
@pytorchbot ciflow rerun linux-xenial-py3.6-gcc5.4 |
332a5b2
to
29b1fe4
Compare
29b1fe4
to
bcdb652
Compare
@pytorchbot ciflow rerun linux-xenial-py3.6 |
bcdb652
to
09793e4
Compare
09793e4
to
11700ef
Compare
11700ef
to
ebea0a1
Compare
…orrectly handle non-single-Tensor outputs (pytorch#65933) Summary: Pull Request resolved: pytorch#65933 We use `split_module` to split the input model that we want to const fold into const and non-const subgraphs. Previously we were taking the non-const graph and trying to hack it back into the same signature as the input model. However this was complex/buggy. Instead, refactor to just keep using the base split module that contains both const and non-const graphs. This means we: - Inline the non-const graph into the split module - Remove the const graph from the module and replace it with a getattr that will be run to insert that attr when we `run_folding` Test Plan: Added test coverage to cover newly supported folding, and updated other tests for new strategy. Reviewed By: yinghai Differential Revision: D31293307 fbshipit-source-id: e1174337e1473c7c3a5f82f0227a6fd0ce42db8c
ebea0a1
to
447d55d
Compare
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 447d55d (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
Summary:
We use
split_module
to split the input model that we want to const fold into const and non-const subgraphs. Previously we were taking the non-const graph and trying to hack it back into the same signature as the input model. However this was complex/buggy.Instead, refactor to just keep using the base split module that contains both const and non-const graphs. This means we:
run_folding
Test Plan: Added test coverage to cover newly supported folding, and updated other tests for new strategy.
Differential Revision: D31293307