Skip to content

Commit 6769b85

Browse files
Flamefirefacebook-github-bot
authored andcommittedJul 20, 2020
Remove needless test duplication (pytorch#41583)
Summary: The test loops over `upper` but does not use it effectively running the same test twice which increases test times for no gain. Pull Request resolved: pytorch#41583 Reviewed By: soumith, seemethere, izdeby Differential Revision: D22598475 Pulled By: zou3519 fbshipit-source-id: d100f20143293a116ff3ba08b0f4eaf0cc5a8099
1 parent 16dde6e commit 6769b85

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎test/test_torch.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -7841,11 +7841,10 @@ def run_test(A_dims, b_dims):
78417841
self.assertEqual(x, x_exp)
78427842

78437843
# test against numpy.linalg.solve
7844-
for upper in [True, False]:
7845-
run_test((2, 1, 3, 4, 4), (2, 1, 3, 4, 6)) # no broadcasting
7846-
run_test((2, 1, 3, 4, 4), (4, 6)) # broadcasting b
7847-
run_test((4, 4), (2, 1, 3, 4, 2)) # broadcasting A
7848-
run_test((1, 3, 1, 4, 4), (2, 1, 3, 4, 5)) # broadcasting A & b
7844+
run_test((2, 1, 3, 4, 4), (2, 1, 3, 4, 6)) # no broadcasting
7845+
run_test((2, 1, 3, 4, 4), (4, 6)) # broadcasting b
7846+
run_test((4, 4), (2, 1, 3, 4, 2)) # broadcasting A
7847+
run_test((1, 3, 1, 4, 4), (2, 1, 3, 4, 5)) # broadcasting A & b
78497848

78507849
def cholesky_solve_test_helper(self, A_dims, b_dims, upper, device, dtype):
78517850
from torch.testing._internal.common_utils import random_symmetric_pd_matrix

0 commit comments

Comments
 (0)
Please sign in to comment.