Skip to content

Commit

Permalink
Fix: Skip f16 in JS tests in QEMU
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Nov 18, 2024
1 parent 0960430 commit b126ca8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ def test_dense_bits(ndim, metric, capability, stats_fixture):
@pytest.mark.parametrize("capability", possible_capabilities)
def test_jensen_shannon(ndim, dtype, capability, stats_fixture):
"""Compares the simd.jensenshannon() function with scipy.spatial.distance.jensenshannon(), measuring the accuracy error for f16, and f32 types."""
if dtype == "float16" and is_running_under_qemu():
pytest.skip("Testing low-precision math isn't reliable in QEMU")

np.random.seed()
a = np.abs(np.random.randn(ndim)).astype(dtype)
b = np.abs(np.random.randn(ndim)).astype(dtype)
Expand Down

0 comments on commit b126ca8

Please sign in to comment.