-
Notifications
You must be signed in to change notification settings - Fork 961
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
take torch.nn.Module
model into account when moving to device
#3167
base: main
Are you sure you want to change the base?
Conversation
torch.nn.Module
model into account when moving to device
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
The change #3133 introduced significant regression using Accelerate with PyTorch 2.5 XPU backend (I am not using IPEX). See below log for failing tests. With the reverted change or this PR applied, most of these failures goes away. @muellerzr : can this PR be reviewed and if considered ok merged or #3133 reverted?
|
thanks @dvrogozh for pasting the UT results. @muellerzr @BenjaminBossan could you take a look and help merge this PR? thx a lot! |
What does this PR do?
Last time in #3133, I introduced the check to only move the model when the model is on "cpu". But this doesn't take the
torch.nn.module
Model into account, e.g.In this case, model doesn't have device as an attribute. So this PR fixes this issue.
@muellerzr