-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Default build with CMake not using MKL #14670
Comments
Hey, this is the MXNet Label Bot. |
thank to report this issue @larroy @NeoZhangJianyu @yinghu5 is working on the CMake for MKL |
@mxnet-label-bot add [CMake, Build, MKL] |
@larroy I'm fixing this issue now.
I have fixed it in linux locally. But the solution need to be reviewed. |
cc @TaoLv |
Thanks for the great response guys, you rock! |
@NeoZhangJianyu can you also fix this?
with cmake 3.14.2 greetings |
@sl1pkn07 Or fix it manually: Edit 3rdparty/mkldnn/cmake/utils.cmake:111: From
to
|
yep. but should be "fixed"/silenced in upstream, or i'am wrong? greetings |
Yes. It's an issue of mkldnn and should be fixed. |
ok. my issue is fixed via oneapi-src/oneDNN@e35da48, now wait to bump the version in mxnet .gitmodules greetings |
@sl1pkn07 Thank you for your patience. We're working on a new release of MKL-DNN. Will update MXNet submodule once the release comes out. |
Works nicely now, tested with MKL, no mkl and MKLDNN... thanks guys. |
i'm trying to build mxnet version 1.5.0 from sources and still receive the same error (in 1.5.1 as well) could you please help me with this? Below goes context of my dockerfile, so the error should be trivial to reproduce FROM ubuntu:18.04 as build
LABEL description="build images for the extractor server"
# next 2 lines help avoid configuring tzinfo in docker
ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezon
RUN apt update \
&& apt install -y git g++ build-essential automake libtool libssl-dev \
libcpprest-dev wget \
libopenblas-dev liblapack-dev libopencv-dev graphviz \
libjemalloc-dev libatlas-base-dev \
python3.8 \
&& rm -rf /var/lib/apt/lists/*
# installing cmake, because apt installs 3.10, when 3.13 is needed
RUN git clone --depth 1 --branch v3.17.0 https://github.com/Kitware/CMake/ \
&& cd CMake \
&& ./bootstrap -- -DCMAKE_USE_OPENSSL=OFF && make && make install
ENV OPENCV_VERSION=4.1.1
# Building and installing `OpenCV`
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.tar.gz \
-O /usr/src/opencv-${OPENCV_VERSION}.tar.gz \
&& tar -xzf /usr/src/opencv-${OPENCV_VERSION}.tar.gz -C /usr/src \
&& cd /usr/src/opencv-${OPENCV_VERSION}/ && mkdir -p build && cd build \
&& cmake -DBUILD_SHARED_LIBS=OFF -DOPENCV_FORCE_3RDPARTY_BUILD=ON \
-DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_1394=OFF -DWITH_FFMPEG=OFF \
-DWITH_GTK=OFF -DWITH_GSTREAMER=OFF .. && make install -j $(nproc) \
&& rm /usr/src/opencv-${OPENCV_VERSION}.tar.gz
# install mkl libs
RUN cd /tmp && \
# now get the key:
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
# now install that key
ls && \
apt-key add ./GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
# now remove the public key file exit the root shell
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \
wget https://apt.repos.intel.com/setup/intelproducts.list -O /etc/apt/sources.list.d/intelproducts.list &&\
apt-get update && \
apt-get install -y intel-mkl-2020.0-088
WORKDIR /usr/src
RUN git clone --depth 1 --branch 1.5.0 --recursive https://github.com/apache/incubator-mxnet
RUN apt install -y python
RUN cd /usr/src/incubator-mxnet/ && \
mkdir build && cd build && \
cmake \
-DUSE_INTEL_PATH=/opt/intel \
-DUSE_CUDA=0 \
-DUSE_CPP_PACKAGE=1 \
-DUSE_CUDNN=0 \
-DUSE_MKLDNN=1 \
-DUSE_MKL_IF_AVAILABLE=0 \
-DUSE_MKLML=0 \
-DUSE_OPENCV=1 \
-DMXNET_PREDICT_ONLY=1 \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_JEMALLOC=ON \
-DUSE_LAPACK=OFF \
-DBUILD_CPP_EXAMPLES=OFF \
.. && \
make install -j$(nproc) |
With make MKL is installed automatically, but with CMake in linux not.
The text was updated successfully, but these errors were encountered: