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

Commit

Permalink
Always use config.mk in make install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgk committed Nov 21, 2018
1 parent 60dd170 commit 0693fdb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
6 changes: 5 additions & 1 deletion docs/install/c_plus_plus.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ To enable C++ package, just add `USE_CPP_PACKAGE=1` in the [build from source](b
For example to build MXNet with GPU support and the C++ package, OpenCV, and OpenBLAS, from the project root you would run:

```bash
make -j USE_CPP_PACKAGE=1 USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1
echo "USE_CPP_PACKAGE=1" >> ./config.mk
echo "USE_OPENCV=1" >> ./config.mk
echo "USE_BLAS=openblas" >> ./config.mk
echo "USE_CUDA=1" >> ./config.mk
make -j $(nproc)
```

You may also want to add the MXNet shared library to your `LD_LIBRARY_PATH`:
Expand Down
9 changes: 8 additions & 1 deletion docs/install/osx_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ The file called ```osx.mk``` has the configuration required for building MXNet o
To build with MKLDNN

```bash
LIBRARY_PATH=$(brew --prefix llvm)/lib/ make -j $(sysctl -n hw.ncpu) CC=$(brew --prefix llvm)/bin/clang++ CXX=$(brew --prefix llvm)/bin/clang++ USE_OPENCV=1 USE_OPENMP=1 USE_MKLDNN=1 USE_BLAS=apple USE_PROFILER=1
echo "CC=$(brew --prefix llvm)/bin/clang++" >> ./config.mk
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> ./config.mk
echo "USE_OPENCV=1" >> ./config.mk
echo "USE_OPENMP=1" >> ./config.mk
echo "USE_MKLDNN=1" >> ./config.mk
echo "USE_BLAS=apple" >> ./config.mk
echo "USE_PROFILER=1" >> ./config.mk
LIBRARY_PATH=$(brew --prefix llvm)/lib/ make -j $(sysctl -n hw.ncpu)
```

If building with ```GPU``` support, add the following configuration to config.mk and build:
Expand Down
20 changes: 16 additions & 4 deletions docs/install/ubuntu_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,23 +163,33 @@ If building on CPU and using OpenBLAS:
```bash
git clone --recursive https://github.com/apache/incubator-mxnet.git
cd incubator-mxnet
make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas
echo "USE_OPENCV = 1" >> ./config.mk
echo "USE_BLAS = openblas" >> ./config.mk
make -j $(nproc)
```

If building on CPU and using MKL and MKL-DNN (make sure MKL is installed according to [Math Library Selection](build_from_source.html#math-library-selection) and [MKL-DNN README](https://github.com/apache/incubator-mxnet/blob/master/MKLDNN_README.md)):

```bash
git clone --recursive https://github.com/apache/incubator-mxnet.git
cd incubator-mxnet
make -j $(nproc) USE_OPENCV=1 USE_BLAS=mkl USE_MKLDNN=1
echo "USE_OPENCV = 1" >> ./config.mk
echo "USE_BLAS = openblas" >> ./config.mk
echo "USE_MKLDNN = 1" >> ./config.mk
make -j $(nproc)
```

If building on GPU and you want OpenCV and OpenBLAS (make sure you have installed the [CUDA dependencies first](#cuda-dependencies)):

```bash
git clone --recursive https://github.com/apache/incubator-mxnet.git
cd incubator-mxnet
make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1
echo "USE_OPENCV = 1" >> ./config.mk
echo "USE_BLAS = openblas" >> ./config.mk
echo "USE_CUDA = 1" >> ./config.mk
echo "USE_CUDA_PATH = /usr/local/cuda" >> ./config.mk
echo "USE_CUDNN = 1" >> ./config.mk
make -j $(nproc)
```

*Note* - USE_OPENCV and USE_BLAS are make file flags to set compilation options to use OpenCV and BLAS library. You can explore and use more compilation options in `make/config.mk` and also review common [usage examples](build_from_source.html#usage-examples).
Expand Down Expand Up @@ -348,7 +358,9 @@ $ sudo apt-get install -y libopencv-dev
```bash
$ git clone --recursive https://github.com/apache/incubator-mxnet
$ cd incubator-mxnet
$ make -j $(nproc) USE_OPENCV=1 USE_BLAS=openblas
$ echo "USE_OPENCV = 1" >> ./config.mk
$ echo "USE_BLAS = openblas" >> ./config.mk
$ make -j $(nproc)
```

*Note* - USE_OPENCV and USE_BLAS are make file flags to set compilation options to use OpenCV and BLAS library. You can explore and use more compilation options in `make/config.mk`.
Expand Down

0 comments on commit 0693fdb

Please sign in to comment.