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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter "device" in SupervisedRunner has no effect #798

Closed
yhn112 opened this issue May 8, 2020 · 7 comments
Closed

Parameter "device" in SupervisedRunner has no effect #798

yhn112 opened this issue May 8, 2020 · 7 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@yhn112
Copy link
Contributor

yhn112 commented May 8, 2020

馃悰 Bug Report

When running with device=torch.device('cuda:0') or device='cuda:0' model still uses all the GPUs.
When running with device=torch.device('cpu') or device='cpu' an error RuntimeError: module must have its parameters and buffers on device cuda:0 (device_ids[0]) but found one of them on device: cpu appears.

How To Reproduce

Run any sort of training using SupervisedRunner(device=torch.device('cpu')) or SupervisedRunner(device=torch.device('cuda:0')) on a machine with multiple GPUs.

Environment

PyTorch version: 1.5.0
OS: Ubuntu 18.04
Python version: 3.7
CUDA runtime version: 10.2```
@yhn112 yhn112 added bug Something isn't working help wanted Extra attention is needed labels May 8, 2020
@github-actions
Copy link

github-actions bot commented May 8, 2020

Hi! Thank you for your contribution! Great first issue!

@AlekseySh
Copy link
Contributor

I faced with the same problem

@AlekseySh
Copy link
Contributor

You can use CUDA_VISIBLE_DEVICES as work around

@yhn112
Copy link
Contributor Author

yhn112 commented May 8, 2020

I certainly do use CUDA_VISIBLE_DEVICES. It doesn't help me deal with such severe bugs in such a popular framework. =)

@yhn112
Copy link
Contributor Author

yhn112 commented May 19, 2020

I'm sorry to do that, but
ping @Scitator
how do you do? =)

@Scitator Scitator mentioned this issue May 19, 2020
12 tasks
@Scitator
Copy link
Member

@yhn112 please, check the hotfix :)
#815

@Scitator Scitator self-assigned this May 19, 2020
@Scitator
Copy link
Member

now, it's your turn 馃槀
#809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants