Intel Caffe on Xeon Phi

Intel Caffe on Xeon Phi

Hi All,

I am following this article for compiling Caffe on Xeon Phi. I have all the prerequisite software and CMAKE is success, but it fails during MAKE stage.

Can someone please suggest where I may be going wrong? Is Intel Caffe still active and supported? Do I need to go for original Caffe and get that working on Xeon Phi?

System Details:

  • Operating System: CentOS Linux 7 (Core)
  • Kernel: Linux 3.10.0-514.10.2.el7.x86_64
  • Architecture: x86-64 Intel(R) Xeon Phi(TM) CPU 7210 @ 1.30GHz
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
//caffe/include/mkl_dnn_cppwrapper.h:805:31: error: ‘dnnBatchNormalizationCreateForward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:818:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:826:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layers/mkl_pooling_layer.cpp.o] Error 1
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layers/mkl_concat_layer.cpp.o] Error 1
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layer_factory.cpp.o] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2

 

Thanks.

Chetan Arvind Patil
18 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hello,

Yes, Intel Caffe is active and supported.

Looking at your exception stack, it seems like your MKL_DNN has not downloaded properly. Can you make sure your MKL packages  & MKL _DNN library gets downloaded correctly while during the CMAKE/MAKE process. Also Kindly share the CMAKE command you have used.

Kindly use a make clean while trying a new build so as to clear the old stuffs.

 

Thanks

Anand

Hi Anand,

It seems to be getting downloaded into "external" folder. Problem looks to be the "MKLDNN_Build" during MAKE. Following is the log of CMAKE

Thanks.

$ cmake -DCPU_ONLY=on -DBLAS=mkl -DUSE_MKL2017_AS_DEFAULT_ENGINE=on ..
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   regex
-- Found gflags  (include: /usr/include, library: /usr/lib64/libgflags.so)
-- Found glog    (include: /usr/include, library: /usr/lib64/libglog.so)
-- Found PROTOBUF Compiler: /usr/bin/protoc
-- Found lmdb    (include: /usr/include, library: /usr/lib64/liblmdb.so)
-- Found LevelDB (include: /usr/include, library: /usr/lib64/libleveldb.so)
-- Found Snappy  (include: /usr/include, library: /usr/lib64/libsnappy.so)
-- -- CUDA is disabled. Building without it...
-- OpenCV found (/usr/lib64/cmake/OpenCV)
-- Found MKL: /caffe/./external/mkl/mklml_lnx_2018.0.20170720//include/
-- Found MKL (include: /caffe/./external/mkl/mklml_lnx_2018.0.20170720//include/, lib: /caffe/./external/mkl/mklml_lnx_2018.0.20170720//lib/libmklml_intel.so
-- Found MKL2017
-- MKL2017 engine will be used as a default engine
-- MKLDNN will be downloaded from github and installed in /caffe/external/mkldnn/install
-- MKLDNN include directory: /caffe/external/mkldnn/install/include
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7")
-- Found NumPy: /usr/lib64/python2.7/site-packages/numpy/core/include (found suitable version "1.13.1", minimum required is "1.7.1")
-- NumPy ver. 1.13.1 found (include: /usr/lib64/python2.7/site-packages/numpy/core/include)
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   python
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.5")
--
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version                 :   1.0.0-rc3
--   Git                     :   1.0.3a-2-g85749df
--   System                  :   Linux
--   C++ compiler            :   /usr/bin/c++
--   Release CXX flags       :   -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -fopenmp -DMKL2017_SUPPORTED -DUSE_MKL2017_AS_DEFAULT_ENGINE -DMKLDNN_SUPPORTED -std=c++11 -fPIE -fstack-protector -fPIC -fno-operator-names -Wformat -Wformat-security -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
--   Debug CXX flags         :   -g -fopenmp -DMKL2017_SUPPORTED -DUSE_MKL2017_AS_DEFAULT_ENGINE -DMKLDNN_SUPPORTED -std=c++11 -fPIE -fstack-protector -fPIC -fno-operator-names -Wformat -Wformat-security -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
--   Build type              :   Release
--
--   BUILD_SHARED_LIBS       :   on
--   BUILD_python            :   ON
--   BUILD_matlab            :   OFF
--   BUILD_docs              :   ON
--   CPU_ONLY                :   on
--   USE_OPENMP              :   ON
--   USE_OPENCV              :   ON
--   USE_LEVELDB             :   ON
--   USE_LMDB                :   ON
--   ALLOW_LMDB_NOLOCK       :   OFF
--   USE_SYSTEMTAP           :   OFF
--   PERFORMANCE_MONITORING  :   OFF
--
-- Dependencies:
--   BLAS              :   Yes (mkl)
--   MKL2017_SUPPORTED :   ON, is a default engine
--   MKLDNN_SUPPORTED :    ON
--   Boost             :   Yes (ver. 1.53)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.5.0)
--   lmdb              :   Yes (ver. 0.9.18)
--   LevelDB           :   Yes (ver. 1.12)
--   Snappy            :   Yes (ver. 1.1.0)
--   OpenCV            :   Yes (ver. 2.4.5)
--   CUDA              :   No
--
-- Python:
--   Interpreter       :   /usr/bin/python2.7 (ver. 2.7.5)
--   Libraries         :   /usr/lib64/libpython2.7.so (ver 2.7.5)
--   NumPy             :   /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.13.1)
--
-- Documentaion:
--   Doxygen           :   No
--   config_file       :
--
-- Install:
--   Install path      :   /caffe/build/install
--
-- Configuring done
-- Generating done
-- Build files have been written to: /caffe/build
Chetan Arvind Patil

Also kindly note , there is a slight variation from the document because , its a bit old version. You really do not need to source the mkl variables like  source /opt/intel/bin/compilervars.sh intel64 because currently the MKL packages are automatically downloaded  and the environment will configured during the build process.  So Kindly verify that when you did the CMAKE, you observe couple of libraries getting downloaded. You may also send me the output of CMAKE if you see issues again

 

Thanks

Anand

Hi Anand,

I deleted the Caffe directory. Cloned git repo. Then, I see following log for CMAKE, where one library is downloaded and CMAKE is success:

build$ cmake -DCPU_ONLY=on -DBLAS=mkl -DUSE_MKL2017_AS_DEFAULT_ENGINE=on ..
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   regex
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Found GFlags: /usr/include
-- Found gflags  (include: /usr/include, library: /usr/lib64/libgflags.so)
-- Found Glog: /usr/include
-- Found glog    (include: /usr/include, library: /usr/lib64/libglog.so)
-- Found PROTOBUF: /usr/lib64/libprotobuf.so
-- Found PROTOBUF Compiler: /usr/bin/protoc
-- Found HDF5: /usr/lib64/libhdf5_hl.so;/usr/lib64/libhdf5.so
-- Found LMDB: /usr/include
-- Found lmdb    (include: /usr/include, library: /usr/lib64/liblmdb.so)
-- Found LevelDB: /usr/include
-- Found LevelDB (include: /usr/include, library: /usr/lib64/libleveldb.so)
-- Found Snappy: /usr/include
-- Found Snappy  (include: /usr/include, library: /usr/lib64/libsnappy.so)
-- -- CUDA is disabled. Building without it...
-- OpenCV found (/usr/lib64/cmake/OpenCV)
--2017-09-11 22:30:11--  https://github.com/intel/caffe/releases/download/1.0.2/mklml_lnx_2018.0.20170720.tgz
Resolving github.com (github.com)... 192.30.255.112, 192.30.255.113
Connecting to github.com (github.com)|192.30.255.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/61870803/b1f13072-76d7-11e7-9894-7fdbe932ab42?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20170912%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170912T053012Z&X-Amz-Expires=300&X-Amz-Signature=21c3b83da4e57d970fd8f5f7152f936a2627b1308d7c4c897194168736184d42&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmklml_lnx_2018.0.20170720.tgz&response-content-type=application%2Foctet-stream [following]
--2017-09-11 22:30:12--  https://github-production-release-asset-2e65be.s3.amazonaws.com/61870803/b1f13072-76d7-11e7-9894-7fdbe932ab42?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20170912%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170912T053012Z&X-Amz-Expires=300&X-Amz-Signature=21c3b83da4e57d970fd8f5f7152f936a2627b1308d7c4c897194168736184d42&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmklml_lnx_2018.0.20170720.tgz&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.128.235
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.128.235|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 69147970 (66M) [application/octet-stream]
Saving to: ‘./external/mkl/mklml_lnx_2018.0.20170720.tgz’

100%[=====================================================================>] 69,147,970  15.2MB/s   in 6.8s

2017-09-11 22:30:19 (9.68 MB/s) - ‘./external/mkl/mklml_lnx_2018.0.20170720.tgz’ saved [69147970/69147970]

-- Found MKL: /caffe/./external/mkl/mklml_lnx_2018.0.20170720//include/
-- Found MKL (include: /caffe/./external/mkl/mklml_lnx_2018.0.20170720//include/, lib: /caffe/./external/mkl/mklml_lnx_2018.0.20170720//lib/libmklml_intel.so
-- Found MKL2017
-- MKL2017 engine will be used as a default engine
-- Found Git: /usr/bin/git (found version "1.8.3.1")
-- MKLDNN will be downloaded from github and installed in /caffe/external/mkldnn/install
-- MKLDNN include directory: /caffe/external/mkldnn/install/include
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.5", minimum required is "2.7")
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable version "2.7.5", minimum required is "2.7")
-- Found NumPy: /usr/lib64/python2.7/site-packages/numpy/core/include (found suitable version "1.13.1", minimum required is "1.7.1")
-- NumPy ver. 1.13.1 found (include: /usr/lib64/python2.7/site-packages/numpy/core/include)
-- Boost version: 1.53.0
-- Found the following Boost libraries:
--   python
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.5")
--
-- ******************* Caffe Configuration Summary *******************
-- General:
--   Version                 :   1.0.0-rc3
--   Git                     :   1.0.3a-2-g85749df
--   System                  :   Linux
--   C++ compiler            :   /usr/bin/c++
--   Release CXX flags       :   -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -fopenmp -DMKL2017_SUPPORTED -DUSE_MKL2017_AS_DEFAULT_ENGINE -DMKLDNN_SUPPORTED -std=c++11 -fPIE -fstack-protector -fPIC -fno-operator-names -Wformat -Wformat-security -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
--   Debug CXX flags         :   -g -fopenmp -DMKL2017_SUPPORTED -DUSE_MKL2017_AS_DEFAULT_ENGINE -DMKLDNN_SUPPORTED -std=c++11 -fPIE -fstack-protector -fPIC -fno-operator-names -Wformat -Wformat-security -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
--   Build type              :   Release
--
--   BUILD_SHARED_LIBS       :   on
--   BUILD_python            :   ON
--   BUILD_matlab            :   OFF
--   BUILD_docs              :   ON
--   CPU_ONLY                :   on
--   USE_OPENMP              :   ON
--   USE_OPENCV              :   ON
--   USE_LEVELDB             :   ON
--   USE_LMDB                :   ON
--   ALLOW_LMDB_NOLOCK       :   OFF
--   USE_SYSTEMTAP           :   OFF
--   PERFORMANCE_MONITORING  :   OFF
--
-- Dependencies:
--   BLAS              :   Yes (mkl)
--   MKL2017_SUPPORTED :   ON, is a default engine
--   MKLDNN_SUPPORTED :    ON
--   Boost             :   Yes (ver. 1.53)
--   glog              :   Yes
--   gflags            :   Yes
--   protobuf          :   Yes (ver. 2.5.0)
--   lmdb              :   Yes (ver. 0.9.18)
--   LevelDB           :   Yes (ver. 1.12)
--   Snappy            :   Yes (ver. 1.1.0)
--   OpenCV            :   Yes (ver. 2.4.5)
--   CUDA              :   No
--
-- Python:
--   Interpreter       :   /usr/bin/python2.7 (ver. 2.7.5)
--   Libraries         :   /usr/lib64/libpython2.7.so (ver 2.7.5)
--   NumPy             :   /usr/lib64/python2.7/site-packages/numpy/core/include (ver 1.13.1)
--
-- Documentaion:
--   Doxygen           :   No
--   config_file       :
--
-- Install:
--   Install path      :   /caffe/build/install
--
-- Configuring done
-- Generating done
-- Build files have been written to: /caffe/build

Then: I do make on it and get following error. "source /opt/intel/bin/compilervars.sh intel64" was not sources.

build$ make -j 64 all
[  0%] Scanning dependencies of target MKLDNN_Build
Scanning dependencies of target gmock
Scanning dependencies of target gtest
Running C++/Python protocol buffer compiler on /caffe/src/caffe/proto/caffe.proto
[  1%] Creating directories for 'MKLDNN_Build'
[  3%] Building CXX object src/gmock/gtest/CMakeFiles/gtest.dir/src/gtest-all.cpp.o
[  3%] [  3%] Building CXX object src/gmock/CMakeFiles/gmock.dir/__/gtest/src/gtest-all.cpp.o
Building CXX object src/gmock/CMakeFiles/gmock.dir/src/gmock-all.cpp.o
[  3%] Performing download step (git clone) for 'MKLDNN_Build'
Cloning into 'src'...
Scanning dependencies of target proto
[  4%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o
remote: Counting objects: 13731, done.
remote: Total 13731 (delta 0), reused 0 (delta 0), pack-reused 13731
Receiving objects: 100% (13731/13731), 8.82 MiB | 6.50 MiB/s, done.
Resolving deltas: 100% (10834/10834), done.
Note: checking out 'b01e3a55a07be62172e713bcd2644c5176360212'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at b01e3a5... cpu: conv: bwd_w: avx512_4fma: fix yet another pitfall
[  6%] [  6%] No patch step for 'MKLDNN_Build'
Performing update step for 'MKLDNN_Build'
[  6%] Performing configure step for 'MKLDNN_Build'
-- MKLDNN_Build configure command succeeded.  See also /caffe/build/MKLDNN_Build-prefix/src/MKLDNN_Build-stamp/MKLDNN_Build-configure-*.log

[  6%] Performing build step for 'MKLDNN_Build'
-- MKLDNN_Build build command succeeded.  See also /caffe/build/MKLDNN_Build-prefix/src/MKLDNN_Build-stamp/MKLDNN_Build-build-*.log

[  6%] Performing install step for 'MKLDNN_Build'
Linking CXX static library libgtest.a
[  6%] Built target gtest
Linking CXX static library libgmock.a
[  6%] Built target gmock
Linking CXX static library ../../lib/libproto.a
[  6%] Built target proto
-- MKLDNN_Build install command succeeded.  See also /caffe/build/MKLDNN_Build-prefix/src/MKLDNN_Build-stamp/MKLDNN_Build-install-*.log

[  6%] Completed 'MKLDNN_Build'
[  6%] Built target MKLDNN_Build
Scanning dependencies of target caffe
[  6%] [  6%] [  7%] [  7%] [  9%] [  9%] [  9%] [ 10%] [ 10%] [ 10%] [ 12%] [ 12%] [ 12%] [ 14%] Building CXX object src/caffe/CMakeFiles/caffe.dir/solver.cpp.o
[ 14%] Building CXX object src/caffe/CMakeFiles/caffe.dir/solvers/nesterov_solver.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/solvers/adagrad_solver.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/solvers/rmsprop_solver.cpp.o
[ 14%] Building CXX object src/caffe/CMakeFiles/caffe.dir/solvers/sgd_solver.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/solvers/adam_solver.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/solvers/adadelta_solver.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/parallel.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/internal_thread.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/data_transformer.cpp.o
[ 15%] [ 15%] [ 17%] Building CXX object src/caffe/CMakeFiles/caffe.dir/net.cpp.o
[ 17%] [ 17%] Building CXX object src/caffe/CMakeFiles/caffe.dir/syncedmem.cpp.o
[ 18%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layer_factory.cpp.o
[ 18%] Building CXX object src/caffe/CMakeFiles/caffe.dir/mkl_memory.cpp.o
[ 18%] [ 20%] Building CXX object src/caffe/CMakeFiles/caffe.dir/blob.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/data_reader.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/relu_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/silence_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/eltwise_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/prior_box_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/recurrent_layer.cpp.o
[ 20%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/batch_norm_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/batch_reindex_layer.cpp.o
[ 20%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/cudnn_lcn_layer.cpp.o
[ 21%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/base_conv_layer.cpp.o
[ 21%] [ 21%] [ 23%] [ 23%] [ 25%] [ 25%] [ 25%] [ 26%] [ 26%] [ 26%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/input_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/absval_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/euclidean_loss_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/base_data_layer.cpp.o
[ 28%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/argmax_layer.cpp.o
[ 28%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/reshape_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/detection_evaluate_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/rnn_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/window_data_layer.cpp.o
[ 28%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/tile_layer.cpp.o
[ 29%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/infogain_loss_layer.cpp.o
[ 29%] [ 29%] [ 31%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/prelu_layer.cpp.o
[ 31%] [ 32%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/cudnn_conv_layer.cpp.o
[ 32%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkl_convolution_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/scale_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/bias_layer.cpp.o
[ 32%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/elu_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_split_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/memory_data_layer.cpp.o
[ 34%] [ 34%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/bnll_layer.cpp.o
[ 34%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/split_layer.cpp.o
[ 35%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/multibox_loss_layer.cpp.o
[ 35%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/log_layer.cpp.o
[ 37%] [ 37%] [ 39%] [ 39%] [ 39%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/accuracy_layer.cpp.o
[ 40%] [ 40%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_lrn_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/multinomial_logistic_loss_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/dropout_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/sigmoid_cross_entropy_loss_layer.cpp.o
[ 40%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/im2col_layer.cpp.o
[ 40%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/lrn_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/inner_product_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_concat_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/annotated_data_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/conv_layer.cpp.o
[ 42%] [ 42%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_eltwise_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/embed_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/permute_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mvn_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/filter_layer.cpp.o
[ 42%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/cudnn_lrn_layer.cpp.o
Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/normalize_layer.cpp.o
[ 43%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/pooling_layer.cpp.o
In file included from /caffe/include/caffe/mkl_memory.hpp:48:0,
                 from /caffe/include/caffe/layers/mkl_layers.hpp:53,
                 from /caffe/src/caffe/layers/mkl_convolution_layer.cpp:45:
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:797:31: error: ‘dnnBatchNormalizationCreateForward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:805:31: error: ‘dnnBatchNormalizationCreateForward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:818:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:826:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
In file included from /caffe/include/caffe/mkl_memory.hpp:48:0,
                 from /caffe/src/caffe/mkl_memory.cpp:41:
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:797:31: error: ‘dnnBatchNormalizationCreateForward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:805:31: error: ‘dnnBatchNormalizationCreateForward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:818:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:826:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
[ 43%] Building CXX object src/caffe/CMakeFiles/caffe.dir/layers/mkldnn_pooling_layer.cpp.o
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layers/mkl_convolution_layer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/mkl_memory.cpp.o] Error 1
In file included from /caffe/include/caffe/mkl_memory.hpp:48:0,
                 from /caffe/include/caffe/layers/mkl_layers.hpp:53,
                 from /caffe/src/caffe/layer_factory.cpp:59:
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:797:31: error: ‘dnnBatchNormalizationCreateForward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateForward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:805:31: error: ‘dnnBatchNormalizationCreateForward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = float; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:818:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F32’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
/caffe/include/mkl_dnn_cppwrapper.h: In function ‘dnnError_t dnnBatchNormalizationCreateBackward(_uniPrimitive_s**, dnnPrimitiveAttributes_t, dnnLayout_t, float, unsigned int) [with Dtype = double; dnnPrimitive_t = _uniPrimitive_s*; dnnPrimitiveAttributes_t = void*; dnnLayout_t = _dnnLayout_s*]’:
/caffe/include/mkl_dnn_cppwrapper.h:826:31: error: ‘dnnBatchNormalizationCreateBackward_v2_F64’ was not declared in this scope
         dataLayout, eps, flags); }
                               ^
make[2]: *** [src/caffe/CMakeFiles/caffe.dir/layer_factory.cpp.o] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2

 

Chetan Arvind Patil

Hello,

Kindly do not source the variable source /opt/intel/bin/compilervars.sh intel64.  This is applicable only when you manually install MKL. Right now the package gets automatically downloaded and hence again sourcing those variables may lead to issues

Thanks

Anand

 

 

Hi Anand,

It worked after I did reset of bash terminal. 

In the benchmarking section for following command, the "mkl2017_alexnet" is not present.

numactl –m 1 /opt/caffe/build/tools/caffe time --model=/opt/caffe/models/mkl2017_alexnet/train_val.prototxt

Instead I have following folders in "/caffe/models"

bvlc_alexnet    bvlc_reference_caffenet       default_googlenet_v2  default_vgg_16  finetune_flickr_style
bvlc_googlenet  bvlc_reference_rcnn_ilsvrc13  default_resnet_50     default_vgg_19  intel_optimized_models

Thanks.

Chetan Arvind Patil

You may use numactl –m 1 /opt/caffe/build/tools/caffe time --model=/opt/caffe/models/mkl2017_alexnet/train_val.prototxt --engine-MKL2017 for having a better performance.

 

BTW, Kindly let me know if the issue is resolved so that we can close this

Hi Anand,

As shared in the post before, the path folder "mkl2017_alexnet" doesn't exists. Instead I have following files in "/caffe/models":

deploy.prototxt  solver_client.prototxt        solver.prototxt            train_val_param_server.prototxt
readme.md        solver_param_server.prototxt  train_val_client.prototxt  train_val.prototxt

Using "train_val.prototxt" doesn't work out.

Thanks.

Chetan Arvind Patil

Dear Chetan,

Inside Caffe/models there is a directory for Intel_Optimized Model  (https://github.com/intel/caffe/tree/master/models/intel_optimized_models/alexnet). You can find prototxt files with configurations that work well in Intel Architecture.

As I referred before, please use numactl –m 1 /opt/caffe/build/tools/caffe time --model=<PATH TO TRAIN_VAL.PROTOTXT>

--engine-MKL2017 so as to see a better performance.

 

Thanks

Anand

Hi Anand,

Quote:

Anandakrishnan C. (Intel) wrote:

Inside Caffe/models there is a directory for Intel_Optimized Model  (https://github.com/intel/caffe/tree/master/models/intel_optimized_models/alexnet). You can find prototxt files with configurations that work well in Intel Architecture.

As I referred before, please use numactl –m 1 /opt/caffe/build/tools/caffe time --model=<PATH TO TRAIN_VAL.PROTOTXT>

--engine-MKL2017 so as to see a better performance.

I already tried it and it doesn't work.

tools$ numactl -m 1 /caffe/build/tools/caffe time --model=/caffe/models/intel_optimized_models/alexnet/train_val.prototxt --engine-MKL2017
ERROR: unknown command line flag 'engine-MKL2017'

Also, as far as I understand the paths inside the train_val.prototxt needs to be changed. Few scripts also need to be executed manually (for example: /caffe/data/ilsvrc12/get_ilsvrc_aux.sh), either in "model", "data" or "examples" folder to generate specific files that tran_val.prototxt will require.

I feel Intel documentation is not good enoug and it's important as Intel wants IA architecture to use Intel Optimized Caffe and not the BVLC Caffe.

Please help.

Thanks.

Chetan Arvind Patil

Dear Chetan

The CAFFE TIME command you have used is syntactically incorrect. (Typo : --engine==MKL2017)

Please use as below

tools$ numactl -m 1 /caffe/build/tools/caffe time --model=/caffe/models/intel_optimized_models/alexnet/train_val.prototxt --engine=MKL2017 

This should work for you

 

 

Hi Anand,

I will need image-net lmdb. Exactly which databased I need to download to test above command? For the URL sited in the article at Intel's blog, there are many different dataset.

Thanks.

Chetan Arvind Patil

Dear Chetan,

The Imagenet is a very massive dataset. Do you really want to download that or some smaller ones like CIFAR 10 Dataset would suffice?

Hi Anand,

ImageNet has year wise dataset which are around 200GB, any specific reason you will not suggest using them with Intel Optimized Caffe? Is it not supposed to work with Intel Optimized Caffe?

I have specific requirements for which ImageNet will suite better.

Thanks.

Chetan Arvind Patil
Best Reply

Dear Chetan,

It is not that ImageNet will not work in Intel Caffe, I have never downloaded it personally for any purpose. What I do is download the ImageNet trained model and use it for other use cases, so that I can have the learning transferred to my own cases and I do not want to train it again.

Anyways, I think you can download it from http://image-net.org/download-images, but not really sure on its terms and conditions.

BTW, If the original setup issue of Caffe is resolved, Can you let me know If I can close it. You can open a new thread for discussing the other data related issues. This will help us to better track the issues and its resolution timelines.

 

Thanks

Anand

Hi Anand,

Yes, Caffe build worked.

Thanks.

Chetan Arvind Patil

Thank Chetan, I will close this thread now and you can start any new thread for further questions

Leave a Comment

Please sign in to add a comment. Not a member? Join today