Skip to content

Commit d713aec

Browse files
committed
Require MKL for LSH (with rotation)
This change was requested to avoid silently falling back to slower BLAS implementations.
1 parent 70372fd commit d713aec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/layers/lsh.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

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

7-
#if BLAS_FOUND
7+
#if defined(BLAS_FOUND) && defined(MKL_FOUND)
88
#include "3rd_party/faiss/VectorTransform.h"
99
#endif
1010

@@ -20,7 +20,7 @@ int bytesPerVector(int nBits) {
2020
}
2121

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

0 commit comments

Comments
 (0)