Thanks for your explanation.
y = y.to('cuda:1')
model2 = MyModule2()
model2.to('cuda:1')
w = model2(y)

well, I think it can work.
However,



 ptrblck:

Autograd is able to create the backward pass through different devices.


what do it means ?
should change w.backward() to w.autograd().backward() ?