Skip to content

Allow custom device placements for different objects#716

Merged
sgugger merged 4 commits intomainfrom
custom_device_placement
Sep 23, 2022
Merged

Allow custom device placements for different objects#716
sgugger merged 4 commits intomainfrom
custom_device_placement

Conversation

@sgugger
Copy link
Collaborator

@sgugger sgugger commented Sep 23, 2022

This PR lets the user customize whether device_placement should be True or False for the different objects passed along to prepare. This feature was requested in #624

Fixes #624

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for this. One suggestion on the docstring for clarity but otherwise awesome!

@sgugger sgugger force-pushed the custom_device_placement branch from 7001191 to 4ece3e5 Compare September 23, 2022 14:33
sgugger and others added 3 commits September 23, 2022 10:34
Co-authored-by: Zachary Mueller <muellerzr@gmail.com>
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 23, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM! 🤗

@sgugger sgugger merged commit b67b760 into main Sep 23, 2022
@sgugger sgugger deleted the custom_device_placement branch September 23, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let device_placement parameter can be overridden for different type object

4 participants