At Apache MXNet (Incubating) we want to make sure that it's easy for users to install our framework. On the other hand, the recent requirement on OSX 10.13 prevents us from offering hassle-free binary distribution on Mac with MKL-DNN option. Would it be feasible to extend the compatibility to earlier OSX/Xcode? (xcode 8, OSX 10.11 is what we currently offer)
We don't have a requirement for OSX 10.13, but it is the version we validate against. Are you seeing errors with 10.11? If so, this is unexpected from our end.
...
Downloaded and unpacked Intel(R) MKL small libraries to /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/external
-- CMAKE_BUILD_TYPE is unset, defaulting to Release
-- Detecting Intel(R) MKL: trying mklml_intel
-- Intel(R) MKL: include /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/install/include
-- Intel(R) MKL: lib /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/install/lib/libmklml.dylib
-- Try OpenMP C flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
clang: warning: optimization flag '-finline-functions' is not supported
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
CMake Warning at cmake/OpenMP.cmake:107 (message):
OpenMP library could not be found. Proceeding might lead to highly
sub-optimal performance.
Call Stack (most recent call first):
CMakeLists.txt:69 (include)
CMake Error at cmake/OpenMP.cmake:39 (set_if):
set_if Macro invoked with incorrect arguments for macro named: set_if
Call Stack (most recent call first):
cmake/OpenMP.cmake:57 (forbid_link_compiler_omp_rt)
cmake/OpenMP.cmake:115 (use_intel_omp_rt)
CMakeLists.txt:69 (include)
CMake Error at cmake/OpenMP.cmake:40 (set_if):
set_if Macro invoked with incorrect arguments for macro named: set_if
Call Stack (most recent call first):
cmake/OpenMP.cmake:57 (forbid_link_compiler_omp_rt)
cmake/OpenMP.cmake:115 (use_intel_omp_rt)
CMakeLists.txt:69 (include)
-- OpenMP lib: /Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/install/lib/libiomp5.dylib
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- VTune profiling environment is unset
-- Configuring incomplete, errors occurred!
See also "/Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/CMakeFiles/CMakeOutput.log".
See also "/Users/travis/build/dmlc/mxnet-distro/mxnet-build/3rdparty/mkldnn/build/CMakeFiles/CMakeError.log".
Can you help me with steps leading up to this output? are you following the "build from source" section of https://software.intel.com/en-us/articles/apache-mxnet-v120-released-with-intel-optimized-cpu-backend
In the meantime, I will look for a machine with 10.11 OS to try and reproduce.
Also, can you please share cmake version? I tried 3.9.4 (the oldest I have on our mac machine) and it seems to work...
The environment is on the travis-ci, osx_image: xcode8, with cmake version is 3.6.1. Though maybe not relevant, I have the following before_install/install steps:
before_install: |
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
travis_wait rvm get head --auto-dotfiles;
travis_wait brew update;
travis_wait brew install pyenv openssl automake pkg-config nasm;
travis_wait brew upgrade pyenv openssl automake pkg-config nasm --quiet;
pyenv --version
travis_wait pyenv install -s $PYTHON_VERSION
export PATH=$HOME/.pyenv/versions/$PYTHON_VERSION/bin:$PATH
python --version
if [[ -z $(command -v pip) ]]; then
travis_wait curl -L -O https://bootstrap.pypa.io/get-pip.py
travis_wait python get-pip.py
fi
pip --version
fi
install: |
travis_wait sudo -H pip install -U pip "setuptools==36.2.0" wheel pypandoc twine nose numpy mock
I'm simply building mxnet with USE_MKLDNN=1 using make. MKLDNN related build logic is here. If you need other details on how building mkldnn works in mxnet, @pengzhao-intel and team should have it.
thanks the helps @nathan-greeneltch-intel @rsdubtso
The build cmd for MKL-DNN as below:
https://github.com/apache/incubator-mxnet/blob/master/mkldnn.mk#L40
build from source:
git clone --recursive https://github.com/apache/incubator-mxnet/
cd incubator-mxnet
make USE_OPENCV=1 USE_MKLDNN=1 USE_BLAS=apple
This is a bug in our build system that seems to be only triggered with some versions of CMake (like 3.6.1 in the travis configuraiton mentioned above) when the compiler does not support OpenMP (like the Apple's version of Clang). The fix is to quote macro arguments. It is working its way through the system and probably be in all the relevant branches by the end of the day today.
@szha, Considering that we have v0.18 with this fix coming in 1-2 weeks do you need it backported to v0.17 branch?
Backport would be great. I鈥檇 love to get the fix into 1.4 release of mxnet is which will need the fix immediately.
v0.17.4 with this fix for v0.17 branch is released.
Most helpful comment
@szha, the fix is now available in v0.17, v0.18 and master.