Parameter "device" in SupervisedRunner has no effect
See original GitHub issue🐛 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```
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (6 by maintainers)
Top Results From Across the Web
DL — Catalyst 20.06 documentation
Traces model using created experiment and runner. Parameters. logdir (Union[str, Path]) – Path to Catalyst logdir with model. checkpoint_name (str) – Name ...
Read more >Why PyTorch nn.Module.cuda() not moving Module tensor but ...
If you define a tensor inside the module it needs to be registered as either a parameter or a buffer so that the...
Read more >8 Creators and Core Contributors Talk About Their Model ...
parameter freezing,; and TensorBoard and Neptune integration. If this is not enough to satisfy your customization needs, we took pains to ...
Read more >torch.nn.modules.module — DGL 0.9.1post1 documentation
It can modify the input inplace but it will not have effect on forward ... Args: device (int, optional): if specified, all parameters...
Read more >torch.nn.modules.module — transformers 4.12.5 documentation
It can modify the input inplace but it will not have effect on forward ... Args: device (int, optional): if specified, all parameters...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I certainly do use
CUDA_VISIBLE_DEVICES
. It doesn’t help me deal with such severe bugs in such a popular framework. =)now, it’s your turn 😂 https://github.com/catalyst-team/catalyst/pull/809