Hi,
I have downloaded the TBB and installed it using the below commands on linux
git clone https://github.com/wjakob/tbb.git
cd tbb/build
cmake ..
make -j
sudo make install
When I tried to do cmake for mkldnn I am facing the below errors. I have not used the TBBROOT since the the tbb is installed in /usr/include and /usr/lib
make -DMKLDNN_CPU_RUNTIME=TBB ..
-- CMAKE_BUILD_TYPE is unset, defaulting to Release
CMake Error at cmake/lnx/TBBConfig.cmake:135 (message):
Missed required Intel TBB component: tbb
Call Stack (most recent call first):
cmake/TBB.cmake:35 (find_package)
CMakeLists.txt:107 (include)
Could you tell me what am I doing wrong.
Thank you,
Praveen.
Hi @uu-praveeng,
Thanks for reporting the issue!
DNNL relies on TBBConfig.cmake to locate and configure TBB. The TBB-fork you use doesn't have it, hence DNNL cannot locate TBB in this case. We have the internal version of TBBConfig.cmake, but that one only works with the commercial TBB distribution.
The official open source TBB does have TBBConfig.cmake. So could you please give it a try?
Once you build and install TBB you need to call DNNL cmake in the following way:
$ # assuming you built TBB like like this:
$ # python build/build.py --install-libs --install-devel --prefix=/tmp/tbb_prefix
$ cmake -DTBB_DIR="/tmp/tbb_prefix/lib/cmake/tbb" -DMKLDNN_CPU_RUNTIME=TBB ..
However, you need to patch DNNL with 0001-build-retrieve-TBB-include-dir-location-from-propert.patch.
I would be grateful if you could confirm the approach works for you -- I am working on promoting the fix to the mainline.
Many thanks to @densamoilov, who pointed that the official prebuilt TBB releases (https://github.com/intel/tbb/releases) are actually compatible with the commercial version and hence work fine with our internal TBBConfig.cmake.
So, without any changes you can do the following:
$ cd /path/to/install/tbb
$ # download TBB release
$ tar -xf tbb2019_20191006oss_lin.tgz
$ cd /path/to/dnnl/build
$ cmake -DTBBROOT=/path/to/install/tbb/tbb2019_20191006oss -DMKLDNN_CPU_RUNTIME=TBB ..
Most helpful comment
Many thanks to @densamoilov, who pointed that the official prebuilt TBB releases (https://github.com/intel/tbb/releases) are actually compatible with the commercial version and hence work fine with our internal
TBBConfig.cmake.So, without any changes you can do the following: