mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [incubator-mxnet] branch master updated: Updating the build documentation with instructions to build mxnet with NCCL (#9058)
Date Thu, 14 Dec 2017 19:16:21 GMT
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new 1f70a48  Updating the build documentation with instructions to build mxnet with NCCL
(#9058)
1f70a48 is described below

commit 1f70a4850128cc762dd49768529c8e4f8b7ddf4c
Author: Amol Lele <19983848+leleamol@users.noreply.github.com>
AuthorDate: Thu Dec 14 11:16:18 2017 -0800

    Updating the build documentation with instructions to build mxnet with NCCL (#9058)
    
    * Updating the build documentation with instructions to build mxnet with NCCL
    
    * Added the missing command to run the test_nccl.py
---
 docs/install/build_from_source.md | 37 +++++++++++++++++++++++++++++++++++++
 tests/python/gpu/test_nccl.py     |  2 ++
 2 files changed, 39 insertions(+)

diff --git a/docs/install/build_from_source.md b/docs/install/build_from_source.md
index 82baa1b..4f7083a 100644
--- a/docs/install/build_from_source.md
+++ b/docs/install/build_from_source.md
@@ -319,6 +319,43 @@ These commands produce a library called ```mxnet.dll``` in the ```./build/Releas
 
 </div>
 
+<div class="linux ubuntu">
+
+## Build MXNet using NCCL
+- Download and install the latest NCCL library from NVIDIA.
+- Note the directory path in which NCCL libraries and header files are installed.
+- Ensure that the installation directory contains ```lib``` and ```include``` folders.
+- Ensure that the prerequisites for using NCCL such as Cuda libraries are met. 
+- Append the ```config.mk``` file with following, in addition to the CUDA related options.
+- USE_NCCL=1
+- USE_NCCL_PATH=path-to-nccl-installation-folder
+``` bash
+echo "USE_NCCL=1" >> make/config.mk
+echo "USE_NCCP_PATH=path-to-nccl-installation-folder" >> make/config.mk
+cp make/config.mk .
+```
+- Run make command
+``` bash
+make -j"$(nproc)"
+```
+
+## Validation
+- Follow the steps to install MXNet Python binding.
+- Comment the following line in ```test_nccl.py``` file at ```incubator-mxnet/tests/python/gpu/test_nccl.py```
+``` bash
+@unittest.skip("Test requires NCCL library installed and enabled during build")
+```
+- Run test_nccl.py script as follows. The test should complete. It does not produce any output.
+``` bash
+nosetests --verbose tests/python/gpu/test_nccl.py
+```
+
+## Recommendation for best performance
+It is recommended to set environment variable NCCL_LAUNCH_MODE to PARALLEL when using NCCL
version 2.1 or newer.
+
+
+</div>
+
 ## Build the C++ package
 The C++ package has the same prerequisites as the MXNet library, you should also have `python`
installed. (Both `python` 2 and 3 are supported)
 
diff --git a/tests/python/gpu/test_nccl.py b/tests/python/gpu/test_nccl.py
index 0e0c18f..fd27c0b 100644
--- a/tests/python/gpu/test_nccl.py
+++ b/tests/python/gpu/test_nccl.py
@@ -38,5 +38,7 @@ def test_nccl_pushpull():
             for x in range(n_gpus):
                 assert(np.sum(np.abs((res[x]-n_gpus).asnumpy()))==0)
 
+    print ("Passed")
+
 if __name__ == '__main__':
     test_nccl_pushpull()

-- 
To stop receiving notification emails like this one, please contact
['"commits@mxnet.apache.org" <commits@mxnet.apache.org>'].

Mime
View raw message