Skip to content

Commit

Permalink
remove full mkl dependency for mkl call (apache#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenlinluo authored and piiswrong committed Feb 15, 2017
1 parent 129a35b commit a9d70f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion make/mshadow.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,21 @@ else
endif
MSHADOW_LDFLAGS += -L${MKLROOT}/../compiler/lib/intel64 -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -liomp5 -ldl -lpthread -lm
else
MSHADOW_LDFLAGS += -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5
ifneq ($(USE_MKLML), 1)
MSHADOW_LDFLAGS += -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5
endif
endif
else
ifneq ($(USE_BLAS), NONE)
MSHADOW_CFLAGS += -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0
endif
endif

ifeq ($(USE_MKLML), 1)
MSHADOW_CFLAGS += -I$(MKLROOT)/include
MSHADOW_LDFLAGS += -Wl,--as-needed -lmklml_intel -lmklml_gnu -liomp5 -L$(MKLROOT)/lib/
endif

ifeq ($(USE_BLAS), openblas)
MSHADOW_LDFLAGS += -lopenblas
else ifeq ($(USE_BLAS), atlas)
Expand Down
2 changes: 1 addition & 1 deletion mshadow/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extern "C" {
#include <cblas.h>
}
#elif MSHADOW_USE_MKL
#include <mkl.h>
#include <mkl_blas.h>
#include <mkl_cblas.h>
#include <mkl_vsl.h>
#include <mkl_vsl_functions.h>
Expand Down

0 comments on commit a9d70f0

Please sign in to comment.