Skip to content

Commit

Permalink
Install nccl in dockerfile of manylinux2014-cuda10.2 to compile singa…
Browse files Browse the repository at this point in the history
… with nccl

Update version in Cmakefiles to 3.2.0
  • Loading branch information
nudles committed Aug 9, 2021
1 parent 3ca846e commit 0f17228
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Thirdparty)
#string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${VERSION}")


SET(PACKAGE_VERSION 3.1.0) # ${VERSION})
SET(VERSION 3.1.0)
SET(PACKAGE_VERSION 3.2.0) # ${VERSION})
SET(VERSION 3.2.0)
SET(SINGA_MAJOR_VERSION 3)
SET(SINGA_MINOR_VERSION 1)
SET(SINGA_MINOR_VERSION 2)
SET(SINGA_PATCH_VERSION 0)
#SET(SINGA_MAJOR_VERSION ${VERSION_MAJOR}) # 0 -
#SET(SINGA_MINOR_VERSION ${VERSION_MINOR}) # 0 - 9
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
from datetime import date

# stable version
VERSION = '3.1.0.rc1'
VERSION = '3.2.0'
# get the git hash
# git_hash = subprocess.check_output(["git", "describe"]).strip().split('-')[-1][1:]
# comment the next line to build wheel for stable version
Expand Down Expand Up @@ -422,6 +422,7 @@ def build_extensions(self):
'numpy >=1.16,<2.0', #1.16
'onnx==1.6',
'deprecated',
'pytest',
'unittest-xml-reporting',
'future',
'pillow',
Expand Down
2 changes: 1 addition & 1 deletion test/python/test_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def _kint_float(self, dev=gpu_dev):
scalar = random.random() * 100
y = x + scalar
self.assertEqual(y.dtype, tensor.float32)
np.testing.assert_array_almost_equal(tensor.to_numpy(y), x_val + scalar)
np.testing.assert_array_almost_equal(tensor.to_numpy(y), x_val + scalar, 5)

@unittest.skipIf(not singa_api.USE_CUDA, 'CUDA is not enabled')
def test_kint_float_gpu(self):
Expand Down
8 changes: 8 additions & 0 deletions tool/docker/devel/centos6/cuda10/Dockerfile.manylinux2014
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,14 @@ RUN CUDNN_DOWNLOAD_SUM=600267f2caaed2fd58eb214ba669d8ea35f396a7d19b94822e6b36f9f
rm cudnn-10.2-linux-x64-v7.6.5.32.tgz && \
ldconfig

# install nccl for distributed training
RUN git clone https://github.com/NVIDIA/nccl.git $HOME/nccl \
&& cd $HOME/nccl \
&& git checkout v2.4.8-1 \
&& make BUILDDIR=/usr/local/ -j$(nproc) src.build \
&& rm -rf /usr/local/obj \
&& rm -rf $HOME/nccl

# install cnmem to /usr/local/include /usr/local/lib
RUN git clone https://github.com/NVIDIA/cnmem.git cnmem \
&& cd cnmem && mkdir build && cd build && cmake .. && make && make install && cd ../.. && rm -rf cnmem
Expand Down

0 comments on commit 0f17228

Please sign in to comment.