intel / ideep

Intel® Optimization for Chainer*, a Chainer module providing numpy like API and DNN acceleration using MKL-DNN.
MIT License
164 stars 90 forks source link

Please allow to use the external mkl-dnn installed as a package #33

Open yurivict opened 5 years ago

yurivict commented 5 years ago

mkl-dnn packages exist on many systems: https://repology.org/project/mkl-dnn/versions

CaoZhongZ commented 5 years ago

iDeep is fixed on specific MKL-DNN verions and rely it's own API set. If there is any discrepancy between them, things will go wrong. It's possible to detach iDeep building from MKL-DNN, it's head only library, technically it doesn't require "building". So what is your building environment? Can you elaborate it?

yurivict commented 5 years ago

My environment is building FreeBSD packages.

ideep currently installs its own version of mkl-dnn. Any other packages that might depend on the mkl-dnn port would conflict with ideep.

CaoZhongZ commented 5 years ago

OK, I'll have a check see if it is solvable.

CaoZhongZ commented 5 years ago

@yurivict iDeep brings it's own MKL-DNN which install alongside within python directories, not /usr/local/lib. Other packages that depend on mkl-dnn port won't see the internal one. When dynamic linking I guess one of them will took the place and why would be a conflict? If you determined to use installed mkl-dnn, you could make mkl-dnn install more includes from its external directory, then it'll solve include file problem.

yurivict commented 5 years ago

Here is the list of installed files:

include/TR_interface.h
include/ideep.hpp
include/ideep/abstract_types.hpp
include/ideep/allocators.hpp
include/ideep/computations.hpp
include/ideep/distribute.hpp
include/ideep/fast_math.hpp
include/ideep/instruments.hpp
include/ideep/lru_cache.hpp
include/ideep/omp_ctrl.hpp
include/ideep/scope_guard.hpp
include/ideep/tensor.hpp
include/ideep/utils.hpp
include/ideep/web.hpp
include/ideep_pin_singletons.hpp
include/mkldnn.h
include/mkldnn.hpp
include/mkldnn_debug.h
include/mkldnn_types.h
lib/libideep.so
lib/libmkldnn.so
lib/libmkldnn.so.0
lib/libmkldnn.so.0.16.0
share/doc/mkldnn/LICENSE

It's not along the python files.

CaoZhongZ commented 5 years ago

OK, I'm asking what is your porting strategy. iDeep is a numpy extension enable MKL-DNN acceleration which used inside Chainer, which requires python setup process. However there were head only files could also provide a easier interface for MKL-DNN. Do you want both part? or just C++ API.