Support replicating multi-GPU modules (#18687)
authorShen Li <shenli@fb.com>
Wed, 3 Apr 2019 21:37:54 +0000 (14:37 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 3 Apr 2019 21:43:07 +0000 (14:43 -0700)
commit7ae0263e1bf1482cba79361f991d11a85b35cde6
tree783be3f6e5147efa8f1b415776cbab70dc481a03
parenteabd9eac2a5f05be936ac925ec31392054e1b3ba
Support replicating multi-GPU modules (#18687)

Summary:
If the input `network` resides on multiple GPUs, `devices` must be a 2D list with `devices[0]` matching `network`'s devices. See  #18591
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18687

Differential Revision: D14706162

Pulled By: mrshenli

fbshipit-source-id: dca630d3308f2dbcf8b75629c452d7a64092ba42
test/common_cuda.py
test/test_nn.py
torch/nn/parallel/replicate.py