You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/02/07 13:16:32 UTC

[GitHub] stsukrov opened a new issue #14085: Default cmake build uses openblas instead of MKL

stsukrov opened a new issue #14085: Default cmake build uses openblas instead of MKL
URL: https://github.com/apache/incubator-mxnet/issues/14085
 
 
   Note: Providing complete information in the most concise form is the best way to get help. This issue template serves as the checklist for essential information to most of the technical issues and bug reports. For non-technical issues and feature requests, feel free to present the information in what you believe is the best form.
   
   For Q & A and discussion, please start a discussion thread at https://discuss.mxnet.io 
   
   ## Description
   Default CUDA-free build links to openblas AND mkl. openblas is used instead of mkl, which leads to pure performance.
   
   ## Environment info (Required)
   ----------Python Info----------
   Version      : 3.5.2
   Compiler     : GCC 5.4.0 20160609
   Build        : ('default', 'Nov 12 2018 13:43:14')
   Arch         : ('64bit', 'ELF')
   ------------Pip Info-----------
   Version      : 8.1.1
   Directory    : /usr/lib/python3/dist-packages/pip
   ----------MXNet Info-----------
   Version      : 1.5.0
   Directory    : /home/stsukrov/workspace/mxnet/python/mxnet
   Hashtag not found. Not installed from pre-built package.
   ----------System Info----------
   Platform     : Linux-4.4.0-1074-aws-x86_64-with-Ubuntu-16.04-xenial
   system       : Linux
   node         : ip-172-31-1-212
   release      : 4.4.0-1074-aws
   version      : #84-Ubuntu SMP Thu Dec 6 08:57:58 UTC 2018
   ----------Hardware Info----------
   machine      : x86_64
   processor    : x86_64
   Architecture:          x86_64
   CPU op-mode(s):        32-bit, 64-bit
   Byte Order:            Little Endian
   CPU(s):                72
   On-line CPU(s) list:   0-71
   Thread(s) per core:    2
   Core(s) per socket:    18
   Socket(s):             2
   NUMA node(s):          2
   Vendor ID:             GenuineIntel
   CPU family:            6
   Model:                 85
   Model name:            Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
   Stepping:              4
   CPU MHz:               3000.000
   BogoMIPS:              6000.00
   Hypervisor vendor:     KVM
   Virtualization type:   full
   L1d cache:             32K
   L1i cache:             32K
   L2 cache:              1024K
   L3 cache:              25344K
   NUMA node0 CPU(s):     0-17,36-53
   NUMA node1 CPU(s):     18-35,54-71
   Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single kaiser fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f rdseed adx smap clflushopt clwb avx512cd xsaveopt xsavec xgetbv1 ida arat pku
   ----------Network Test----------
   Setting timeout: 10
   Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0155 sec, LOAD: 0.0708 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0348 sec, LOAD: 0.2342 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0010 sec, LOAD: 0.3944 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0896 sec, LOAD: 0.7671 sec.
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0006 sec, LOAD: 0.9998 sec.
   Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.2689 sec, LOAD: 1.0834 sec.
   
   Compiler (gcc/clang/mingw/visual studio):
   gcc-5
   MXNet commit hash: d684c59049970794e8f7365f58b03e13801b44a3
   
   Build config:
   cmake -DUSE_CUDA=OFF
   
   tracing the line used to link the libmxnet.so produces 
   
   /home/stsukrov/cmaketmp/cmake-3.13.2-Linux-x86_64/bin/cmake -E cmake_link_script CMakeFiles/mxnet.dir/link.txt --verbose=1
   /usr/bin/c++ -fPIC -Wall -Wno-unknown-pragmas -Wno-sign-compare -O3 -msse2 -std=c++11 -mf16c -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -fopenmp -std=c++0x  -shared -Wl,-soname,libmxnet.so -o libmxnet.so CMakeFiles/mxnet.dir/dummy.c.o  -L/home/stsukrov/workspace/incubator-mxnet/build/mklml/mklml_lnx_2019.0.1.20180928/lib -Wl,-rpath,/home/stsukrov/workspace/incubator-mxnet/build/3rdparty/mkldnn/src:/home/stsukrov/workspace/incubator-mxnet/build/3rdparty/openmp/runtime/src:/home/stsukrov/workspace/incubator-mxnet/build/mklml/mklml_lnx_2019.0.1.20180928/lib: -Wl,--whole-archive libmxnet.a -Wl,--no-whole-archive libmxnet.a 3rdparty/mkldnn/src/libmkldnn.so.0.17.1.0 **-lopenblas** -lrt -ljemalloc /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4.9 /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4.9 3rdparty/openmp/runtime/src/libomp.so -lpthread -llapack -ljemalloc 3rdparty/dmlc-core/libdmlc.a -lpthread -llapack **-lmklml_intel** mklml/mklml_lnx_2019.0.1.20180928/lib/libiomp5.so /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4.9 -lpthread -ldl 
   
   So blas is linked before mklml_intel
   
   ## Minimum reproducible example
   Get the mxnet, build it, run the benchmark
   
   ## Steps to reproduce
   (Paste the commands you ran that produced the error.)
   
   1. git clone --recursive ...
   2. mkdir build && cd build
   3. cmake -DUSE_CUDA=OFF
   4. make -j20
   5. ldd libmxnet
   6. Run https://github.com/apache/incubator-mxnet/blob/master/example/image-classification/benchmark_score.py
   
   ## What have you tried to solve it?
   
   1. Linked manually to mklml_intel with a brutal fix: https://github.com/stsukrov/incubator-mxnet/commit/eebc17b04602b448686231a9e1fd1722bf919da7
   2. Rerun the benchmark
   3. Got the declared performance

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services