Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
[MKL-DNN] Add mxnet mkldnn cmake tutorial (#16688)
Browse files Browse the repository at this point in the history
* add mxnet mkldnn cmake instruction

* imporve doc

* OMP->OpenMP
  • Loading branch information
xinyu-intel authored and pengzhao-intel committed Nov 1, 2019
1 parent b5c2b82 commit c013757
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,24 @@ cd incubator-mxnet

### Build MXNet with MKL-DNN

To achieve better performance, the Intel OpenMP and llvm OpenMP are recommended as below instruction. Otherwise, default GNU OpenMP will be used and you may get the sub-optimal performance. If you don't have the full [MKL](https://software.intel.com/en-us/intel-mkl) library installation, you might use OpenBLAS as the blas library, by setting USE_BLAS=openblas.

```
# build with llvm OpenMP and Intel MKL/openblas
mkdir build && cd build
cmake -DUSE_CUDA=OFF -DUSE_MKL_IF_AVAILABLE=ON -DUSE_MKLDNN=ON -DUSE_OPENMP=ON -DUSE_OPENCV=ON ..
make -j $(nproc)
```

```
# build with Intel MKL and Intel OpenMP
make -j $(nproc) USE_OPENCV=1 USE_MKLDNN=1 USE_BLAS=mkl USE_INTEL_PATH=/opt/intel
```

If you don't have the full [MKL](https://software.intel.com/en-us/intel-mkl) library installation, you might use OpenBLAS as the blas library, by setting USE_BLAS=openblas.
```
# build with openblas and GNU OpenMP(sub-optimal performance)
make -j $(nproc) USE_OPENCV=1 USE_MKLDNN=1 USE_BLAS=openblas
```

<h2 id="2">MacOS</h2>

Expand Down

0 comments on commit c013757

Please sign in to comment.