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] Do not run 'deduplicate_initializers' when 'keep_initializers_as_inputs' is True #96320

Closed
wants to merge 3 commits into from

Conversation

BowenBao
Copy link
Collaborator

@BowenBao BowenBao commented Mar 8, 2023

Stack from ghstack (oldest at bottom):

Proposal

When arg of 'keep_initializers_as_inputs' is True, it's quite possible that parameters are set by initializer of input.
Hence we should disable de-duplicate initializer optimization when 'keep_initializers_as_inputs==True'.

  • Update doc related to keep_initializers_as_inputs.

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 8, 2023

🔗 Helpful Links

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

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

✅ 1 Unrelated Failure

As of commit 6f59ab3:

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

@pytorch-bot pytorch-bot bot added the release notes: onnx torch.onnx related changes that should show up in the release notes label Mar 8, 2023
BowenBao added a commit that referenced this pull request Mar 8, 2023
…as_inputs' is True

ghstack-source-id: 3971e381c11f3291ce1a14f985fc245a6360c391
Pull Request resolved: #96320
@BowenBao BowenBao marked this pull request as ready for review March 8, 2023 20:53
@BowenBao BowenBao requested a review from abock as a code owner March 8, 2023 20:53
@BowenBao BowenBao added module: onnx Related to torch.onnx topic: improvements topic category labels Mar 8, 2023
@BowenBao BowenBao marked this pull request as draft March 8, 2023 20:53
Copy link
Collaborator

@thiagocrepaldi thiagocrepaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe update docstring for keep_initializers_as_inputs to let users know of this side effect?

@github-actions
Copy link

github-actions bot commented Jul 2, 2023

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Jul 2, 2023
Copy link
Contributor

@abock abock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BowenBao can you update the docstring per @thiagocrepaldi's ask and rebase the PR?

@thiagocrepaldi
Copy link
Collaborator

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

…itializers_as_inputs' is True"


### Proposal
When arg of 'keep_initializers_as_inputs' is True, it's quite possible that parameters are set by initializer of input.
Hence we should disable de-duplicate initializer optimization when 'keep_initializers_as_inputs==True'.

- [ ] Update doc related to `keep_initializers_as_inputs`.

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Successfully rebased gh/BowenBao/212/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/96320)

pytorchmergebot pushed a commit that referenced this pull request Aug 1, 2023
…as_inputs' is True

ghstack-source-id: fead9d663757be87f05487c2816f95bf5c78a4eb
Pull Request resolved: #96320
…itializers_as_inputs' is True"


### Proposal
When arg of 'keep_initializers_as_inputs' is True, it's quite possible that parameters are set by initializer of input.
Hence we should disable de-duplicate initializer optimization when 'keep_initializers_as_inputs==True'.

- [ ] Update doc related to `keep_initializers_as_inputs`.

[ghstack-poisoned]
BowenBao added a commit that referenced this pull request Aug 1, 2023
…as_inputs' is True

ghstack-source-id: c0d7d0fb8aee0bc363be8cef28e4698f51ff1623
Pull Request resolved: #96320
@BowenBao BowenBao marked this pull request as ready for review August 1, 2023 16:28
@BowenBao
Copy link
Collaborator Author

BowenBao commented Aug 1, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 1, 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

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 Stale topic: improvements topic category
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants