Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge latest rapidsai:branch-0.19 into aschaffer:branch-0.19 #44

Merged
merged 21 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
254a999
Added cmake function and .hpp template for generating version_config.…
rlratzel Mar 22, 2021
7256f32
Fix for bug in SCC on self-loops (#1475)
aschaffer Mar 23, 2021
76fad0e
ENH Change conda build directories to work with ccache (#1452)
dillon-cullinan Mar 26, 2021
b85bd47
TSP solver bug fix (#1480)
hlinsen Mar 26, 2021
1f0f14e
MS BFS python APIs + EgoNet updates (#1469)
afender Mar 26, 2021
ce80798
ENH Update conda recipes pinning of repo dependencies (#1485)
mike-wendt Mar 29, 2021
e60d9f7
Update Louvain to use new graph primitives and pattern accelerators (…
ChuckHastings Mar 30, 2021
22e9e2b
Add indirection and replace algorithms with new renumbering (#1484)
Iroy30 Mar 30, 2021
f2e5a87
Implement C/CUDA RandomWalks functionality (#1439)
aschaffer Mar 30, 2021
7a2b02b
Multiple graph generator with power law distribution on sizes (#1483)
afender Mar 31, 2021
daa9622
Create C++ documentation (#1489)
ChuckHastings Mar 31, 2021
59f6df6
Revert "Update conda recipes pinning of repo dependencies" (#1493)
raydouglass Mar 31, 2021
a7b6342
Fix MNMG test failures and skip tests that are not supported on Pasca…
jnke2016 Apr 2, 2021
d1ec7ac
Clean up nullptr cuda_stream_view arguments (#1504)
hlinsen Apr 2, 2021
8222f31
pascal renumbering fix (#1505)
Iroy30 Apr 2, 2021
48bf058
Reduce the size of the cugraph libraries (#1503)
robertmaynard Apr 2, 2021
a6edf62
Updating RAFT tag (#1509)
afender Apr 5, 2021
9a1ab09
Update graph partitioning scheme (#1443)
seunghwak Apr 6, 2021
b442f3b
Updated NetworkX version to 2.5.1 (#1510)
rlratzel Apr 6, 2021
1b34e26
Improve graph primitives performance on graphs with widely varying ve…
seunghwak Apr 7, 2021
79c3ba0
Add utility function for computing a secondary cost for BFS and SSSP …
hlinsen Apr 7, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ As of Release 0.18 - including 0.18 nightly
| Community | | | |
| | EgoNet | Single-GPU | |
| | Leiden | Single-GPU | |
| | Louvain | Multi-GPU | |
| | Louvain | Multi-GPU | [C++ README](cpp/src/community/README.md#Louvain) |
| | Ensemble Clustering for Graphs | Single-GPU | |
| | Spectral-Clustering - Balanced Cut | Single-GPU | |
| | Spectral-Clustering - Modularity | Single-GPU | |
Expand All @@ -71,16 +71,16 @@ As of Release 0.18 - including 0.18 nightly
| Linear Assignment| | | |
| | Hungarian | Single-GPU | [README](cpp/src/linear_assignment/README-hungarian.md) |
| Link Analysis| | | |
| | Pagerank | Multi-GPU | |
| | Personal Pagerank | Multi-GPU | |
| | 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 |
| Link Prediction | | | |
| | Jaccard Similarity | Single-GPU | |
| | Weighted Jaccard Similarity | Single-GPU | |
| | Overlap Similarity | Single-GPU | |
| Traversal | | | |
| | Breadth First Search (BFS) | Multi-GPU | with cutoff support |
| | Single Source Shortest Path (SSSP) | Multi-GPU | |
| | 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) |
| | Traveling Salesperson Problem (TSP) | Single-GPU | |
| Structure | | | |
| | Renumbering | Single-GPU | multiple columns, any data type |
Expand Down
11 changes: 7 additions & 4 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export GPUCI_CONDA_RETRY_SLEEP=30

# Use Ninja to build
export CMAKE_GENERATOR="Ninja"
export CONDA_BLD_DIR="${WORKSPACE}/.conda-bld"

################################################################################
# SETUP - Check environment
Expand Down Expand Up @@ -58,18 +59,20 @@ conda config --set ssl_verify False
gpuci_logger "Build conda pkg for libcugraph"
if [ "$BUILD_LIBCUGRAPH" == '1' ]; then
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
conda build conda/recipes/libcugraph
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcugraph
else
conda build --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
mkdir -p ${CONDA_BLD_DIR}/libcugraph/work
cp -r ${CONDA_BLD_DIR}/work/* ${CONDA_BLD_DIR}/libcugraph/work
fi
fi

gpuci_logger "Build conda pkg for cugraph"
if [ "$BUILD_CUGRAPH" == "1" ]; then
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
conda build conda/recipes/cugraph --python=$PYTHON
gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON
else
conda build conda/recipes/cugraph -c ci/artifacts/cugraph/cpu/conda-bld/ --dirty --no-remove-work-dir --python=$PYTHON
gpuci_conda_retry build --croot ${CONDA_BLD_DIR} conda/recipes/cugraph -c ci/artifacts/cugraph/cpu/.conda-bld/ --dirty --no-remove-work-dir --python=$PYTHON
fi
fi

Expand Down
5 changes: 3 additions & 2 deletions ci/cpu/upload.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
# Copyright (c) 2018-2021, NVIDIA CORPORATION.
#
# Adopted from https://github.com/tmcdonell/travis-scripts/blob/dfaac280ac2082cd6bcaba3217428347899f2975/update-accelerate-buildbot.sh

Expand Down Expand Up @@ -29,8 +30,8 @@ fi

gpuci_logger "Get conda file output locations"

export LIBCUGRAPH_FILE=`conda build conda/recipes/libcugraph --output`
export CUGRAPH_FILE=`conda build conda/recipes/cugraph --python=$PYTHON --output`
export LIBCUGRAPH_FILE=`conda build --no-build-id --croot ${CONDA_BLD_DIR} conda/recipes/libcugraph --output`
export CUGRAPH_FILE=`conda build --croot ${CONDA_BLD_DIR} conda/recipes/cugraph --python=$PYTHON --output`

################################################################################
# UPLOAD - Conda packages
Expand Down
5 changes: 3 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ function hasArg {
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CUDA_REL=${CUDA_VERSION%.*}
export CONDA_ARTIFACT_PATH=${WORKSPACE}/ci/artifacts/cugraph/cpu/.conda-bld/

function cleanup {
gpuci_logger "Removing datasets and temp files"
Expand Down Expand Up @@ -101,11 +102,11 @@ else
chrpath -d libcugraph.so
patchelf --replace-needed `patchelf --print-needed libcugraph.so | grep faiss` libfaiss.so libcugraph.so

CONDA_FILE=`find $WORKSPACE/ci/artifacts/cugraph/cpu/conda-bld/ -name "libcugraph*.tar.bz2"`
CONDA_FILE=`find ${CONDA_ARTIFACT_PATH} -name "libcugraph*.tar.bz2"`
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
echo "Installing $CONDA_FILE"
conda install -c $WORKSPACE/ci/artifacts/cugraph/cpu/conda-bld/ "$CONDA_FILE"
conda install -c ${CONDA_ARTIFACT_PATH} "$CONDA_FILE"

echo "Build cugraph..."
$WORKSPACE/build.sh cugraph
Expand Down
18 changes: 11 additions & 7 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,17 @@ fi
# EXITCODE for the script.
set +e

echo "C++ gtests for cuGraph..."
for gt in tests/*_TEST; do
test_name=$(basename $gt)
echo "Running gtest $test_name"
${gt} ${GTEST_FILTER} ${GTEST_ARGS}
echo "Ran gtest $test_name : return code was: $?, test script exit code is now: $EXITCODE"
done
if (python ${CUGRAPH_ROOT}/ci/utils/is_pascal.py); then
echo "WARNING: skipping C++ tests on Pascal GPU arch."
else
echo "C++ gtests for cuGraph..."
for gt in tests/*_TEST; do
test_name=$(basename $gt)
echo "Running gtest $test_name"
${gt} ${GTEST_FILTER} ${GTEST_ARGS}
echo "Ran gtest $test_name : return code was: $?, test script exit code is now: $EXITCODE"
done
fi

echo "Python pytest for cuGraph..."
cd ${CUGRAPH_ROOT}/python
Expand Down
39 changes: 39 additions & 0 deletions ci/utils/is_pascal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright (c) 2021, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import re
import sys
import glob

from numba import cuda

# FIXME: consolidate this code with ci/gpu/notebook_list.py

#
# Not strictly true... however what we mean is
# Pascal or earlier
#
pascal = False

device = cuda.get_current_device()
# check for the attribute using both pre and post numba 0.53 names
cc = getattr(device, 'COMPUTE_CAPABILITY', None) or \
getattr(device, 'compute_capability')
if (cc[0] < 7):
pascal = True

# Return zero (success) if pascal is True
if pascal:
sys.exit(0)
else:
sys.exit(1)
2 changes: 1 addition & 1 deletion conda/environments/cugraph_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- ucx-py=0.19*
- ucx-proc=*=gpu
- scipy
- networkx
- networkx>=2.5.1
- python-louvain
- cudatoolkit=10.1
- clang=8.0.1
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cugraph_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- ucx-py=0.19*
- ucx-proc=*=gpu
- scipy
- networkx
- networkx>=2.5.1
- python-louvain
- cudatoolkit=10.2
- clang=8.0.1
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/cugraph_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- ucx-py=0.19*
- ucx-proc=*=gpu
- scipy
- networkx
- networkx>=2.5.1
- python-louvain
- cudatoolkit=11.0
- clang=8.0.1
Expand Down
2 changes: 1 addition & 1 deletion conda/recipes/cugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ package:
version: {{ version }}

source:
path: ../../..
git_url: ../../..

build:
number: {{ GIT_DESCRIBE_NUMBER }}
Expand Down
15 changes: 13 additions & 2 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ cmake_minimum_required(VERSION 3.18...3.18 FATAL_ERROR)

project(CUGRAPH VERSION 0.19.0 LANGUAGES C CXX CUDA)

# Write the version header
include(cmake/Modules/Version.cmake)
write_version()

###################################################################################################
# - build type ------------------------------------------------------------------------------------

Expand Down Expand Up @@ -112,6 +116,7 @@ set(FAISS_GPU_ARCHS "${FAISS_GPU_ARCHS} -gencode arch=compute_${ptx},code=comput
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-extended-lambda --expt-relaxed-constexpr")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Werror=cross-execution-space-call -Wno-deprecated-declarations -Xptxas --disable-warnings")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler -Wall,-Wno-error=sign-compare,-Wno-error=unused-but-set-variable")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xfatbin=-compress-all")

# Option to enable line info in CUDA device compilation to allow introspection when profiling /
# memchecking
Expand Down Expand Up @@ -271,7 +276,7 @@ message("set LIBCUDACXX_INCLUDE_DIR to: ${LIBCUDACXX_INCLUDE_DIR}")
FetchContent_Declare(
cuhornet
GIT_REPOSITORY https://github.com/rapidsai/cuhornet.git
GIT_TAG 9cb8e8803852bd895a9c95c0fe778ad6eeefa7ad
GIT_TAG e58d0ecdbc270fc28867d66c965787a62a7a882c
GIT_SHALLOW true
SOURCE_SUBDIR hornet
)
Expand All @@ -297,7 +302,7 @@ else(DEFINED ENV{RAFT_PATH})
FetchContent_Declare(
raft
GIT_REPOSITORY https://github.com/rapidsai/raft.git
GIT_TAG 6455e05b3889db2b495cf3189b33c2b07bfbebf2
GIT_TAG f0cd81fb49638eaddc9bf18998cc894f292bc293

SOURCE_SUBDIR raft
)
Expand Down Expand Up @@ -397,6 +402,7 @@ endif(BUILD_STATIC_FAISS)
add_library(cugraph SHARED
src/utilities/spmv_1D.cu
src/utilities/cython.cu
src/utilities/path_retrieval.cu
src/structure/graph.cu
src/linear_assignment/hungarian.cu
src/link_analysis/gunrock_hits.cpp
Expand All @@ -416,6 +422,7 @@ add_library(cugraph SHARED
src/community/triangles_counting.cu
src/community/extract_subgraph_by_vertex.cu
src/community/egonet.cu
src/sampling/random_walks.cu
src/cores/core_number.cu
src/traversal/two_hop_neighbors.cu
src/components/connectivity.cu
Expand All @@ -426,6 +433,7 @@ add_library(cugraph SHARED
src/experimental/graph_view.cu
src/experimental/coarsen_graph.cu
src/experimental/renumber_edgelist.cu
src/experimental/renumber_utils.cu
src/experimental/relabel.cu
src/experimental/induced_subgraph.cu
src/experimental/bfs.cu
Expand Down Expand Up @@ -560,6 +568,9 @@ install(TARGETS cugraph LIBRARY
install(DIRECTORY include/
DESTINATION include/cugraph)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/cugraph/version_config.hpp
DESTINATION include/cugraph)

install(DIRECTORY ${RAFT_DIR}/cpp/include/raft/
DESTINATION include/cugraph/raft)
###################################################################################################
Expand Down
18 changes: 18 additions & 0 deletions cpp/cmake/Modules/Version.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2021, 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.

# Generate version_config.hpp from the version found in CMakeLists.txt
function(write_version)
message(STATUS "CUGRAPH VERSION: ${CUGRAPH_VERSION}")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version_config.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/include/cugraph/version_config.hpp @ONLY)
endfunction(write_version)
20 changes: 20 additions & 0 deletions cpp/cmake/version_config.hpp.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2021, 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once

#define CUGRAPH_VERSION_MAJOR @CUGRAPH_VERSION_MAJOR@
#define CUGRAPH_VERSION_MINOR @CUGRAPH_VERSION_MINOR@
#define CUGRAPH_VERSION_PATCH @CUGRAPH_VERSION_PATCH@
Loading