Prompt layer-wise recompute when applicable#20126
Merged
Merged
Conversation
…pengwa/enable_layerwise_automatically
wschin
reviewed
Apr 9, 2024
wschin
reviewed
Apr 9, 2024
…pengwa/enable_layerwise_automatically
wschin
reviewed
Apr 9, 2024
wschin
reviewed
Apr 9, 2024
wschin
reviewed
Apr 9, 2024
wschin
reviewed
Apr 9, 2024
wschin
previously approved these changes
Apr 9, 2024
Contributor
wschin
left a comment
There was a problem hiding this comment.
Good efforts to consolidates the flags we have.
…pengwa/enable_layerwise_automatically
mindest
approved these changes
Apr 10, 2024
Contributor
Author
TedThemistokleous
pushed a commit
to TedThemistokleous/onnxruntime
that referenced
this pull request
May 7, 2024
### Prompt layer-wise when applicable Give explicit prompts in export failures to users to enable layer-wise memory optimization if we found the checkpoint function is used. - Using checkpoint function is a strong indicator that the model is too large to fit in GPU memory. - If we don't override the checkpoint function here, mostly ONNX export will be failed. 1. For old version PyTorch, when handling gradient checkpoint feature, we just throw an exception. 2. For new version PyTorch, an export failure happens. - But both failures did not give users explicitly "HOW" to mitigate. This PR did that. ``  ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
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.
Prompt layer-wise when applicable
Give explicit prompts in export failures to users to enable layer-wise memory optimization if we found the checkpoint function is used.
``
Motivation and Context