device_id = 1
v = Variable(torch.rand(3, 4)).cuda(device_id)
Is there an API that returns the device_id, i.e. 1, of a cuda variable?
device_id = 1
v = Variable(torch.rand(3, 4)).cuda(device_id)
Is there an API that returns the device_id, i.e. 1, of a cuda variable?
use get_device
v.get_device()