Skip to content

nn.DataParallel and GPU indexes -- Buggy... #2167

@jiapei100

Description

@jiapei100

Hi, all:

net = torch.nn.DataParallel(model, device_ids=[0]) always fail...

I'm pretty sure I've got ONLY 1 GPU, with the following command line:

jiapei@jiapei-GT72-6QE:~$ sudo lshw -C display
[sudo] password for jiapei: 
  *-display               
       description: VGA compatible controller                                                                     
       product: GM204M [GeForce GTX 980M]                                                                         
       vendor: NVIDIA Corporation                                                                                                                                                                             
       physical id: 0                                                                                                                                                                                         
       bus info: pci@0000:01:00.0                                                                                                                                                                             
       version: a1                                                                                                                                                                                            
       width: 64 bits                                                                                                                                                                                         
       clock: 33MHz                                                                                                                                                                                           
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom                                                                                                                                 
       configuration: driver=nvidia latency=0                                                                                                                                                                 
       resources: irq:128 memory:db000000-dbffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:e000(size=128) memory:c0000-dffff                                                                 
jiapei@jiapei-GT72-6QE:~$          

And, as you can see, it is already device_ids=[0] already puts GPU in a list...
But, if I try:
net = torch.nn.DataParallel(model, device_ids=[0,1]) , then, succeeded.
However, I ONLY have 1 single GPU ...

Can anybody give me a hand please?

Cheers
Pei

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions