Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
endif

ifeq ($(HAVE_OPENBLAS_CLAPACK), 1)
CFLAGS += -I$(OPENBLAS_ROOT)/include
CFLAGS += -DHAVE_OPENBLAS_CLAPACK=1 -I$(OPENBLAS_ROOT)/include
ifeq ($(USE_SHARED), 0)
LIBS += \
$(OPENBLAS_ROOT)/lib/libopenblas.a \
Expand Down
8 changes: 6 additions & 2 deletions src/model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
#include <fst/matcher-fst.h>
#include <fst/extensions/ngram/ngram-fst.h>


#ifdef HAVE_OPENBLAS_CLAPACK
#include <cblas.h>
#endif
#ifdef HAVE_MKL
// We need to set num threads
#include <mkl.h>
#endif

Expand Down Expand Up @@ -113,6 +114,9 @@ Model::Model(const char *model_path) : model_path_str_(model_path) {

SetLogHandler(KaldiLogHandler);

#ifdef HAVE_OPENBLAS_CLAPACK
openblas_set_num_threads(1);
#endif
#ifdef HAVE_MKL
mkl_set_num_threads(1);
#endif
Expand Down