Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Refactor operators and add MKLDNN #9677

Merged
merged 72 commits into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
4e9db27
Use NNVM interface.
zheng-da Nov 27, 2017
9e071f8
Remove MKL code.
zheng-da Oct 20, 2017
f668b68
Integrate MKLDNN.
zheng-da Oct 21, 2017
6ca9354
revert modification in test_executor.
zheng-da Jan 17, 2018
56e8c2c
Fix a bug in FlattenStorageType.
zheng-da Jan 17, 2018
c3d1683
Remove BN debug.
zheng-da Jan 17, 2018
27caf85
Remove remaining MXNET_USE_MKL2017
zheng-da Jan 17, 2018
585d837
Remove unused code in pooling.
zheng-da Jan 18, 2018
6a54f28
Fixing bugs in gtests.
zheng-da Jan 18, 2018
ffdd860
Fix lint errors.
zheng-da Jan 18, 2018
3ca549d
a lot of minor updates to address comments.
zheng-da Jan 19, 2018
8abbcc1
Fix coding style in MKLDNN Pooling (#22)
TaoLv Jan 19, 2018
9203748
revert the code change in the previous code refactor.
zheng-da Jan 19, 2018
407a972
Fix a bug in pooling.
zheng-da Jan 19, 2018
d4e7c58
LRN coding style changes (#21)
Jan 19, 2018
856aec9
cast storage with MKLDNN properly.
zheng-da Jan 19, 2018
b8deaab
Minor updates to address comments.
zheng-da Jan 19, 2018
bc1d164
some minor updates.
zheng-da Jan 19, 2018
b77ae3e
Switch to the master branch of MKLDNN.
zheng-da Jan 19, 2018
1766dc2
Minor updates to address comments.
zheng-da Jan 19, 2018
d0ae271
Update activation.cc
zheng-da Jan 20, 2018
ff78b02
Fix a bug in convert NDArray.
zheng-da Jan 23, 2018
5d6d604
Add gluon model zoo tests.
zheng-da Jan 23, 2018
b1e2983
Update GPU tests on model zoo.
zheng-da Jan 23, 2018
67359d9
Avoid using mobilenet for GPU tests with gluon models.
zheng-da Jan 23, 2018
e02de9d
Update GPU tests on gluon.
zheng-da Jan 24, 2018
01a1f54
change cmake to compile MKLDNN.
zheng-da Jan 25, 2018
69cb72c
update cmake for MKLDNN.
zheng-da Jan 25, 2018
f16fdfd
Implement align myself.
zheng-da Jan 26, 2018
4fb0c9f
Switch to intel/mkl-dnn.
zheng-da Jan 26, 2018
35c2665
Fix errors in align unittest.
zheng-da Jan 26, 2018
af9e811
Add unit test for LRN.
zheng-da Jan 26, 2018
8c15676
fix a compilation error.
zheng-da Jan 26, 2018
65c0242
use storage_type_assign to determine storage type.
zheng-da Jan 26, 2018
cb2af66
avoid global pooling in mkldnn.
zheng-da Jan 29, 2018
a1b2a06
compare all MKLDNN ops with native impls.
zheng-da Jan 30, 2018
2e2f55b
Fix a bug in testing correctness.
zheng-da Jan 30, 2018
a027011
print the name of buggy operator.
zheng-da Jan 30, 2018
6d7880a
undo some modifications.
zheng-da Jan 30, 2018
1451790
Fix a bug on reshaped array.
zheng-da Jan 30, 2018
eef3114
avoid testing outputs with NullOp.
zheng-da Jan 30, 2018
e59bdee
turn on MKLDNN tests in Jenkins.
zheng-da Jan 30, 2018
5e74b76
print each operator in MKLDNN tests.
zheng-da Jan 30, 2018
6ff193e
rename test_gluon_model_zoo.py
zheng-da Jan 31, 2018
ea1dd46
Create hashcode for operator parameters properly.
zheng-da Jan 31, 2018
c0f14c5
Add USE_MKL2017 back.
zheng-da Jan 31, 2018
4795960
Print warning messages.
zheng-da Feb 1, 2018
ac88417
move batchnorm tests to nnvm interface.
zheng-da Feb 1, 2018
3a6d8ae
Delete batchnorm v1 tests.
zheng-da Feb 1, 2018
6a25a20
Get inputs and outputs in batchnorm tests.
zheng-da Feb 2, 2018
2de47bd
disable batchnorm tests for now.
zheng-da Feb 2, 2018
cd46ddd
Remove warnings.
zheng-da Feb 5, 2018
d1e21ce
Fix GPU tests on gluon model zoo.
zheng-da Feb 2, 2018
2b69798
Fix lint complains in tests.
zheng-da Feb 2, 2018
42c3f24
Remove simd from openmp instructions in BatchNorm (#24)
TaoLv Feb 3, 2018
27a0227
Fix compilation errors.
zheng-da Feb 5, 2018
8be6810
Fix MKLDNN 1st compile failure issue (#23)
jinhuang415 Feb 5, 2018
f7f5563
Remove ARCH_OPT in Jenkins.
zheng-da Feb 5, 2018
d3d3c46
Revert "avoid global pooling in mkldnn."
zheng-da Feb 6, 2018
84920f2
Move to the latest MKLDNN.
zheng-da Feb 6, 2018
0ed1f94
WIP unit tests (#25)
cjolivier01 Feb 7, 2018
ecfd2b5
Make more C++ unit tests work for batch norm (#28)
cjolivier01 Feb 12, 2018
7417fdf
Fix lint complains.
zheng-da Feb 13, 2018
e8d1f8b
Fix a minor problem in Makefile.
zheng-da Feb 13, 2018
952a23d
fix GPU pooling.
zheng-da Feb 14, 2018
40a52b5
Disable modelzoo inference tests.
zheng-da Feb 14, 2018
40505b5
update accuracy checks for MKLDNN.
zheng-da Feb 14, 2018
466cea7
Fix MKLDNN pooling for global pooling.
zheng-da Feb 14, 2018
30b6866
Fix Jenkins.
zheng-da Feb 14, 2018
39fef04
Merge branch 'mkldnn' of https://github.com/zheng-da/incubator-mxnet …
zheng-da Feb 14, 2018
a6dec46
Fix a bug in Jenkins.
zheng-da Feb 14, 2018
3f78c29
Fix Jenkins
zheng-da Feb 15, 2018
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
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
[submodule "3rdparty/googletest"]
path = 3rdparty/googletest
url = https://github.com/google/googletest.git
[submodule "3rdparty/mkldnn"]
path = 3rdparty/mkldnn
url = https://github.com/intel/mkl-dnn.git
branch = master
1 change: 1 addition & 0 deletions 3rdparty/mkldnn
Submodule mkldnn added at 283c4a
42 changes: 27 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ mxnet_option(USE_OPENMP "Build with Openmp support" ON)
mxnet_option(USE_CUDNN "Build with cudnn support" ON) # one could set CUDNN_ROOT for search path
mxnet_option(USE_LAPACK "Build with lapack support" ON IF NOT MSVC)
mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
mxnet_option(USE_MKLML_MKL "Use MKLML variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND UNIX AND (NOT APPLE))
mxnet_option(USE_MKL_EXPERIMENTAL "Use experimental MKL (if MKL enabled and found)" OFF)
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND UNIX AND (NOT APPLE))
mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND UNIX AND (NOT APPLE))
mxnet_option(USE_OPERATOR_TUNING "Enable auto-tuning of operators" ON IF NOT MSVC)
mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support (if found)" ON)
mxnet_option(USE_JEMALLOC "Build with Jemalloc support" ON)
Expand Down Expand Up @@ -148,14 +148,18 @@ if(USE_VTUNE)
endif()

if(USE_MKL_IF_AVAILABLE)
if(USE_MKL_EXPERIMENTAL AND NOT USE_MKLML_MKL)
message(ERROR " USE_MKL_EXPERIMENTAL can only be used when USE_MKL_EXPERIMENTAL is enabled")
endif()
if(USE_MKLDNN)
add_subdirectory(3rdparty/mkldnn)
include_directories(3rdparty/mkldnn/include)
list(APPEND mxnet_LINKER_LIBS mkldnn)
set(MKL_FOUND TRUE)
else()
find_package(MKL)
endif()
if(MKL_FOUND)
include_directories(${MKL_INCLUDE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/operator/mkl)
add_definitions(-DMXNET_USE_MKL2017=1)
add_definitions(-DMXNET_USE_MKLDNN=1)
add_definitions(-DUSE_MKL=1)
add_definitions(-DCUB_MKL=1)
list(APPEND mxnet_LINKER_LIBS ${MKL_LIBRARIES})
Expand All @@ -164,11 +168,6 @@ if(USE_MKL_IF_AVAILABLE)
endif()
# If using MKL, use the Intel OMP libraries
list(APPEND mxnet_LINKER_LIBS iomp5)
if(USE_MKL_EXPERIMENTAL)
add_definitions(-DMKL_EXPERIMENTAL=1)
else()
add_definitions(-DMKL_EXPERIMENTAL=0)
endif()
else()
message(STATUS " MKL not found")
endif()
Expand Down Expand Up @@ -248,9 +247,8 @@ if(NOT MSVC AND NOT APPLE)
set(BEGIN_WHOLE_ARCHIVE -Wl,--whole-archive)
set(END_WHOLE_ARCHIVE -Wl,--no-whole-archive)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(BEGIN_WHOLE_ARCHIVE -Wl,-force_load) # force_load loads all symbols of the next library
#set(BEGIN_WHOLE_ARCHIVE -Wl,-all_load) # loads all symbols from all libraries
#set(END_WHOLE_ARCHIVE -Wl,-noall_load)
# using regular Clang or AppleClang
set(BEGIN_WHOLE_ARCHIVE -Wl,-force_load)
endif()

if(UNIX)
Expand Down Expand Up @@ -319,6 +317,9 @@ if(USE_OPENMP)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/openmp)
list(REMOVE_ITEM mxnet_LINKER_LIBS iomp5)
list(APPEND mxnet_LINKER_LIBS omp)
if(UNIX)
list(APPEND mxnet_LINKER_LIBS pthread)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
else()
Expand Down Expand Up @@ -610,7 +611,18 @@ endif()

if(USE_OPENCV)
add_executable(im2rec "tools/im2rec.cc")
target_link_libraries(im2rec ${BEGIN_WHOLE_ARCHIVE} mxnet ${END_WHOLE_ARCHIVE} ${mxnet_LINKER_LIBS} ${OpenCV_LIBS} dmlc)
if(MSVC)
target_link_libraries(im2rec mxnet)
else()
target_link_libraries(im2rec ${BEGIN_WHOLE_ARCHIVE} mxnet_static ${END_WHOLE_ARCHIVE})
endif()
target_link_libraries(im2rec
${mxnet_LINKER_LIBS}
${OpenCV_LIBS}
dmlc
${nnvm_LINKER_LIBS}
${pslite_LINKER_LIBS}
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this change? How is related to the original patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjolivier01 could you explain why you added this?

endif()

target_link_libraries(mxnet PUBLIC dmlc)
Expand Down
61 changes: 31 additions & 30 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
mx_lib = 'lib/libmxnet.so, lib/libmxnet.a, dmlc-core/libdmlc.a, nnvm/lib/libnnvm.a'
// mxnet cmake libraries, in cmake builds we do not produce a libnvvm static library by default.
mx_cmake_lib = 'build/libmxnet.so, build/libmxnet.a, build/dmlc-core/libdmlc.a, build/tests/mxnet_unit_tests, build/3rdparty/openmp/runtime/src/libomp.so'
mx_mkldnn_lib = 'lib/libmxnet.so, lib/libmxnet.a, lib/libiomp5.so, lib/libmklml_gnu.so, lib/libmkldnn.so, lib/libmkldnn.so.0, lib/libmklml_intel.so, dmlc-core/libdmlc.a, nnvm/lib/libnnvm.a'
// command to start a docker container
docker_run = 'tests/ci_build/ci_build.sh'
// timeout in minutes
Expand Down Expand Up @@ -160,18 +161,18 @@ def python3_gpu_ut(docker_type) {
}

// Python 2
def python2_mklml_ut(docker_type) {
def python2_mkldnn_ut(docker_type) {
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} ${docker_type} find . -name '*.pyc' -type f -delete"
sh "${docker_run} ${docker_type} PYTHONPATH=./python/ nosetests-2.7 --with-timer --verbose tests/python/cpu"
sh "${docker_run} ${docker_type} PYTHONPATH=./python/ MXNET_MKLDNN_DEBUG=1 nosetests-2.7 --with-timer --verbose tests/python/cpu"
}
}

// Python 3
def python3_mklml_ut(docker_type) {
def python3_mkldnn_ut(docker_type) {
timeout(time: max_time, unit: 'MINUTES') {
sh "${docker_run} ${docker_type} find . -name '*.pyc' -type f -delete"
sh "${docker_run} ${docker_type} PYTHONPATH=./python/ nosetests-3.4 --with-timer --verbose tests/python/cpu"
sh "${docker_run} ${docker_type} PYTHONPATH=./python/ MXNET_MKLDNN_DEBUG=1 nosetests-3.4 --with-timer --verbose tests/python/cpu"
}
}

Expand Down Expand Up @@ -242,21 +243,20 @@ try {
}
}
},
'CPU: MKLML': {
'CPU: MKLDNN': {
node('mxnetlinux-cpu') {
ws('workspace/build-mklml-cpu') {
ws('workspace/build-mkldnn-cpu') {
init_git()
def flag = """ \
DEV=1 \
USE_PROFILER=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_MKL2017=1 \
USE_MKL2017_EXPERIMENTAL=1 \
USE_MKLDNN=1 \
-j\$(nproc)
"""
make("cpu_mklml", flag)
pack_lib('mklml_cpu')
pack_lib('mkldnn_cpu', mx_mkldnn_lib)
}
}
},
Expand All @@ -267,6 +267,8 @@ try {
def defines = """ \
-DUSE_CUDA=1 \
-DUSE_CUDNN=1 \
-DUSE_MKLML_MKL=0 \
-DUSE_MKLDNN=0 \
-DCMAKE_BUILD_TYPE=Release \
"""
def flag = "-v"
Expand All @@ -275,24 +277,23 @@ try {
}
}
},
'GPU: MKLML': {
'GPU: MKLDNN': {
node('mxnetlinux-cpu') {
ws('workspace/build-mklml-gpu') {
ws('workspace/build-mkldnn-gpu') {
init_git()
def flag = """ \
DEV=1 \
USE_PROFILER=1 \
USE_CPP_PACKAGE=1 \
USE_BLAS=openblas \
USE_MKL2017=1 \
USE_MKL2017_EXPERIMENTAL=1 \
USE_MKLDNN=1 \
USE_CUDA=1 \
USE_CUDA_PATH=/usr/local/cuda \
USE_CUDNN=1 \
-j\$(nproc)
"""
make("build_cuda", flag)
pack_lib('mklml_gpu')
pack_lib('mkldnn_gpu', mx_mkldnn_lib)
}
}
},
Expand Down Expand Up @@ -439,43 +440,43 @@ try {
}
}
},
'Python2: MKLML-CPU': {
'Python2: MKLDNN-CPU': {
node('mxnetlinux-cpu') {
ws('workspace/ut-python2-mklml-cpu') {
ws('workspace/ut-python2-mkldnn-cpu') {
init_git()
unpack_lib('mklml_cpu')
unpack_lib('mkldnn_cpu', mx_mkldnn_lib)
python2_ut('cpu_mklml')
python2_mklml_ut('cpu_mklml')
python2_mkldnn_ut('cpu_mklml')
}
}
},
'Python2: MKLML-GPU': {
'Python2: MKLDNN-GPU': {
node('mxnetlinux-gpu') {
ws('workspace/ut-python2-mklml-gpu') {
ws('workspace/ut-python2-mkldnn-gpu') {
init_git()
unpack_lib('mklml_gpu')
unpack_lib('mkldnn_gpu', mx_mkldnn_lib)
python2_gpu_ut('gpu_mklml')
python2_mklml_ut('gpu_mklml')
python2_mkldnn_ut('gpu_mklml')
}
}
},
'Python3: MKLML-CPU': {
'Python3: MKLDNN-CPU': {
node('mxnetlinux-cpu') {
ws('workspace/ut-python3-mklml-cpu') {
ws('workspace/ut-python3-mkldnn-cpu') {
init_git()
unpack_lib('mklml_cpu')
unpack_lib('mkldnn_cpu', mx_mkldnn_lib)
python3_ut('cpu_mklml')
python3_mklml_ut('cpu_mklml')
python3_mkldnn_ut('cpu_mklml')
}
}
},
'Python3: MKLML-GPU': {
'Python3: MKLDNN-GPU': {
node('mxnetlinux-gpu') {
ws('workspace/ut-python3-mklml-gpu') {
ws('workspace/ut-python3-mkldnn-gpu') {
init_git()
unpack_lib('mklml_gpu')
unpack_lib('mkldnn_gpu', mx_mkldnn_lib)
python3_gpu_ut('gpu_mklml')
python3_mklml_ut('gpu_mklml')
python3_mkldnn_ut('gpu_mklml')
}
}
},
Expand Down
45 changes: 23 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,17 @@ endif
include $(config)

ifeq ($(USE_MKL2017), 1)
# must run ./prepare_mkl before including mshadow.mk
RETURN_STRING := $(shell ./prepare_mkl.sh $(MKLML_ROOT))
MKLROOT := $(firstword $(RETURN_STRING))
export USE_MKLML = $(lastword $(RETURN_STRING))
$(warning "USE_MKL2017 is deprecated. We will switch to USE_MKLDNN.")
USE_MKLDNN=1
endif

ifeq ($(USE_MKLDNN), 1)
RETURN_STRING := $(shell ./prepare_mkldnn.sh $(MKLDNN_ROOT))
LAST_WORD_INDEX := $(words $(RETURN_STRING))
# fetch the 2nd last word as MKLDNNROOT
MKLDNNROOT := $(word $(shell echo $$(($(LAST_WORD_INDEX) - 1))),$(RETURN_STRING))
MKLROOT := $(lastword $(RETURN_STRING))
export USE_MKLML = 1
endif

include mshadow/make/mshadow.mk
Expand Down Expand Up @@ -131,23 +138,16 @@ ifeq ($(USE_NNPACK), 1)
LDFLAGS += -lnnpack
endif

ifeq ($(USE_MKL2017), 1)
CFLAGS += -DMXNET_USE_MKL2017=1
ifeq ($(USE_MKLDNN), 1)
CFLAGS += -DMXNET_USE_MKLDNN=1
CFLAGS += -DUSE_MKL=1
CFLAGS += -I$(ROOTDIR)/src/operator/mkl/
CFLAGS += -I$(MKLML_ROOT)/include
LDFLAGS += -L$(MKLML_ROOT)/lib
ifeq ($(USE_MKL2017_EXPERIMENTAL), 1)
CFLAGS += -DMKL_EXPERIMENTAL=1
else
CFLAGS += -DMKL_EXPERIMENTAL=0
endif
ifeq ($(UNAME_S), Darwin)
LDFLAGS += -lmklml
else
LDFLAGS += -Wl,--as-needed -lmklml_intel -lmklml_gnu
CFLAGS += -I$(ROOTDIR)/src/operator/nn/mkldnn/
ifneq ($(MKLDNNROOT), $(MKLROOT))
CFLAGS += -I$(MKLROOT)/include
LDFLAGS += -L$(MKLROOT)/lib
endif
LDFLAGS += -liomp5
CFLAGS += -I$(MKLDNNROOT)/include
LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}'
endif

ifeq ($(USE_OPERATOR_TUNING), 1)
Expand All @@ -161,7 +161,7 @@ endif
# - for Ubuntu, installing atlas will not automatically install the atlas provided lapack library
# silently switching lapack off instead of letting the build fail because of backward compatibility
ifeq ($(USE_LAPACK), 1)
ifeq ($(USE_BLAS),$(filter $(USE_BLAS),blas openblas atlas))
ifeq ($(USE_BLAS),$(filter $(USE_BLAS),blas openblas atlas mkl))
ifeq (,$(wildcard /lib/liblapack.a))
ifeq (,$(wildcard /usr/lib/liblapack.a))
ifeq (,$(wildcard /usr/lib64/liblapack.a))
Expand All @@ -179,7 +179,7 @@ ifeq ($(USE_LAPACK), 1)
ifneq ($(USE_LAPACK_PATH), )
LDFLAGS += -L$(USE_LAPACK_PATH)
endif
ifeq ($(USE_BLAS),$(filter $(USE_BLAS),blas openblas atlas))
ifeq ($(USE_BLAS),$(filter $(USE_BLAS),blas openblas atlas mkl))
LDFLAGS += -llapack
endif
CFLAGS += -DMXNET_USE_LAPACK
Expand Down Expand Up @@ -569,7 +569,8 @@ clean: cyclean $(EXTRA_PACKAGES_CLEAN)
else
clean: cyclean testclean $(EXTRA_PACKAGES_CLEAN)
$(RM) -r build lib bin *~ */*~ */*/*~ */*/*/*~ R-package/NAMESPACE R-package/man R-package/R/mxnet_generated.R \
R-package/inst R-package/src/image_recordio.h R-package/src/*.o R-package/src/*.so mxnet_*.tar.gz
R-package/inst R-package/src/image_recordio.h R-package/src/*.o R-package/src/*.so mxnet_*.tar.gz \
3rdparty/mkldnn/install/*
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
Expand Down
2 changes: 1 addition & 1 deletion amalgamation/mxnet_predict0.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#include "src/operator/operator_util.cc"
#include "src/operator/nn/activation.cc"
#include "src/operator/nn/batch_norm.cc"
#include "src/operator/concat.cc"
#include "src/operator/nn/concat.cc"
#include "src/operator/nn/convolution.cc"
#include "src/operator/nn/deconvolution.cc"
#include "src/operator/nn/dropout.cc"
Expand Down
4 changes: 2 additions & 2 deletions cmake/ChooseBlas.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(USE_MKL_IF_AVAILABLE)
find_package(MKL)
endif()
if(MKL_FOUND)
if(USE_MKLML_MKL)
if(USE_MKLDNN)
set(BLAS "open")
else()
set(BLAS "MKL")
Expand Down Expand Up @@ -55,4 +55,4 @@ elseif(BLAS STREQUAL "apple")
list(APPEND mshadow_LINKER_LIBS ${Accelerate_LIBRARIES})
add_definitions(-DMSHADOW_USE_MKL=0)
add_definitions(-DMSHADOW_USE_CBLAS=1)
endif()
endif()
Loading