Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

[WIP] Change MKL BLAS linkage from LP64 to ILP64 #365

Closed
wants to merge 7 commits into from
Closed
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
5 changes: 3 additions & 2 deletions make/mshadow.mk
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ ifneq ($(USE_INTEL_PATH), NONE)
MSHADOW_LDFLAGS += -L$(USE_INTEL_PATH)/compiler/lib/intel64
MSHADOW_LDFLAGS += -L$(USE_INTEL_PATH)/lib/intel64
endif
MSHADOW_CFLAGS += -DMKL_ILP64
MSHADOW_CFLAGS += -I$(USE_INTEL_PATH)/mkl/include
endif
ifneq ($(USE_STATIC_MKL), NONE)
Expand All @@ -90,10 +91,10 @@ ifeq ($(USE_INTEL_PATH), NONE)
else
MKLROOT = $(USE_INTEL_PATH)/mkl
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
MSHADOW_LDFLAGS += -L${MKLROOT}/../compiler/lib/intel64 -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a -Wl,--end-group -liomp5 -ldl -lpthread -lm
else
ifneq ($(USE_MKLML), 1)
MSHADOW_LDFLAGS += -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5
MSHADOW_LDFLAGS += -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5
endif
endif
else
Expand Down
2 changes: 1 addition & 1 deletion mshadow/dot_engine-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ struct BLASEngine<cpu, double> {
double **workspace) {
#if (MSHADOW_USE_MKL && INTEL_MKL_VERSION >= 20160000)
// since same m/n/k is used for all single gemms, so we put all gemms into one group
const int GROUP_SIZE = 1
const int GROUP_SIZE = 1;
MKL_INT p_m[GROUP_SIZE] = {m};
MKL_INT p_n[GROUP_SIZE] = {n};
MKL_INT p_k[GROUP_SIZE] = {k};
Expand Down