(self)
| 56 | |
| 57 | @skip_if_no_cuda |
| 58 | def test_tensor_cuda_input(self): |
| 59 | test_data = torch.tensor([[1, 2], [3, 4]]).cuda() |
| 60 | test_data = test_data.rot90() |
| 61 | self.assertFalse(test_data.is_contiguous()) |
| 62 | result = ToNumpy()(test_data) |
| 63 | self.assertIsInstance(result, np.ndarray) |
| 64 | self.assertTrue(result.flags["C_CONTIGUOUS"]) |
| 65 | assert_allclose(result, test_data, type_test=False) |
| 66 | |
| 67 | def test_list_tuple(self): |
| 68 | test_data = [[1, 2], [3, 4]] |
nothing calls this directly
no test coverage detected