-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
module: testsIssues related to tests (not the torch.testing module)Issues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
🐛 Bug
I think that test/test_linalg.py is never run by any CI build.
It is not listed inside test.run_tests.TESTS.
To Reproduce
I noticed because it fails on my machine:
_____ TestLinalgCPU.test_det_cpu_float64 _____
self = <test_linalg.TestLinalgCPU testMethod=test_det_cpu_float64>, device = 'cpu', dtype = torch.float64
@skipCUDAIfNoMagma
@skipCPUIfNoLapack
@unittest.skipIf(not TEST_NUMPY, "NumPy not found")
@dtypes(torch.double)
def test_det(self, device, dtype):
tensors = (
torch.randn((2, 2), device=device, dtype=dtype),
torch.randn((129, 129), device=device, dtype=dtype),
torch.randn((3, 52, 52), device=device, dtype=dtype),
torch.randn((4, 2, 26, 26), device=device, dtype=dtype))
ops = (torch.det, torch.Tensor.det,
torch.linalg.det)
for t in tensors:
expected = np.linalg.det(t.cpu().numpy())
for op in ops:
actual = op(t)
self.assertEqual(actual, expected)
# NOTE: det requires a 2D+ tensor
t = torch.randn(1, device=device, dtype=dtype)
with self.assertRaises(IndexError):
> op(t)
E RuntimeError: Tensor of matrices must have at least 2 dimensions.
test/test_linalg.py:60: RuntimeError
===== short test summary info =====
Metadata
Metadata
Assignees
Labels
module: testsIssues related to tests (not the torch.testing module)Issues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module