Skip to content

Commit

Permalink
Merge pull request #2040 from ajschmidt8/merge-22.02-into-22.04
Browse files Browse the repository at this point in the history
Fix Merge Conflicts for `2024`
  • Loading branch information
ajschmidt8 authored Jan 27, 2022
2 parents d338ef8 + 9557f03 commit aa0704c
Show file tree
Hide file tree
Showing 152 changed files with 8,807 additions and 1,672 deletions.
17 changes: 0 additions & 17 deletions Dockerfile

This file was deleted.

9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ _Italic_ algorithms are planned for future releases.
| Link Analysis| | | |
| | Pagerank | Multi-GPU | [C++ README](cpp/src/centrality/README.md#Pagerank) |
| | Personal Pagerank | Multi-GPU | [C++ README](cpp/src/centrality/README.md#Personalized-Pagerank) |
| | HITS | Single-GPU | leverages Gunrock |
| | HITS | Single-GPU | Multi-GPU C code is ready, Python wrapper in 22.04 |
| Link Prediction | | | |
| | Jaccard Similarity | Single-GPU | |
| | Weighted Jaccard Similarity | Single-GPU | |
Expand All @@ -88,7 +88,8 @@ _Italic_ algorithms are planned for future releases.
| | _Local Clustering Coefficient_ | --- | |
| Sampling | | | |
| | Random Walks (RW) | Single-GPU | Biased and Uniform |
| | _node2vec_ | --- | |
| | Egonet | Single-GPU | multi-seed |
| | _node2vec_ | --- | C code is ready, Python wrapper coming in 22.04 |
| Traversal | | | |
| | Breadth First Search (BFS) | Multi-GPU | with cutoff support <br/> [C++ README](cpp/src/traversal/README.md#BFS) |
| | Single Source Shortest Path (SSSP) | Multi-GPU | [C++ README](cpp/src/traversal/README.md#SSSP) |
Expand All @@ -98,6 +99,7 @@ _Italic_ algorithms are planned for future releases.
| Other | | | |
| | Renumbering | Multi-GPU | multiple columns, any data type |
| | Symmetrize | Multi-GPU | |
| | Path Extraction | | Extract paths from BFS/SSP results in parallel |
| Data Generator | | | |
| | RMAT | Multi-GPU | |
| | _Barabasi-Albert_ | --- | |
Expand Down Expand Up @@ -170,6 +172,9 @@ conda install -c nvidia -c rapidsai -c numba -c conda-forge cugraph cudatoolkit=

# CUDA 11.4
conda install -c nvidia -c rapidsai -c numba -c conda-forge cugraph cudatoolkit=11.4

# CUDA 11.5
conda install -c nvidia -c rapidsai -c numba -c conda-forge cugraph cudatoolkit=11.5
```

Note: This conda installation only applies to Linux and Python versions 3.7/3.8.
Expand Down
49 changes: 32 additions & 17 deletions SOURCEBUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,22 @@ There are several other options available on the build script for advanced users
```bash
build.sh [<target> ...] [<flag> ...]
where <target> is:
clean - remove all existing build artifacts and configuration (start over)
libcugraph - build the cugraph C++ code
cugraph - build the cugraph Python package
docs - build the docs
clean - remove all existing build artifacts and configuration (start over)
uninstall - uninstall libcugraph and cugraph from a prior build/install (see also -n)
libcugraph - build libcugraph.so and SG test binaries
libcugraph_etl - build libcugraph_etl.so and SG test binaries
cugraph - build the cugraph Python package
pylibcugraph - build the pylibcugraph Python package
cpp-mgtests - build libcugraph and libcugraph_etl MG tests. Builds MPI communicator, adding MPI as a dependency.
docs - build the docs
and <flag> is:
-v - verbose build mode
-g - build for debug
-n - no install step
-n - do not install after a successful build
--allgpuarch - build for all supported GPU architectures
--buildfaiss - build faiss statically into cugraph
--show_depr_warn - show cmake deprecation warnings
--skip_cpp_tests - do not build the SG test binaries as part of the libcugraph and libcugraph_etl targets
-h - print this text

default action (no args) is to build and install 'libcugraph' then 'cugraph' then 'docs' targets
Expand Down Expand Up @@ -141,24 +147,43 @@ The default installation locations are `$CMAKE_INSTALL_PREFIX/lib` and `$CMAKE_I
### Building and installing the Python package
2) Install the Python package to your Python path:
2) Install the Python packages to your Python path:
```bash
cd $CUGRAPH_HOME
cd python
cd pylibcugraph
python setup.py build_ext --inplace
python setup.py install # install pylibcugraph
cd ../cugraph
python setup.py build_ext --inplace
python setup.py install # install cugraph python bindings

```
## Run tests
If you already have the datasets:
```bash
export RAPIDS_DATASET_ROOT_DIR=<path_to_ccp_test_and_reference_data>
```
If you do not have the datasets:
```bash
cd $CUGRAPH_HOME/datasets
source get_test_data.sh #This takes about 10 minutes and downloads 1GB data (>5 GB uncompressed)
```
Run either the C++ or the Python tests with datasets
- **Python tests with datasets**
```bash
pip install python-louvain #some tests require this package to run
cd $CUGRAPH_HOME
cd python
pytest
Expand All @@ -175,17 +200,7 @@ Run either the C++ or the Python tests with datasets
```
- **C++ tests with larger datasets**
If you already have the datasets:
```bash
export RAPIDS_DATASET_ROOT_DIR=<path_to_ccp_test_and_reference_data>
```
If you do not have the datasets:
```bash
cd $CUGRAPH_HOME/datasets
source get_test_data.sh #This takes about 10 minutes and downloads 1GB data (>5 GB uncompressed)
```
Run the C++ tests on large input:
Expand Down
85 changes: 48 additions & 37 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

# cugraph build script

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

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

# Set defaults for vars modified by flags to this script
VERBOSE_FLAG=""
CMAKE_VERBOSE_OPTION=""
BUILD_TYPE=Release
INSTALL_TARGET=install
BUILD_DISABLE_DEPRECATION_WARNING=ON
BUILD_CPP_TESTS=ON
BUILD_CPP_MG_TESTS=OFF
BUILD_STATIC_FAISS=OFF
BUILD_ALL_GPU_ARCH=0

# Set defaults for vars that may not have been defined externally
Expand Down Expand Up @@ -93,6 +91,7 @@ fi
# Process flags
if hasArg -v; then
VERBOSE_FLAG="-v"
CMAKE_VERBOSE_OPTION="--log-level=VERBOSE"
fi
if hasArg -g; then
BUILD_TYPE=Debug
Expand All @@ -103,29 +102,24 @@ fi
if hasArg --allgpuarch; then
BUILD_ALL_GPU_ARCH=1
fi
if hasArg --buildfaiss; then
BUILD_STATIC_FAISS=ON
fi
if hasArg --show_depr_warn; then
BUILD_DISABLE_DEPRECATION_WARNING=OFF
fi
if hasArg --skip_cpp_tests; then
BUILD_CPP_TESTS=OFF
fi
if hasArg cpp-mgtests; then
BUILD_CPP_MG_TESTS=ON
fi

# If clean or uninstall given, run them prior to any other steps
# If clean or uninstall targets given, run them prior to any other steps
if hasArg uninstall; then
# uninstall libcugraph
if [[ "$INSTALL_PREFIX" != "" ]]; then
rm -rf ${INSTALL_PREFIX}/include/cugraph
rm -f ${INSTALL_PREFIX}/lib/libcugraph.so
rm -rf ${INSTALL_PREFIX}/include/cugraph_c
rm -f ${INSTALL_PREFIX}/lib/libcugraph_c.so
rm -rf ${INSTALL_PREFIX}/include/cugraph_etl
rm -f ${INSTALL_PREFIX}/lib/libcugraph_etl.so
rm -rf ${INSTALL_PREFIX}/lib/cmake/cugraph
rm -rf ${INSTALL_PREFIX}/lib/cmake/cugraph_etl
fi
# This may be redundant given the above, but can also be used in case
# there are other installed files outside of the locations above.
Expand All @@ -134,9 +128,25 @@ if hasArg uninstall; then
fi
# uninstall cugraph and pylibcugraph installed from a prior "setup.py
# install"
# FIXME: if multiple versions of these packages are installed, this only
# removes the latest one and leaves the others installed. build.sh uninstall
# can be run multiple times to remove all of them, but that is not obvious.
pip uninstall -y cugraph pylibcugraph
fi

if hasArg uninstall_cmake_deps; then
if [[ "$INSTALL_PREFIX" != "" ]]; then
rm -rf ${INSTALL_PREFIX}/include/raft
rm -rf ${INSTALL_PREFIX}/lib/cmake/raft
rm -rf ${INSTALL_PREFIX}/include/cub
rm -rf ${INSTALL_PREFIX}/lib/cmake/cub
rm -rf ${INSTALL_PREFIX}/include/cuco
rm -rf ${INSTALL_PREFIX}/lib/cmake/cuco
rm -rf ${INSTALL_PREFIX}/include/rmm
rm -rf ${INSTALL_PREFIX}/lib/cmake/rmm
fi
fi

if hasArg clean; then
# Ignore errors for clean since missing files, etc. are not failures
set +e
Expand All @@ -151,6 +161,7 @@ if hasArg clean; then
find . -name "__pycache__" -type d -exec rm -rf {} \; > /dev/null 2>&1
find . -name "*.cpp" -type f -delete
find . -name "*.cpython*.so" -type f -delete
find . -type d -name _external_repositories -exec rm -rf {} \; > /dev/null 2>&1
popd > /dev/null
fi

Expand Down Expand Up @@ -180,14 +191,13 @@ if buildAll || hasArg libcugraph; then
fi
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
cd ${LIBCUGRAPH_BUILD_DIR}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
cmake -B "${LIBCUGRAPH_BUILD_DIR}" -S "${REPODIR}/cpp" \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_CUDA_ARCHITECTURES=${CUGRAPH_CMAKE_CUDA_ARCHITECTURES} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS} \
-DBUILD_TESTS=${BUILD_CPP_TESTS} \
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
${REPODIR}/cpp
${CMAKE_VERBOSE_OPTION}
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target ${INSTALL_TARGET} ${VERBOSE_FLAG}
fi

Expand All @@ -207,7 +217,8 @@ if buildAll || hasArg libcugraph_etl; then
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DBUILD_TESTS=${BUILD_CPP_TESTS} \
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} --log-level=VERBOSE \
-DBUILD_CUGRAPH_MG_TESTS=${BUILD_CPP_MG_TESTS} \
${CMAKE_VERBOSE_OPTION} \
${REPODIR}/cpp/libcugraph_etl
cmake --build "${LIBCUGRAPH_ETL_BUILD_DIR}" -j${PARALLEL_LEVEL} --target ${INSTALL_TARGET} ${VERBOSE_FLAG}
fi
Expand Down Expand Up @@ -242,10 +253,10 @@ if buildAll || hasArg docs; then
if [ ! -d ${LIBCUGRAPH_BUILD_DIR} ]; then
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
cd ${LIBCUGRAPH_BUILD_DIR}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${REPODIR}/cpp \
-DBUILD_STATIC_FAISS=${BUILD_STATIC_FAISS}
cmake -B "${LIBCUGRAPH_BUILD_DIR}" -S "${REPODIR}/cpp" \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
${CMAKE_VERBOSE_OPTION}
fi
cd ${LIBCUGRAPH_BUILD_DIR}
cmake --build "${LIBCUGRAPH_BUILD_DIR}" -j${PARALLEL_LEVEL} --target docs_cugraph ${VERBOSE_FLAG}
Expand Down
12 changes: 5 additions & 7 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright (c) 2018-2021, NVIDIA CORPORATION.
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
#########################################
# cuGraph CPU conda build script for CI #
#########################################
Expand Down Expand Up @@ -84,9 +84,8 @@ if [ "$BUILD_LIBCUGRAPH" == '1' ]; then
else
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/libcugraph_etl
mkdir -p ${CONDA_BLD_DIR}/libcugraph/work
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcugraph/work
rm -rf ${CONDA_BLD_DIR}/work
mkdir -p ${CONDA_BLD_DIR}/libcugraph
mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/libcugraph/work
fi
else
gpuci_logger "SKIPPING build of conda package for libcugraph and libcugraph_etl"
Expand All @@ -100,9 +99,8 @@ if [ "$BUILD_CUGRAPH" == "1" ]; then
else
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
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
mkdir -p ${CONDA_BLD_DIR}/cugraph/work
cp -r ${CONDA_BLD_DIR}/work/ ${CONDA_BLD_DIR}/cugraph/work
rm -rf ${CONDA_BLD_DIR}/work
mkdir -p ${CONDA_BLD_DIR}/cugraph
mv ${CONDA_BLD_DIR}/work ${CONDA_BLD_DIR}/cugraph/work
fi
else
gpuci_logger "SKIPPING build of conda packages for pylibcugraph and cugraph"
Expand Down
4 changes: 2 additions & 2 deletions ci/cpu/prebuild.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2018-2021, NVIDIA CORPORATION.
# Copyright (c) 2018-2022, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand All @@ -18,7 +18,7 @@ if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
export BUILD_LIBCUGRAPH=1
fi

if [[ "$PYTHON" == "3.7" ]]; then
if [[ "$PYTHON" == "3.8" ]]; then
export UPLOAD_LIBCUGRAPH=1
else
export UPLOAD_LIBCUGRAPH=0
Expand Down
Loading

0 comments on commit aa0704c

Please sign in to comment.