Enable multi-device for efficientnet#29989
Merged
Merged
Conversation
ArthurZucker
reviewed
Apr 2, 2024
| config_class = EfficientNetConfig | ||
| base_model_prefix = "efficientnet" | ||
| main_input_name = "pixel_values" | ||
| _no_split_modules = [] |
Collaborator
There was a problem hiding this comment.
Suggested change
| _no_split_modules = [] | |
| _no_split_modules = ["EfficientNetBlock"] |
any reason not to set a correct module to not split?
Contributor
There was a problem hiding this comment.
@ArthurZucker I don't think it's necessary for there to be a module defined - this is the case for some of our models already in the library e.g. Camembert.
It is strange not defining "EfficientNetBlock" is OK though, as the block uses a residual connection, which requires the two tensors to be on the same device (as then so too the weights).
Collaborator
There was a problem hiding this comment.
Alright, it's not necessary, but for small GPU it helps. We'll see how it goes
ArthurZucker
approved these changes
Apr 2, 2024
59 tasks
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.
What does this PR do?
Fixes #29786 (issue)
Tested on two systems, one with 2x RTX 3060 and one with 2x RTX 3090
Who can review?
@amyeroberts