Skip to content

Commit 2637f3f

Browse files
committed
Try to add more debugging
1 parent a2ad5b7 commit 2637f3f

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

tests/test_dotv.py

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
from __future__ import division
2-
from hypothesis import given, assume, reproduce_failure
3-
from math import sqrt, floor
2+
from hypothesis import given, assume
3+
import numpy
44

55
from blis_tests_common import *
66
from blis.py import dotv
7-
from blis.cy import NO_CONJUGATE, CONJUGATE
87

98

109
@given(
@@ -23,12 +22,6 @@ def test_memoryview_double_noconj(A, B):
2322
assert_allclose([numpy_result], result, atol=1e-3, rtol=1e-3)
2423

2524

26-
@reproduce_failure(
27-
"6.103.5", b"AXicY2AAggaXUAauVetzGBiBHMYGBjBgZATyGCFshhRGJgY4SGFkBmmCKmNAAgAMFQS/"
28-
)
29-
@reproduce_failure(
30-
"6.103.5", b"AXicE2NAAGsxRiDJCOUpMzIipJQZWYDkQY6POYVSFz8h6WEAAGinBSs="
31-
)
3225
@given(
3326
ndarrays(min_len=10, max_len=100, min_val=-100.0, max_val=100.0, dtype="float32"),
3427
ndarrays(min_len=10, max_len=100, min_val=-100.0, max_val=100.0, dtype="float32"),
@@ -42,4 +35,19 @@ def test_memoryview_float_noconj(A, B):
4235
assume(B is not None)
4336
numpy_result = A.dot(B)
4437
result = dotv(A, B)
45-
assert_allclose([numpy_result], result, atol=1e-2, rtol=1e-2)
38+
# We want to also know the true(r) answer, if one of them is off.
39+
A_float64 = A.astype(numpy.float64)
40+
B_float64 = B.astype(numpy.float64)
41+
numpy_result64 = A_float64.dot(B_float64)
42+
blis_result64 = dotv(A_float64, B_float64)
43+
try:
44+
assert_allclose(
45+
[numpy_result],
46+
result,
47+
atol=1e-3,
48+
rtol=1e-3,
49+
)
50+
except AssertionError as e:
51+
print(f"Numpy 64bit result: {numpy_result64}")
52+
print(f"blis 64bit result: {blis_result64}")
53+
raise e

0 commit comments

Comments
 (0)