def test_zeros_like_multiple_device(self): expected = torch.zeros(100, 100).cuda() x = torch.cuda.FloatTensor(100, 100, device=1) output = torch.zeros_like(x) self.assertEqual(output, expected)