Skip to content

Commit

Permalink
Require MKL for LSH (with rotation)
Browse files Browse the repository at this point in the history
This change was requested to avoid silently falling back to slower BLAS
implementations.
  • Loading branch information
graemenail committed Sep 13, 2022
1 parent 70372fd commit d713aec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layers/lsh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "3rd_party/faiss/utils/hamming.h"

#if BLAS_FOUND
#if defined(BLAS_FOUND) && defined(MKL_FOUND)
#include "3rd_party/faiss/VectorTransform.h"
#endif

Expand All @@ -20,7 +20,7 @@ int bytesPerVector(int nBits) {
}

void fillRandomRotationMatrix(Tensor output, Ptr<Allocator> allocator) {
#if BLAS_FOUND
#if defined(BLAS_FOUND) && defined(MKL_FOUND)
int nRows = output->shape()[-2];
int nBits = output->shape()[-1];

Expand Down

0 comments on commit d713aec

Please sign in to comment.