Skip to content

Commit 2db7710

Browse files
committed
Merge branch 'branch-22.02' into 'branch-22.04'.
2 parents d338ef8 + 2e781c1 commit 2db7710

File tree

152 files changed

+8807
-1672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+8807
-1672
lines changed

Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ _Italic_ algorithms are planned for future releases.
7979
| Link Analysis| | | |
8080
| | Pagerank | Multi-GPU | [C++ README](cpp/src/centrality/README.md#Pagerank) |
8181
| | Personal Pagerank | Multi-GPU | [C++ README](cpp/src/centrality/README.md#Personalized-Pagerank) |
82-
| | HITS | Single-GPU | leverages Gunrock |
82+
| | HITS | Single-GPU | Multi-GPU C code is ready, Python wrapper in 22.04 |
8383
| Link Prediction | | | |
8484
| | Jaccard Similarity | Single-GPU | |
8585
| | Weighted Jaccard Similarity | Single-GPU | |
@@ -88,7 +88,8 @@ _Italic_ algorithms are planned for future releases.
8888
| | _Local Clustering Coefficient_ | --- | |
8989
| Sampling | | | |
9090
| | Random Walks (RW) | Single-GPU | Biased and Uniform |
91-
| | _node2vec_ | --- | |
91+
| | Egonet | Single-GPU | multi-seed |
92+
| | _node2vec_ | --- | C code is ready, Python wrapper coming in 22.04 |
9293
| Traversal | | | |
9394
| | Breadth First Search (BFS) | Multi-GPU | with cutoff support <br/> [C++ README](cpp/src/traversal/README.md#BFS) |
9495
| | Single Source Shortest Path (SSSP) | Multi-GPU | [C++ README](cpp/src/traversal/README.md#SSSP) |
@@ -98,6 +99,7 @@ _Italic_ algorithms are planned for future releases.
9899
| Other | | | |
99100
| | Renumbering | Multi-GPU | multiple columns, any data type |
100101
| | Symmetrize | Multi-GPU | |
102+
| | Path Extraction | | Extract paths from BFS/SSP results in parallel |
101103
| Data Generator | | | |
102104
| | RMAT | Multi-GPU | |
103105
| | _Barabasi-Albert_ | --- | |
@@ -170,6 +172,9 @@ conda install -c nvidia -c rapidsai -c numba -c conda-forge cugraph cudatoolkit=
170172

171173
# CUDA 11.4
172174
conda install -c nvidia -c rapidsai -c numba -c conda-forge cugraph cudatoolkit=11.4
175+
176+
# CUDA 11.5
177+
conda install -c nvidia -c rapidsai -c numba -c conda-forge cugraph cudatoolkit=11.5
173178
```
174179

175180
Note: This conda installation only applies to Linux and Python versions 3.7/3.8.

SOURCEBUILD.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,22 @@ There are several other options available on the build script for advanced users
8989
```bash
9090
build.sh [<target> ...] [<flag> ...]
9191
where <target> is:
92-
clean - remove all existing build artifacts and configuration (start over)
93-
libcugraph - build the cugraph C++ code
94-
cugraph - build the cugraph Python package
95-
docs - build the docs
92+
clean - remove all existing build artifacts and configuration (start over)
93+
uninstall - uninstall libcugraph and cugraph from a prior build/install (see also -n)
94+
libcugraph - build libcugraph.so and SG test binaries
95+
libcugraph_etl - build libcugraph_etl.so and SG test binaries
96+
cugraph - build the cugraph Python package
97+
pylibcugraph - build the pylibcugraph Python package
98+
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
99+
docs - build the docs
96100
and <flag> is:
97101
-v - verbose build mode
98102
-g - build for debug
99-
-n - no install step
103+
-n - do not install after a successful build
100104
--allgpuarch - build for all supported GPU architectures
105+
--buildfaiss - build faiss statically into cugraph
101106
--show_depr_warn - show cmake deprecation warnings
107+
--skip_cpp_tests - do not build the SG test binaries as part of the libcugraph and libcugraph_etl targets
102108
-h - print this text
103109

104110
default action (no args) is to build and install 'libcugraph' then 'cugraph' then 'docs' targets
@@ -141,24 +147,43 @@ The default installation locations are `$CMAKE_INSTALL_PREFIX/lib` and `$CMAKE_I
141147
142148
### Building and installing the Python package
143149
144-
2) Install the Python package to your Python path:
150+
2) Install the Python packages to your Python path:
145151
146152
```bash
147153
cd $CUGRAPH_HOME
148154
cd python
155+
cd pylibcugraph
156+
python setup.py build_ext --inplace
157+
python setup.py install # install pylibcugraph
158+
cd ../cugraph
149159
python setup.py build_ext --inplace
150160
python setup.py install # install cugraph python bindings
161+
151162
```
152163
153164
154165
155166
## Run tests
156167
168+
If you already have the datasets:
169+
170+
```bash
171+
export RAPIDS_DATASET_ROOT_DIR=<path_to_ccp_test_and_reference_data>
172+
```
173+
If you do not have the datasets:
174+
175+
```bash
176+
cd $CUGRAPH_HOME/datasets
177+
source get_test_data.sh #This takes about 10 minutes and downloads 1GB data (>5 GB uncompressed)
178+
```
179+
157180
Run either the C++ or the Python tests with datasets
158181
159182
- **Python tests with datasets**
183+
160184
161185
```bash
186+
pip install python-louvain #some tests require this package to run
162187
cd $CUGRAPH_HOME
163188
cd python
164189
pytest
@@ -175,17 +200,7 @@ Run either the C++ or the Python tests with datasets
175200
```
176201
- **C++ tests with larger datasets**
177202
178-
If you already have the datasets:
179-
180-
```bash
181-
export RAPIDS_DATASET_ROOT_DIR=<path_to_ccp_test_and_reference_data>
182-
```
183-
If you do not have the datasets:
184-
185-
```bash
186-
cd $CUGRAPH_HOME/datasets
187-
source get_test_data.sh #This takes about 10 minutes and downloads 1GB data (>5 GB uncompressed)
188-
```
203+
189204
190205
Run the C++ tests on large input:
191206

build.sh

Lines changed: 48 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# Copyright (c) 2019-2021, NVIDIA CORPORATION.
3+
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
44

55
# cugraph build script
66

@@ -20,26 +20,25 @@ REPODIR=$(cd $(dirname $0); pwd)
2020
LIBCUGRAPH_BUILD_DIR=${LIBCUGRAPH_BUILD_DIR:=${REPODIR}/cpp/build}
2121
LIBCUGRAPH_ETL_BUILD_DIR=${LIBCUGRAPH_ETL_BUILD_DIR:=${REPODIR}/cpp/libcugraph_etl/build}
2222

23-
VALIDARGS="clean uninstall libcugraph libcugraph_etl cugraph pylibcugraph cpp-mgtests docs -v -g -n --allgpuarch --buildfaiss --show_depr_warn --skip_cpp_tests -h --help"
23+
VALIDARGS="clean uninstall uninstall_cmake_deps libcugraph libcugraph_etl cugraph pylibcugraph cpp-mgtests docs -v -g -n --allgpuarch --skip_cpp_tests -h --help"
2424
HELP="$0 [<target> ...] [<flag> ...]
2525
where <target> is:
26-
clean - remove all existing build artifacts and configuration (start over)
27-
uninstall - uninstall libcugraph and cugraph from a prior build/install (see also -n)
28-
libcugraph - build libcugraph.so and SG test binaries
29-
libcugraph_etl - build libcugraph_etl.so and SG test binaries
30-
cugraph - build the cugraph Python package
31-
pylibcugraph - build the pylibcugraph Python package
32-
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
33-
docs - build the docs
26+
clean - remove all existing build artifacts and configuration (start over)
27+
uninstall - uninstall libcugraph and cugraph from a prior build/install (see also -n)
28+
uninstall_cmake_deps - uninstall headers from external dependencies installed by cmake (raft, rmm, cuco, etc.) (see also -n)
29+
libcugraph - build libcugraph.so and SG test binaries
30+
libcugraph_etl - build libcugraph_etl.so and SG test binaries
31+
cugraph - build the cugraph Python package
32+
pylibcugraph - build the pylibcugraph Python package
33+
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
34+
docs - build the docs
3435
and <flag> is:
35-
-v - verbose build mode
36-
-g - build for debug
37-
-n - do not install after a successful build
38-
--allgpuarch - build for all supported GPU architectures
39-
--buildfaiss - build faiss statically into cugraph
40-
--show_depr_warn - show cmake deprecation warnings
41-
--skip_cpp_tests - do not build the SG test binaries as part of the libcugraph and libcugraph_etl targets
42-
-h - print this text
36+
-v - verbose build mode
37+
-g - build for debug
38+
-n - do not install after a successful build
39+
--allgpuarch - build for all supported GPU architectures
40+
--skip_cpp_tests - do not build the SG test binaries as part of the libcugraph and libcugraph_etl targets
41+
-h - print this text
4342
4443
default action (no args) is to build and install 'libcugraph' then 'libcugraph_etl' then 'pylibcugraph' then 'cugraph' then 'docs' targets
4544
@@ -52,12 +51,11 @@ BUILD_DIRS="${LIBCUGRAPH_BUILD_DIR} ${LIBCUGRAPH_ETL_BUILD_DIR} ${CUGRAPH_BUILD_
5251

5352
# Set defaults for vars modified by flags to this script
5453
VERBOSE_FLAG=""
54+
CMAKE_VERBOSE_OPTION=""
5555
BUILD_TYPE=Release
5656
INSTALL_TARGET=install
57-
BUILD_DISABLE_DEPRECATION_WARNING=ON
5857
BUILD_CPP_TESTS=ON
5958
BUILD_CPP_MG_TESTS=OFF
60-
BUILD_STATIC_FAISS=OFF
6159
BUILD_ALL_GPU_ARCH=0
6260

6361
# Set defaults for vars that may not have been defined externally
@@ -93,6 +91,7 @@ fi
9391
# Process flags
9492
if hasArg -v; then
9593
VERBOSE_FLAG="-v"
94+
CMAKE_VERBOSE_OPTION="--log-level=VERBOSE"
9695
fi
9796
if hasArg -g; then
9897
BUILD_TYPE=Debug
@@ -103,29 +102,24 @@ fi
103102
if hasArg --allgpuarch; then
104103
BUILD_ALL_GPU_ARCH=1
105104
fi
106-
if hasArg --buildfaiss; then
107-
BUILD_STATIC_FAISS=ON
108-
fi
109-
if hasArg --show_depr_warn; then
110-
BUILD_DISABLE_DEPRECATION_WARNING=OFF
111-
fi
112105
if hasArg --skip_cpp_tests; then
113106
BUILD_CPP_TESTS=OFF
114107
fi
115108
if hasArg cpp-mgtests; then
116109
BUILD_CPP_MG_TESTS=ON
117110
fi
118111

119-
# If clean or uninstall given, run them prior to any other steps
112+
# If clean or uninstall targets given, run them prior to any other steps
120113
if hasArg uninstall; then
121-
# uninstall libcugraph
122114
if [[ "$INSTALL_PREFIX" != "" ]]; then
123115
rm -rf ${INSTALL_PREFIX}/include/cugraph
124116
rm -f ${INSTALL_PREFIX}/lib/libcugraph.so
125117
rm -rf ${INSTALL_PREFIX}/include/cugraph_c
126118
rm -f ${INSTALL_PREFIX}/lib/libcugraph_c.so
127119
rm -rf ${INSTALL_PREFIX}/include/cugraph_etl
128120
rm -f ${INSTALL_PREFIX}/lib/libcugraph_etl.so
121+
rm -rf ${INSTALL_PREFIX}/lib/cmake/cugraph
122+
rm -rf ${INSTALL_PREFIX}/lib/cmake/cugraph_etl
129123
fi
130124
# This may be redundant given the above, but can also be used in case
131125
# there are other installed files outside of the locations above.
@@ -134,9 +128,25 @@ if hasArg uninstall; then
134128
fi
135129
# uninstall cugraph and pylibcugraph installed from a prior "setup.py
136130
# install"
131+
# FIXME: if multiple versions of these packages are installed, this only
132+
# removes the latest one and leaves the others installed. build.sh uninstall
133+
# can be run multiple times to remove all of them, but that is not obvious.
137134
pip uninstall -y cugraph pylibcugraph
138135
fi
139136

137+
if hasArg uninstall_cmake_deps; then
138+
if [[ "$INSTALL_PREFIX" != "" ]]; then
139+
rm -rf ${INSTALL_PREFIX}/include/raft
140+
rm -rf ${INSTALL_PREFIX}/lib/cmake/raft
141+
rm -rf ${INSTALL_PREFIX}/include/cub
142+
rm -rf ${INSTALL_PREFIX}/lib/cmake/cub
143+
rm -rf ${INSTALL_PREFIX}/include/cuco
144+
rm -rf ${INSTALL_PREFIX}/lib/cmake/cuco
145+
rm -rf ${INSTALL_PREFIX}/include/rmm
146+
rm -rf ${INSTALL_PREFIX}/lib/cmake/rmm
147+
fi
148+
fi
149+
140150
if hasArg clean; then
141151
# Ignore errors for clean since missing files, etc. are not failures
142152
set +e
@@ -151,6 +161,7 @@ if hasArg clean; then
151161
find . -name "__pycache__" -type d -exec rm -rf {} \; > /dev/null 2>&1
152162
find . -name "*.cpp" -type f -delete
153163
find . -name "*.cpython*.so" -type f -delete
164+
find . -type d -name _external_repositories -exec rm -rf {} \; > /dev/null 2>&1
154165
popd > /dev/null
155166
fi
156167

@@ -180,14 +191,13 @@ if buildAll || hasArg libcugraph; then
180191
fi
181192
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
182193
cd ${LIBCUGRAPH_BUILD_DIR}
183-
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
194+
cmake -B "${LIBCUGRAPH_BUILD_DIR}" -S "${REPODIR}/cpp" \
195+
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
184196
-DCMAKE_CUDA_ARCHITECTURES=${CUGRAPH_CMAKE_CUDA_ARCHITECTURES} \
185-
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
186197
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
187-
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS} \
188198
-DBUILD_TESTS=${BUILD_CPP_TESTS} \
189199
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
190-
${REPODIR}/cpp
200+
${CMAKE_VERBOSE_OPTION}
191201
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target ${INSTALL_TARGET} ${VERBOSE_FLAG}
192202
fi
193203

@@ -207,7 +217,8 @@ if buildAll || hasArg libcugraph_etl; then
207217
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
208218
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
209219
-DBUILD_TESTS=${BUILD_CPP_TESTS} \
210-
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} --log-level=VERBOSE \
220+
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
221+
${CMAKE_VERBOSE_OPTION} \
211222
${REPODIR}/cpp/libcugraph_etl
212223
cmake --build "${LIBCUGRAPH_ETL_BUILD_DIR}" -j${PARALLEL_LEVEL} --target ${INSTALL_TARGET} ${VERBOSE_FLAG}
213224
fi
@@ -242,10 +253,10 @@ if buildAll || hasArg docs; then
242253
if [ ! -d ${LIBCUGRAPH_BUILD_DIR} ]; then
243254
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
244255
cd ${LIBCUGRAPH_BUILD_DIR}
245-
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
246-
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
247-
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${REPODIR}/cpp \
248-
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS}
256+
cmake -B "${LIBCUGRAPH_BUILD_DIR}" -S "${REPODIR}/cpp" \
257+
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
258+
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
259+
${CMAKE_VERBOSE_OPTION}
249260
fi
250261
cd ${LIBCUGRAPH_BUILD_DIR}
251262
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target docs_cugraph ${VERBOSE_FLAG}

ci/cpu/build.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2018-2021, NVIDIA CORPORATION.
2+
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
33
#########################################
44
# cuGraph CPU conda build script for CI #
55
#########################################
@@ -84,9 +84,8 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then
8484
else
8585
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph
8686
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph_etl
87-
mkdir -p ${CONDA_BLD_DIR}/libcugraph/work
88-
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcugraph/work
89-
rm -rf ${CONDA_BLD_DIR}/work
87+
mkdir -p ${CONDA_BLD_DIR}/libcugraph
88+
mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work
9089
fi
9190
else
9291
gpuci_logger "SKIPPING build of conda package for libcugraph and libcugraph_etl"
@@ -100,9 +99,8 @@ if [ "$BUILD_CUGRAPH" == "1" ]; then
10099
else
101100
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/pylibcugraph -c $CONDA_BLD_DIR --dirty --no-remove-work-dir --python=$PYTHON
102101
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/cugraph -c $CONDA_BLD_DIR --dirty --no-remove-work-dir --python=$PYTHON
103-
mkdir -p ${CONDA_BLD_DIR}/cugraph/work
104-
cp -r ${CONDA_BLD_DIR}/work/ ${CONDA_BLD_DIR}/cugraph/work
105-
rm -rf ${CONDA_BLD_DIR}/work
102+
mkdir -p ${CONDA_BLD_DIR}/cugraph
103+
mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/cugraph/work
106104
fi
107105
else
108106
gpuci_logger "SKIPPING build of conda packages for pylibcugraph and cugraph"

ci/cpu/prebuild.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright (c) 2018-2021, NVIDIA CORPORATION.
2+
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at
@@ -18,7 +18,7 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
1818
export BUILD_LIBCUGRAPH=1
1919
fi
2020

21-
if [[ "$PYTHON" == "3.7" ]]; then
21+
if [[ "$PYTHON" == "3.8" ]]; then
2222
export UPLOAD_LIBCUGRAPH=1
2323
else
2424
export UPLOAD_LIBCUGRAPH=0

0 commit comments

Comments
 (0)