(self)
| 820 | assert ret is out |
| 821 | |
| 822 | def test_cat_all_empty(self): |
| 823 | for test_device in device, "cpu": |
| 824 | a = torch.tensor([], device=device) |
| 825 | out = torch.empty((0,), device=device) |
| 826 | for dim in 0, -1: |
| 827 | ret = torch.cat([a, a], out=out, dim=dim) |
| 828 | np.testing.assert_equal(out.cpu().numpy(), []) |
| 829 | assert ret is out |
| 830 | |
| 831 | def test_scatter_add_out(self): |
| 832 | src = torch.tensor([[1, 2, 3], [4, 5, 6]], device=device, dtype=torch.float32) |
nothing calls this directly
no test coverage detected