Skip to content

Commit

Permalink
Merge pull request #43 from rapidsai/branch-0.19
Browse files Browse the repository at this point in the history
Merge from release branch-0.19
  • Loading branch information
aschaffer authored Mar 20, 2021
2 parents 22b32d8 + ab4b77b commit e5042fc
Show file tree
Hide file tree
Showing 130 changed files with 6,158 additions and 2,091 deletions.
6 changes: 1 addition & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# cuGraph 0.19.0 (Date TBD)

## New Features

## Improvements

## Bug Fixes
Please see https://github.com/rapidsai/cugraph/releases/tag/v0.19.0a for the latest changes to this development branch.

# cuGraph 0.18.0 (24 Feb 2021)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ As of Release 0.18 - including 0.18 nightly
| | Renumbering | Single-GPU | multiple columns, any data type |
| | Symmetrize | Multi-GPU | |
| Other | | | |
| | Hungarian Algorithm | Single-GPU | |
| | Minimum Spanning Tree | Single-GPU | |
| | Maximum Spanning Tree | Single-GPU | |
| | |
Expand Down
21 changes: 19 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,25 @@ conda list --show-channel-urls
################################################################################

if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_logger "Build from source"
$WORKSPACE/build.sh -v clean libcugraph cugraph
gpuci_logger "Build from source"
$WORKSPACE/build.sh -v clean libcugraph cugraph
else
export LIBCUGRAPH_BUILD_DIR="$WORKSPACE/ci/artifacts/cugraph/cpu/conda_work/cpp/build"

# Faiss patch
echo "Update libcugraph.so"
cd $LIBCUGRAPH_BUILD_DIR
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=`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"

echo "Build cugraph..."
$WORKSPACE/build.sh cugraph
fi

################################################################################
Expand Down
4 changes: 3 additions & 1 deletion ci/gpu/notebook_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
pascal = False

device = cuda.get_current_device()
cc = getattr(device, 'COMPUTE_CAPABILITY')
# 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

Expand Down
24 changes: 0 additions & 24 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,30 +61,6 @@ else
cd $WORKSPACE/ci/artifacts/cugraph/cpu/conda_work/cpp/build
fi

# FIXME: if possible, any install and build steps should be moved outside this
# script since a failing install/build step is treated as a failing test command
# and will not stop the script. This script is also only expected to run tests
# in a preconfigured environment, and install/build steps are unexpected side
# effects.
if [[ "$PROJECT_FLASH" == "1" ]]; then
export LIBCUGRAPH_BUILD_DIR="$WORKSPACE/ci/artifacts/cugraph/cpu/conda_work/cpp/build"

# Faiss patch
echo "Update libcugraph.so"
cd $LIBCUGRAPH_BUILD_DIR
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=`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"

echo "Build cugraph..."
$WORKSPACE/build.sh cugraph
fi

# Do not abort the script on error from this point on. This allows all tests to
# run regardless of pass/fail, but relies on the ERR trap above to manage the
# EXITCODE for the script.
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/cugraph_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- distributed>=2.12.0
- dask-cuda=0.19*
- dask-cudf=0.19*
- nccl>=2.7
- nccl>=2.8.4
- ucx-py=0.19*
- ucx-proc=*=gpu
- scipy
Expand All @@ -29,7 +29,7 @@ dependencies:
- boost
- cython>=0.29,<0.30
- pytest
- libfaiss=1.6.3
- libfaiss=1.7.0
- faiss-proc=*=cuda
- scikit-learn>=0.23.1
- colorcet
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/cugraph_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- distributed>=2.12.0
- dask-cuda=0.19*
- dask-cudf=0.19*
- nccl>=2.7
- nccl>=2.8.4
- ucx-py=0.19*
- ucx-proc=*=gpu
- scipy
Expand All @@ -29,7 +29,7 @@ dependencies:
- boost
- cython>=0.29,<0.30
- pytest
- libfaiss=1.6.3
- libfaiss=1.7.0
- faiss-proc=*=cuda
- scikit-learn>=0.23.1
- colorcet
Expand Down
4 changes: 2 additions & 2 deletions conda/environments/cugraph_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- distributed>=2.12.0
- dask-cuda=0.19*
- dask-cudf=0.19*
- nccl>=2.7
- nccl>=2.8.4
- ucx-py=0.19*
- ucx-proc=*=gpu
- scipy
Expand All @@ -29,7 +29,7 @@ dependencies:
- boost
- cython>=0.29,<0.30
- pytest
- libfaiss=1.6.3
- libfaiss=1.7.0
- faiss-proc=*=cuda
- scikit-learn>=0.23.1
- colorcet
Expand Down
4 changes: 2 additions & 2 deletions conda/recipes/cugraph/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018, NVIDIA CORPORATION.
# Copyright (c) 2018-2021, NVIDIA CORPORATION.

# Usage:
# conda build -c nvidia -c rapidsai -c conda-forge -c defaults .
Expand Down Expand Up @@ -37,7 +37,7 @@ requirements:
- dask-cuda {{ minor_version }}
- dask>=2.12.0
- distributed>=2.12.0
- nccl>=2.7
- nccl>=2.8.4
- ucx-py {{ minor_version }}
- ucx-proc=*=gpu

Expand Down
21 changes: 6 additions & 15 deletions conda/recipes/libcugraph/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,21 @@ build:
requirements:
build:
- cmake>=3.12.4
- libcudf={{ minor_version }}
- cudatoolkit {{ cuda_version }}.*
- librmm {{ minor_version }}.*
- boost-cpp>=1.66
- libcypher-parser
- nccl>=2.7
- ucx-py {{ minor_version }}
- nccl>=2.8.4
- ucx-proc=*=gpu
- gtest
- faiss-proc=*=cuda
- libfaiss=1.6.3
- gmock
- faiss-proc=*=cuda
- conda-forge::libfaiss=1.7.0
run:
- libcudf={{ minor_version }}
- {{ pin_compatible('cudatoolkit', max_pin='x.x') }}
- nccl>=2.7
- ucx-py {{ minor_version }}
- nccl>=2.8.4
- ucx-proc=*=gpu
- faiss-proc=*=cuda
- libfaiss=1.6.3

#test:
# commands:
# - test -f $PREFIX/include/cugraph.h

- conda-forge::libfaiss=1.7.0

about:
home: http://rapids.ai/
Expand Down
46 changes: 26 additions & 20 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-extended-lambda --expt-relaxed-
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")


# Option to enable line info in CUDA device compilation to allow introspection when profiling /
# memchecking
option(CMAKE_CUDA_LINEINFO "Enable the -lineinfo option for nvcc (useful for cuda-memcheck / profiler" OFF)
Expand Down Expand Up @@ -298,7 +297,8 @@ else(DEFINED ENV{RAFT_PATH})
FetchContent_Declare(
raft
GIT_REPOSITORY https://github.com/rapidsai/raft.git
GIT_TAG a3461b201ea1c9f61571f1927274f739e775d2d2
GIT_TAG 6455e05b3889db2b495cf3189b33c2b07bfbebf2

SOURCE_SUBDIR raft
)

Expand All @@ -317,9 +317,9 @@ endif(DEFINED ENV{RAFT_PATH})

# https://cmake.org/cmake/help/v3.0/module/ExternalProject.html

# FIXME: gunrock is the only external package still using ExternalProject
# instead of FetchContent. Consider migrating to FetchContent soon (this may
# require updates to the gunrock cmake files to support this).
# FIXME: gunrock is still using ExternalProject instead of
# FetchContent. Consider migrating to FetchContent soon (this may require
# updates to the gunrock cmake files to support this).

include(ExternalProject)

Expand Down Expand Up @@ -360,31 +360,32 @@ if(BUILD_STATIC_FAISS)
"Path to FAISS source directory")
ExternalProject_Add(faiss
GIT_REPOSITORY https://github.com/facebookresearch/faiss.git
GIT_TAG a5b850dec6f1cd6c88ab467bfd5e87b0cac2e41d
GIT_TAG 7c2d2388a492d65fdda934c7e74ae87acaeed066
CONFIGURE_COMMAND LIBS=-pthread
CPPFLAGS=-w
LDFLAGS=-L${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_CURRENT_BINARY_DIR}/faiss/src/faiss/configure
--prefix=${CMAKE_CURRENT_BINARY_DIR}/faiss
--with-blas=${BLAS_LIBRARIES}
--with-cuda=${CUDA_TOOLKIT_ROOT_DIR}
--with-cuda-arch=${FAISS_GPU_ARCHS}
-v
cmake -B build .
-DCMAKE_BUILD_TYPE=Release
-DBUILD_TESTING=OFF
-DFAISS_ENABLE_PYTHON=OFF
-DBUILD_SHARED_LIBS=OFF
-DFAISS_ENABLE_GPU=ON
-DCUDAToolkit_ROOT=${CUDA_TOOLKIT_ROOT_DIR}
-DCUDA_ARCHITECTURES=${FAISS_GPU_ARCHS}
-DBLAS_LIBRARIES=${BLAS_LIBRARIES}
PREFIX ${FAISS_DIR}
BUILD_COMMAND make -j${PARALLEL_LEVEL} VERBOSE=1
BUILD_BYPRODUCTS ${FAISS_DIR}/lib/libfaiss.a
BUILD_COMMAND make -C build -j${PARALLEL_LEVEL} VERBOSE=1
BUILD_BYPRODUCTS ${FAISS_DIR}/src/faiss/build/faiss/libfaiss.a
BUILD_ALWAYS 1
INSTALL_COMMAND make -s install > /dev/null
INSTALL_COMMAND ""
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
PATCH_COMMAND patch -p1 -N < ${CMAKE_CURRENT_SOURCE_DIR}/cmake/faiss_cuda11.patch || true)
BUILD_IN_SOURCE 1)

ExternalProject_Get_Property(faiss install_dir)
add_library(FAISS::FAISS STATIC IMPORTED)
add_dependencies(FAISS::FAISS faiss)
set_property(TARGET FAISS::FAISS PROPERTY
IMPORTED_LOCATION ${FAISS_DIR}/lib/libfaiss.a)
set(FAISS_INCLUDE_DIRS "${FAISS_DIR}/src")
IMPORTED_LOCATION ${FAISS_DIR}/src/faiss/build/faiss/libfaiss.a)
set(FAISS_INCLUDE_DIRS "${FAISS_DIR}/src/faiss")
else()
set(FAISS_INSTALL_DIR ENV{FAISS_ROOT})
find_package(FAISS REQUIRED)
Expand Down Expand Up @@ -420,6 +421,7 @@ add_library(cugraph SHARED
src/components/connectivity.cu
src/centrality/katz_centrality.cu
src/centrality/betweenness_centrality.cu
src/experimental/generate_rmat_edgelist.cu
src/experimental/graph.cu
src/experimental/graph_view.cu
src/experimental/coarsen_graph.cu
Expand All @@ -445,6 +447,10 @@ target_link_directories(cugraph
#
add_dependencies(cugraph gunrock_ext)

# Per-thread default stream option see https://docs.nvidia.com/cuda/cuda-runtime-api/stream-sync-behavior.html
# The per-thread default stream does not synchronize with other streams
target_compile_definitions(cugraph PUBLIC CUDA_API_PER_THREAD_DEFAULT_STREAM)

###################################################################################################
# - include paths ---------------------------------------------------------------------------------
target_include_directories(cugraph
Expand Down
Loading

0 comments on commit e5042fc

Please sign in to comment.