Skip to content

Commit

Permalink
patch cicd yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
blaise-muhirwa committed Dec 17, 2023
1 parent ca6a6b4 commit 039c57b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- name: Build flatnav
run: |
cd flatnav_python
export NO_MANUAL_VECTORIZATION=1
./install_flatnav.sh
- name: Run Unit Tests
Expand Down
2 changes: 0 additions & 2 deletions flatnav/distances/InnerProductDistance.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class InnerProductDistance : public DistanceInterface<InnerProductDistance> {
setDistanceFunction();
}

// ~InnerProductDistance() = default;

float distanceImpl(const void *x, const void *y,
bool asymmetric = false) const {
(void)asymmetric;
Expand Down
2 changes: 0 additions & 2 deletions flatnav/distances/SquaredL2Distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class SquaredL2Distance : public DistanceInterface<SquaredL2Distance> {
setDistanceFunction();
}

// ~SquaredL2Distance() = default;

float distanceImpl(const void *x, const void *y,
bool asymmetric = false) const {
(void)asymmetric;
Expand Down
9 changes: 9 additions & 0 deletions flatnav_python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ def platform_has_avx_support():
EXTRA_COMPILE_ARGS.append("-ftree-vectorize")


no_manual_vectorization = int(os.environ.get("NO_MANUAL_VECTORIZATION", "0"))

if no_manual_vectorization:
# Remove SIMD-related flags. Otherwise, it would crush in an environment
# where SIMD extensions (SSE, AVX) are not supported
EXTRA_COMPILE_ARGS = [
arg for arg in EXTRA_COMPILE_ARGS if arg not in ("-mavx", "-mavx512f")
]

ext_modules = [
Pybind11Extension(
"flatnav",
Expand Down
3 changes: 2 additions & 1 deletion flatnav_python/unit_tests/test_parallel_insertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from flatnav.index import L2Index
from .test_utils import get_ann_benchmark_dataset, compute_recall, create_index
import os
import numpy as np
import numpy as np


def test_parallel_insertions_yield_similar_recall():
training_set, queries, ground_truth, _ = get_ann_benchmark_dataset(
Expand Down

0 comments on commit 039c57b

Please sign in to comment.