Skip to content

Commit a9fce0e

Browse files
committed
Merge remote-tracking branch 'origin/branch-0.8' into fea-ext-memory-resource
2 parents 82c0a0b + b3ef159 commit a9fce0e

36 files changed

+3677
-67
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ include/rmm/detail/cnmem.h
4141

4242
# generated librmm_build.py
4343
python/librmm_cffi/librmm_build.py
44+
45+
# Doxygen
46+
doxygen/html/

CHANGELOG.md

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,62 @@
22
## New Features
33

44
- PR #96 Added `device_memory_resource` for beginning of overhaul of RMM design
5-
5+
66
## Improvements
77

8+
...
9+
810
## Bug Fixes
911

12+
- PR #92 Update docs version
1013

11-
# RMM 0.5.0 (Date TBD)
14+
15+
# RMM 0.7.0 (10 May 2019)
16+
17+
## New Features
18+
19+
- PR #67 Add random_allocate microbenchmark in tests/performance
20+
- PR #70 Create conda environments and conda recipes
21+
- PR #77 Add local build script to mimic gpuCI
22+
- PR #80 Add build script for docs
23+
24+
## Improvements
25+
26+
- PR #76 Add cudatoolkit conda dependency
27+
- PR #84 Use latest release version in update-version CI script
28+
- PR #90 Avoid using c++14 auto return type for thrust_rmm_allocator.h
29+
30+
## Bug Fixes
31+
32+
- PR #68 Fix signed/unsigned mismatch in random_allocate benchmark
33+
- PR #74 Fix rmm conda recipe librmm version pinning
34+
- PR #72 Remove unnecessary _BSD_SOURCE define in random_allocate.cpp
35+
36+
37+
# RMM 0.6.0 (18 Mar 2019)
38+
39+
## New Features
40+
41+
- PR #43 Add gpuCI build & test scripts
42+
- PR #44 Added API to query whether RMM is initialized and with what options.
43+
- PR #60 Default to CXX11_ABI=ON
44+
45+
## Improvements
46+
47+
## Bug Fixes
48+
49+
- PR #58 Eliminate unreliable check for change in available memory in test
50+
- PR #49 Fix pep8 style errors detected by flake8
51+
52+
53+
# RMM 0.5.0 (28 Jan 2019)
1254

1355
## New Features
1456

1557
- PR #2 Added CUDA Managed Memory allocation mode
16-
58+
1759
## Improvements
18-
60+
1961
- PR #12 Enable building RMM as a submodule
2062
- PR #13 CMake: Added CXX11ABI option and removed Travis references
2163
- PR #16 CMake: Added PARALLEL_LEVEL environment variable handling for GTest build parallelism (matches cuDF)
@@ -25,6 +67,8 @@
2567

2668
- PR #10 Change cnmem submodule URL to use https
2769
- PR #15 Temporarily disable hanging AllocateTB test for managed memory
70+
- PR #28 Fix invalid reference to local stack variable in `rmm::exec_policy`
71+
2872

2973
# RMM 0.4.0 (20 Dec 2018)
3074

@@ -36,11 +80,11 @@
3680

3781
- CUDF PR #472 RMM: Created centralized rmm::device_vector alias and rmm::exec_policy
3882
- CUDF PR #465 Added templated C++ API for RMM to avoid explicit cast to `void**`
39-
83+
4084
## Bug Fixes
4185

4286

43-
RMM was initially implemented as part of cuDF, so we include the relevant changelog history below.
87+
RMM was initially implemented as part of cuDF, so we include the relevant changelog history below.
4488

4589
# cuDF 0.3.0 (23 Nov 2018)
4690

@@ -49,7 +93,7 @@ RMM was initially implemented as part of cuDF, so we include the relevant change
4993
- PR #336 CSV Reader string support
5094

5195
## Improvements
52-
96+
5397
- CUDF PR #333 Add Rapids Memory Manager documentation
5498
- CUDF PR #321 Rapids Memory Manager adds file/line location logging and convenience macros
5599

CMakeLists.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#=============================================================================
1616
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
1717

18-
project(RMM VERSION 0.4.0 LANGUAGES C CXX CUDA)
18+
project(RMM VERSION 0.7.0 LANGUAGES C CXX CUDA)
1919

2020
###################################################################################################
2121
# - build type ------------------------------------------------------------------------------------
@@ -43,13 +43,14 @@ set(CMAKE_CXX_COMPILER $ENV{CXX})
4343
if(CMAKE_COMPILER_IS_GNUCXX)
4444
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
4545

46-
option(CMAKE_CXX11_ABI "Enable the GLIBCXX11 ABI" OFF)
46+
option(CMAKE_CXX11_ABI "Enable the GLIBCXX11 ABI" ON)
4747
if(CMAKE_CXX11_ABI)
48-
message(STATUS "CUDF: Enabling the GLIBCXX11 ABI")
48+
message(STATUS "RMM: Enabling the GLIBCXX11 ABI")
4949
else()
50-
message(STATUS "CUDF: Disabling the GLIBCXX11 ABI")
50+
message(STATUS "RMM: Disabling the GLIBCXX11 ABI")
5151
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
5252
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
53+
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -D_GLIBCXX_USE_CXX11_ABI=0")
5354
endif(CMAKE_CXX11_ABI)
5455
endif(CMAKE_COMPILER_IS_GNUCXX)
5556

@@ -168,3 +169,13 @@ add_custom_command(OUTPUT RMM_INSTALL_PYTHON_CFFI
168169
VERBATIM)
169170

170171
add_custom_target(rmm_install_python DEPENDS rmm RMM_PYTHON_CFFI RMM_INSTALL_PYTHON_CFFI)
172+
173+
###################################################################################################
174+
# - make documentation ----------------------------------------------------------------------------
175+
176+
add_custom_command(OUTPUT RMM_DOXYGEN
177+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doxygen
178+
COMMAND doxygen Doxyfile
179+
VERBATIM)
180+
181+
add_custom_target(rmm_doc DEPENDS RMM_DOXYGEN)

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,10 @@ contributing to. Start with _Step 3_ from above, commenting on the issue to let
4949
others know you are working on it. If you have any questions related to the
5050
implementation of the issue, ask them in the issue instead of the PR.
5151

52+
### Building and Testing on a gpuCI image locally
53+
54+
Before submitting a pull request, you can do a local build and test on your machine that mimics our gpuCI environment using the `ci/local/build.sh` script.
55+
For detailed information on usage of this script, see [here](ci/local/README.md).
56+
5257
## Attribution
5358
Portions adopted from https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ situations:
121121

122122
RMM includes a custom Thrust allocator in the file `thrust_rmm_allocator.h`. This defines the template class `rmm_allocator`, and
123123
a custom Thrust CUDA device execution policy called `rmm::exec_policy(stream)`.
124-
```
125124

126125
#### Thrust Device Vectors
127126

ci/checks/changelog.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
# Copyright (c) 2018, NVIDIA CORPORATION.
3+
#########################
4+
# RMM CHANGELOG Tester #
5+
#########################
6+
7+
# Checkout master for comparison
8+
git checkout --quiet master
9+
10+
# Switch back to tip of PR branch
11+
git checkout --quiet current-pr-branch
12+
13+
# Ignore errors during searching
14+
set +e
15+
16+
# Get list of modified files between matster and PR branch
17+
CHANGELOG=`git diff --name-only master...current-pr-branch | grep CHANGELOG.md`
18+
# Check if CHANGELOG has PR ID
19+
PRNUM=`cat CHANGELOG.md | grep "$PR_ID"`
20+
RETVAL=0
21+
22+
# Return status of check result
23+
if [ "$CHANGELOG" != "" -a "$PRNUM" != "" ] ; then
24+
echo -e "\n\n>>>> PASSED: CHANGELOG.md has been updated with current PR information.\n\nPlease ensure the update meets the following criteria.\n"
25+
else
26+
echo -e "\n\n>>>> FAILED: CHANGELOG.md has not been updated!\n\nPlease add a line describing this PR to CHANGELOG.md in the repository root directory. The line should meet the following criteria.\n"
27+
RETVAL=1
28+
fi
29+
30+
cat << EOF
31+
It should be placed under the section for the appropriate release.
32+
It should be placed under "New Features", "Improvements", or "Bug Fixes" as appropriate.
33+
It should be formatted as '- PR #<PR number> <Concise human-readable description of the PR's new feature, improvement, or bug fix>'
34+
Example format for #491 '- PR #491 Add CI test script to check for updates to CHANGELOG.md in PRs'
35+
36+
37+
EOF
38+
39+
exit $RETVAL

ci/checks/style.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# Copyright (c) 2018, NVIDIA CORPORATION.
3+
#####################
4+
# RMM Style Tester #
5+
#####################
6+
7+
# Ignore errors and set path
8+
set +e
9+
PATH=/conda/bin:$PATH
10+
11+
# Activate common conda env
12+
source activate gdf
13+
14+
# Run flake8 and get results/return code
15+
FLAKE=`flake8 python`
16+
RETVAL=$?
17+
18+
# Output results if failure otherwise show pass
19+
if [ "$FLAKE" != "" ]; then
20+
echo -e "\n\n>>>> FAILED: flake8 style check; begin output\n\n"
21+
echo -e "$FLAKE"
22+
echo -e "\n\n>>>> FAILED: flake8 style check; end output\n\n"
23+
else
24+
echo -e "\n\n>>>> PASSED: flake8 style check\n\n"
25+
fi
26+
27+
exit $RETVAL

ci/cpu/build.sh

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/usr/bin/env bash
2+
# Copyright (c) 2018, NVIDIA CORPORATION.
3+
######################################
4+
# rmm CPU build script for CI #
5+
######################################
6+
set -e
7+
8+
# Logger function for build status output
9+
function logger() {
10+
echo -e "\n>>>> $@\n"
11+
}
12+
13+
# Set path and build parallel level
14+
export PATH=/conda/bin:/usr/local/cuda/bin:$PATH
15+
export PARALLEL_LEVEL=4
16+
17+
# Set home to the job's workspace
18+
export HOME=$WORKSPACE
19+
20+
# Switch to project root; also root of repo checkout
21+
cd $WORKSPACE
22+
23+
# Get latest tag and number of commits since tag
24+
export GIT_DESCRIBE_TAG=`git describe --abbrev=0 --tags`
25+
export GIT_DESCRIBE_NUMBER=`git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count`
26+
27+
################################################################################
28+
# SETUP - Check environment
29+
################################################################################
30+
31+
logger "Get env..."
32+
env
33+
34+
logger "Activate conda env..."
35+
source activate gdf
36+
37+
logger "Check versions..."
38+
python --version
39+
gcc --version
40+
g++ --version
41+
conda list
42+
43+
# FIX Added to deal with Anancoda SSL verification issues during conda builds
44+
conda config --set ssl_verify False
45+
46+
################################################################################
47+
# INSTALL - Install NVIDIA driver
48+
################################################################################
49+
50+
logger "Install NVIDIA driver for CUDA $CUDA..."
51+
apt-get update -q
52+
DRIVER_VER="396.44-1"
53+
LIBCUDA_VER="396"
54+
if [ "$CUDA" == "10.0" ]; then
55+
DRIVER_VER="410.72-1"
56+
LIBCUDA_VER="410"
57+
fi
58+
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
59+
cuda-drivers=${DRIVER_VER} libcuda1-${LIBCUDA_VER}
60+
61+
################################################################################
62+
# BUILD - Conda package builds (conda deps: librmm <- rmm)
63+
################################################################################
64+
65+
logger "Build conda pkg for librmm..."
66+
source ci/cpu/librmm/build_librmm.sh
67+
68+
logger "Build conda pkg for rmm..."
69+
source ci/cpu/rmm/build_rmm.sh
70+
71+
################################################################################
72+
# UPLOAD - Conda packages
73+
################################################################################
74+
75+
logger "Upload conda pkg for librmm..."
76+
source ci/cpu/librmm/upload-anaconda.sh
77+
78+
logger "Upload conda pkg for rmm..."
79+
source ci/cpu/rmm/upload-anaconda.sh

ci/cpu/librmm/build_librmm.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
set -e
2+
3+
if [ "$BUILD_LIBRMM" == '1' ]; then
4+
echo "Building librmm"
5+
CUDA_REL=${CUDA:0:3}
6+
if [ "${CUDA:0:2}" == '10' ]; then
7+
# CUDA 10 release
8+
CUDA_REL=${CUDA:0:4}
9+
fi
10+
11+
conda build conda/recipes/librmm -c nvidia/label/cuda${CUDA_REL} -c rapidsai/label/cuda${CUDA_REL} -c rapidsai-nightly/label/cuda${CUDA_REL} -c conda-forge --python=$PYTHON
12+
fi

ci/cpu/librmm/upload-anaconda.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
#
3+
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh
4+
5+
set -e
6+
7+
if [ "$BUILD_LIBRMM" == '1' ]; then
8+
export UPLOADFILE=`conda build conda/recipes/librmm -c rapidsai -c rapidsai-nightly -c nvidia -c conda-forge --python=$PYTHON --output`
9+
10+
SOURCE_BRANCH=master
11+
CUDA_REL=${CUDA:0:3}
12+
if [ "${CUDA:0:2}" == '10' ]; then
13+
# CUDA 10 release
14+
CUDA_REL=${CUDA:0:4}
15+
fi
16+
17+
SOURCE_BRANCH=master
18+
19+
LABEL_OPTION="--label main --label cuda${CUDA_REL}"
20+
echo "LABEL_OPTION=${LABEL_OPTION}"
21+
22+
# Restrict uploads to master branch
23+
if [ ${GIT_BRANCH} != ${SOURCE_BRANCH} ]; then
24+
echo "Skipping upload"
25+
return 0
26+
fi
27+
28+
if [ -z "$MY_UPLOAD_KEY" ]; then
29+
echo "No upload key"
30+
return 0
31+
fi
32+
33+
echo "Upload"
34+
echo ${UPLOADFILE}
35+
anaconda -t ${MY_UPLOAD_KEY} upload -u ${CONDA_USERNAME:-rapidsai} ${LABEL_OPTION} --force ${UPLOADFILE}
36+
fi

0 commit comments

Comments
 (0)