[ONNX] Update the sequence of initializers in exported graph so that it is as same as inputs.#49798
Merged
BowenBao merged 15 commits intopytorch:onnx_ms_1from Jan 5, 2021
fatcat-z:master
Merged
[ONNX] Update the sequence of initializers in exported graph so that it is as same as inputs.#49798BowenBao merged 15 commits intopytorch:onnx_ms_1from fatcat-z:master
BowenBao merged 15 commits intopytorch:onnx_ms_1from
fatcat-z:master
Conversation
Sync to latest branch.
Get latest changes from pytorch branch.
Get latest changes in master.
Sync from Onnx ms 1
Sync from Onnx ms 1
Contributor
💊 CI failures summary and remediationsAs of commit efd09b9 (more details on the Dr. CI page):
🕵️ 2 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
neginraoof
reviewed
Dec 23, 2020
Collaborator
|
Thanks @fatcat-z, could you check the failed onnx_ort_test1/onnx_ort_test2 CI tests and fix if related? |
BowenBao
reviewed
Jan 5, 2021
Collaborator
Author
It has been fixed by updating expect file. |
BowenBao
approved these changes
Jan 5, 2021
spandantiwari
pushed a commit
to spandantiwari/pytorch
that referenced
this pull request
Jan 8, 2021
…it is as same as inputs. (pytorch#49798) * [ONNX] Support onnx if/loop sequence output in opset 13 - (pytorch#49270) * Symbolic function for torch.square (pytorch#49446) * [ONNX] Support onnx if/loop sequence output in opset 13 - (pytorch#49270) * Symbolic function for torch.square (pytorch#49446) * Update code so that initializers' sequence is as same as inputs. * Correct the format according to flake8. * Correct the format by clang-format. * Add a new test for script model. * Update expect files for Test_Operators tests. Co-authored-by: Bowen Bao <[email protected]> Co-authored-by: David Fan <[email protected]>
facebook-github-bot
pushed a commit
that referenced
this pull request
Jan 13, 2021
Summary: [ONNX] ONNX dev branch merge 01-06-2021 - [ONNX] Support onnx if/loop sequence output in opset 13 - (#49270) - Symbolic function for torch.square (#49446) - [ONNX] Add checks in ONNXSetDynamicInputShape (#49783) … - [ONNX] Enable export af aten::__derive_index (#49514) … - [ONNX] Update symbolic for unfold (#49378) … - [ONNX] Update the sequence of initializers in exported graph so that it is as same as inputs. (#49798) - [ONNX] Enable opset 13 ops (#49612) … - [ONNX] Improve error message for supported model input types in ONNX export API. (#50119) - [ONNX] Add a post-pass for If folding (#49410) Pull Request resolved: #50163 Reviewed By: pbelevich Differential Revision: D25821059 Pulled By: SplitInfinity fbshipit-source-id: 9f511a93d9d5812d0ab0a49d61ed0fa5f8066948
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.
In the process of export, initializers were saved in a C++ map container. Map will automatically sort the elements when an insertion happened. This causes initializers lose the insertion sequence which is supposed to be kept.
So update the backend code to create initializers following up on the inputs sequence in a final stage where initializers were not kept in a map container.