Skip to content

Commit

Permalink
skip test_search() on apple m1 and inner product
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluemi committed Aug 20, 2024
1 parent f88004e commit b09b19c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/tests/test_graph.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import random
from typing import Optional

Expand All @@ -10,6 +11,9 @@
import deglib


IS_MACOS_M1 = platform.system() == "Darwin" and platform.machine() == "arm64"


def get_tmp_graph_file(samples: int, dims: int) -> pathlib.Path:
tmpdir = os.path.join(tempfile.gettempdir(), 'deglib_test')
os.makedirs(tmpdir, exist_ok=True)
Expand Down Expand Up @@ -120,6 +124,9 @@ def test_get_feature_vector(conf: Configuration):

@pytest.mark.parametrize('conf', configurations)
def test_search(conf: Configuration):
if IS_MACOS_M1 and conf.metric == deglib.Metric.InnerProduct:
pytest.skip('This test is skipped on macOS with M1 chip, as avx2 is not supported on m1 chip.')

k = 10
graph_result, dists = conf.graph.search(conf.query, eps=0.1, k=k)
dists = dists.flatten()
Expand Down

0 comments on commit b09b19c

Please sign in to comment.