diff --git a/docs/install/c_plus_plus.md b/docs/install/c_plus_plus.md index 6078877c27c8..b66ee7d0b80a 100644 --- a/docs/install/c_plus_plus.md +++ b/docs/install/c_plus_plus.md @@ -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`: diff --git a/docs/install/osx_setup.md b/docs/install/osx_setup.md index 4e9293efce93..a2b59fe03618 100644 --- a/docs/install/osx_setup.md +++ b/docs/install/osx_setup.md @@ -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: diff --git a/docs/install/ubuntu_setup.md b/docs/install/ubuntu_setup.md index 8aac1432f8e0..a358bdb88e4f 100644 --- a/docs/install/ubuntu_setup.md +++ b/docs/install/ubuntu_setup.md @@ -163,7 +163,9 @@ 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)): @@ -171,7 +173,10 @@ If building on CPU and using MKL and MKL-DNN (make sure MKL is installed accordi ```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)): @@ -179,7 +184,12 @@ If building on GPU and you want OpenCV and OpenBLAS (make sure you have installe ```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). @@ -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`.