(self)
| 495 | for tr, cr in zip(tiny_chunks, cpu_chunks): np.testing.assert_equal(tr, cr) |
| 496 | |
| 497 | def test_sum_matches_torch(self): |
| 498 | a = torch.arange(6, dtype=torch.float32, device=device).reshape(2,3) |
| 499 | torch_res = a.sum().cpu().numpy() |
| 500 | cpu_res = torch.arange(6, dtype=torch.float32).reshape(2,3).sum().numpy() |
| 501 | np.testing.assert_equal(torch_res, cpu_res) |
| 502 | |
| 503 | def test_view_matches_torch(self): |
| 504 | a = torch.arange(6, dtype=torch.float32, device=device) |
nothing calls this directly
no test coverage detected