-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[torchlib] Add the identity nodes back (#1703)
In the modularization pass in the exporter, a single node like `clone` can be lifted as a function. If we remove the only Identity node the lifted function will have no nodes. This violates the ONNX standard. Since removing identity nodes is fast, we are safe to include these identity nodes in the torchlib. onnxscript/tools/transformers_models/phi_test.py broke after #1613, it is fixed by this change. --------- Signed-off-by: Xavier Dupre <[email protected]> Co-authored-by: Justin Chu <[email protected]>
- Loading branch information
1 parent
1aa7a70
commit be00339
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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