File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 6868endif
6969
7070ifeq ($(HAVE_OPENBLAS_CLAPACK ) , 1)
71- CFLAGS += -I$(OPENBLAS_ROOT ) /include
71+ CFLAGS += -DHAVE_OPENBLAS_CLAPACK=1 - I$(OPENBLAS_ROOT ) /include
7272 ifeq ($(USE_SHARED), 0)
7373 LIBS += \
7474 $(OPENBLAS_ROOT ) /lib/libopenblas.a \
Original file line number Diff line number Diff line change 2424#include < fst/matcher-fst.h>
2525#include < fst/extensions/ngram/ngram-fst.h>
2626
27-
27+ #ifdef HAVE_OPENBLAS_CLAPACK
28+ #include < cblas.h>
29+ #endif
2830#ifdef HAVE_MKL
29- // We need to set num threads
3031#include < mkl.h>
3132#endif
3233
@@ -113,6 +114,9 @@ Model::Model(const char *model_path) : model_path_str_(model_path) {
113114
114115 SetLogHandler (KaldiLogHandler);
115116
117+ #ifdef HAVE_OPENBLAS_CLAPACK
118+ openblas_set_num_threads (1 );
119+ #endif
116120#ifdef HAVE_MKL
117121 mkl_set_num_threads (1 );
118122#endif
You can’t perform that action at this time.
0 commit comments