Skip to content
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

[ONNX] Fix Gather replacement in RNN peephole #93120

Closed

Conversation

titaiwangms
Copy link
Collaborator

@titaiwangms titaiwangms commented Jan 27, 2023

Stack from ghstack (oldest at bottom):

From PR: #58691, Replacing the second input of Gather 0 to 1 affects other innocent Nodes. In Issue #91526 onnx::range starts from 0, the 0 is changed by this mechanism, as it's shared with onnx::Gather. This PR intends to create a whole independent Constant 0 for replacement. NOTE: The PR passes all existing RNN tests locally in case CI doesn't include RNN test.

TODO: test

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 27, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit e4cb29f:
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot bot added release notes: onnx torch.onnx related changes that should show up in the release notes labels Jan 27, 2023
titaiwangms added a commit that referenced this pull request Jan 27, 2023
ghstack-source-id: 92eca637ceb06905d7d0c0573f73358979b78588
Pull Request resolved: #93120
@titaiwangms titaiwangms changed the title draft fix RNN gather pad [ONNX] Fix Gather replacement in RNN peephole Jan 27, 2023
@titaiwangms titaiwangms added topic: bug fixes topic category module: onnx Related to torch.onnx labels Jan 27, 2023
From PR: #58691, Replacing the second input of `Gather` 0 to 1 affects other innocent Nodes. In Issue #91526 onnx::range starts from 0, the 0 is changed by this mechanism, as it's shared by onnx::Gather. This PR intends to create a whole independent Constant 0 for replacement.

TODO: test

[ghstack-poisoned]
titaiwangms added a commit that referenced this pull request Jan 27, 2023
ghstack-source-id: 2bf91b7228e2c395d1dbd1258dedc395ce991d87
Pull Request resolved: #93120
From PR: #58691, Replacing the second input of `Gather` 0 to 1 affects other innocent Nodes. In Issue #91526 onnx::range starts from 0, the 0 is changed by this mechanism, as it's shared by onnx::Gather. This PR intends to create a whole independent Constant 0 for replacement. NOTE: The PR passes all existing RNN tests locally in case CI doesn't include RNN test.

TODO: test

[ghstack-poisoned]
titaiwangms added a commit that referenced this pull request Jan 30, 2023
ghstack-source-id: 4678c349c023996ae561cc95cd35901fc49c3e31
Pull Request resolved: #93120
From PR: #58691, Replacing the second input of `Gather` 0 to 1 affects other innocent Nodes. In Issue #91526 onnx::range starts from 0, the 0 is changed by this mechanism, as it's shared by onnx::Gather. This PR intends to create a whole independent Constant 0 for replacement. NOTE: The PR passes all existing RNN tests locally in case CI doesn't include RNN test.

TODO: test

[ghstack-poisoned]
titaiwangms added a commit that referenced this pull request Jan 31, 2023
ghstack-source-id: 9adc6747be516523bdaf07b7bbbce4ec12d85c41
Pull Request resolved: #93120
From PR: #58691, Replacing the second input of `Gather` 0 to 1 affects other innocent Nodes. In Issue #91526 onnx::range starts from 0, the 0 is changed by this mechanism, as it's shared by onnx::Gather. This PR intends to create a whole independent Constant 0 for replacement. NOTE: The PR passes all existing RNN tests locally in case CI doesn't include RNN test.

TODO: test

[ghstack-poisoned]
titaiwangms added a commit that referenced this pull request Jan 31, 2023
ghstack-source-id: feb44c5a3658c38a05df3c38cc013d5102c015cf
Pull Request resolved: #93120
@titaiwangms
Copy link
Collaborator Author

@pytorchbot merge -g

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 31, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / win-vs2019-cuda11.6-py3 / test (default, 2, 5, windows.g5.4xlarge.nvidia.gpu)

Details for Dev Infra team Raised by workflow job

@titaiwangms
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

From PR: #58691, Replacing the second input of `Gather` 0 to 1 affects other innocent Nodes. In Issue #91526 onnx::range starts from 0, the 0 is changed by this mechanism, as it's shared with onnx::Gather. This PR intends to create a whole independent Constant 0 for replacement. NOTE: The PR passes all existing RNN tests locally in case CI doesn't include RNN test.

~~TODO: test~~

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/AllenTiTaiWang/35/orig onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/93120)

pytorchmergebot pushed a commit that referenced this pull request Feb 1, 2023
ghstack-source-id: 3415695766a082843cf1218cc73dd6a3435edc96
Pull Request resolved: #93120
@titaiwangms
Copy link
Collaborator Author

@pytorchbot merge -g

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

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

@facebook-github-bot facebook-github-bot deleted the gh/AllenTiTaiWang/35/head branch June 8, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged module: onnx Related to torch.onnx open source release notes: onnx torch.onnx related changes that should show up in the release notes topic: bug fixes topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ONNX exporter : wrong constants generated for onnx::range() if onnx::LSTM follows
4 participants