Skip to content

Commit ccf5b78

Browse files
committed
Merge branch 'branch-21.12' of github.com:rapidsai/cugraph into hits-prim-based
2 parents 1075226 + 61950dd commit ccf5b78

File tree

78 files changed

+2829
-1057
lines changed

Some content is hidden

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

78 files changed

+2829
-1057
lines changed

ci/docs/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ conda list --show-channel-urls
3939

4040
# Build Doxygen docs
4141
gpuci_logger "Build Doxygen docs"
42+
wget "https://raw.githubusercontent.com/rapidsai/docs/gh-pages/api/librmm/${BRANCH_VERSION}/rmm.tag" || echo "Failed to download rmm Doxygen tag"
4243
cd $PROJECT_WORKSPACE/cpp/build
4344
make docs_cugraph
4445

ci/gpu/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ else
103103
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
104104
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
105105
echo "Installing $CONDA_FILE"
106-
conda install -c ${CONDA_ARTIFACT_PATH} "$CONDA_FILE"
106+
gpuci_mamba_retry install -c ${CONDA_ARTIFACT_PATH} "$CONDA_FILE"
107107

108108
gpuci_logger "Install the master version of dask and distributed"
109109
pip install "git+https://github.com/dask/distributed.git" --upgrade --no-deps

ci/release/update-version.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ for FILE in conda/environments/*.yml; do
5353
sed_runner "s/dask-cudf=${CURRENT_SHORT_TAG}/dask-cudf=${NEXT_SHORT_TAG}/g" ${FILE};
5454
sed_runner "s/cuxfilter=${CURRENT_SHORT_TAG}/cuxfilter=${NEXT_SHORT_TAG}/g" ${FILE};
5555
done
56+
57+
# Doxyfile update
58+
sed_runner "s|\(TAGFILES.*librmm/\).*|\1${NEXT_SHORT_TAG}|" cpp/doxygen/Doxyfile
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: cugraph_dev
2+
channels:
3+
- rapidsai
4+
- nvidia
5+
- rapidsai-nightly
6+
- conda-forge
7+
dependencies:
8+
- cudatoolkit=11.5
9+
- cudf=21.12.*
10+
- libcudf=21.12.*
11+
- rmm=21.12.*
12+
- librmm=21.12.*
13+
- dask>=2021.09.1
14+
- distributed>=2021.09.1
15+
- dask-cuda=21.12.*
16+
- dask-cudf=21.12.*
17+
- nccl>=2.9.9
18+
- ucx-py=0.23.*
19+
- ucx-proc=*=gpu
20+
- scipy
21+
- networkx>=2.5.1
22+
- clang=11.0.0
23+
- clang-tools=11.0.0
24+
- cmake>=3.20.1
25+
- python>=3.6,<3.9
26+
- notebook>=0.5.0
27+
- boost
28+
- cython>=0.29,<0.30
29+
- pytest
30+
- libfaiss=1.7.0
31+
- faiss-proc=*=cuda
32+
- scikit-learn>=0.23.1
33+
- sphinx
34+
- pydata-sphinx-theme
35+
- sphinxcontrib-websupport
36+
- sphinx-markdown-tables
37+
- sphinx-copybutton
38+
- nbsphinx
39+
- numpydoc
40+
- ipython
41+
- recommonmark
42+
- pip
43+
- rapids-pytest-benchmark
44+
- doxygen
45+
- pytest-cov
46+
- gtest
47+
- gmock

cpp/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ endif()
4242
# Remove the following archs from CMAKE_CUDA_ARCHITECTURES that
4343
# cuhornet currently doesn't support
4444
#
45-
# >= 86
46-
set(supported_archs "60" "62" "70" "72" "75" "80")
45+
# >= 90
46+
set(supported_archs "60" "62" "70" "72" "75" "80" "86")
4747
foreach( arch IN LISTS CMAKE_CUDA_ARCHITECTURES)
4848
string(REPLACE "-real" "" arch ${arch})
4949
if( arch IN_LIST supported_archs )
@@ -147,8 +147,6 @@ include(cmake/thirdparty/get_raft.cmake)
147147
include(cmake/thirdparty/get_cuco.cmake)
148148
include(cmake/thirdparty/get_cuhornet.cmake)
149149

150-
include(cmake/thirdparty/get_gunrock.cmake)
151-
152150
if(BUILD_TESTS)
153151
include(cmake/thirdparty/get_gtest.cmake)
154152
endif()
@@ -294,7 +292,6 @@ target_link_libraries(cugraph
294292
CUDA::cusparse
295293
cugraph::cuHornet
296294
FAISS::FAISS
297-
gunrock
298295
NCCL::NCCL
299296
)
300297

@@ -354,6 +351,12 @@ endif()
354351

355352
add_library(cugraph_c SHARED
356353
src/c_api/cugraph_api.cpp
354+
src/c_api/array.cpp
355+
src/c_api/error.cpp
356+
src/c_api/graph_sg.cpp
357+
src/c_api/graph_mg.cpp
358+
src/c_api/pagerank.cpp
359+
src/c_api/bfs.cpp
357360
)
358361
add_library(cugraph::cugraph_c ALIAS cugraph_c)
359362

cpp/doxygen/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ SKIP_FUNCTION_MACROS = YES
20752075
# the path). If a tag file is not located in the directory in which doxygen is
20762076
# run, you must also specify the path to the tagfile here.
20772077

2078-
TAGFILES =
2078+
TAGFILES = rmm.tag=https://docs.rapids.ai/api/librmm/21.12
20792079

20802080
# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
20812081
# tag file that is based on the input files it reads. See section "Linking to

cpp/include/cugraph/api_helpers.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ enum class sampling_strategy_t : int { UNIFORM = 0, BIASED, NODE2VEC };
2828
struct sampling_params_t {
2929
sampling_params_t(void) {}
3030

31-
sampling_params_t(int sampling_type, double p = 1.0, double q = 1.0)
32-
: sampling_type_(static_cast<sampling_strategy_t>(sampling_type)), p_(p), q_(q)
31+
sampling_params_t(int sampling_type, double p = 1.0, double q = 1.0, bool use_alpha_cache = false)
32+
: sampling_type_(static_cast<sampling_strategy_t>(sampling_type)),
33+
p_(p),
34+
q_(q),
35+
use_alpha_cache_(use_alpha_cache)
3336
{
3437
}
3538

@@ -39,5 +42,6 @@ struct sampling_params_t {
3942
//
4043
double p_;
4144
double q_;
45+
bool use_alpha_cache_{false};
4246
};
4347
} // namespace cugraph

cpp/include/cugraph/graph_functions.hpp

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -59,27 +59,26 @@ struct renumber_meta_t<vertex_t, edge_t, multi_gpu, std::enable_if_t<!multi_gpu>
5959
* or multi-GPU (true).
6060
* @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
6161
* handles to various CUDA libraries) to run graph algorithms.
62-
* @param local_vertex_span If valid, part of the entire set of vertices in the graph to be
63-
* renumbered. The first tuple element is the pointer to the array and the second tuple element is
64-
* the size of the array. This parameter can be used to include isolated vertices. Applying the
62+
* @param local_vertices If valid, part of the entire set of vertices in the graph to be renumbered.
63+
* This parameter can be used to include isolated vertices. Applying the
6564
* compute_gpu_id_from_vertex_t to every vertex should return the local GPU ID for this function to
6665
* work (vertices should be pre-shuffled).
67-
* @param edgelist_major_vertices Pointers (one pointer per local graph adjacency matrix partition
68-
* assigned to this process) to edge source vertex IDs (if the graph adjacency matrix is stored as
69-
* is) or edge destination vertex IDs (if the transposed graph adjacency matrix is stored). Vertex
70-
* IDs are updated in-place ([INOUT] parameter). Edges should be pre-shuffled to their final target
71-
* process & matrix partition; i.e. applying the compute_gpu_id_from_edge_t functor to every (major,
72-
* minor) pair should return the GPU ID of this process and applying the
73-
* compute_partition_id_from_edge_t fuctor to every (major, minor) pair for a local matrix partition
74-
* should return the partition ID of the corresponding matrix partition.
75-
* @param edgelist_minor_vertices Pointers (one pointer per local graph adjacency matrix partition
76-
* assigned to this process) to edge destination vertex IDs (if the graph adjacency matrix is stored
77-
* as is) or edge source vertex IDs (if the transposed graph adjacency matrix is stored). Vertex IDs
78-
* are updated in-place ([INOUT] parameter). Edges should be pre-shuffled to their final target
79-
* process & matrix partition; i.e. applying the compute_gpu_id_from_edge_t functor to every (major,
80-
* minor) pair should return the GPU ID of this process and applying the
81-
* compute_partition_id_from_edge_t fuctor to every (major, minor) pair for a local matrix partition
82-
* should return the partition ID of the corresponding matrix partition.
66+
* @param edgelist_majors Pointers (one pointer per local graph adjacency matrix partition assigned
67+
* to this process) to edge source vertex IDs (if the graph adjacency matrix is stored as is) or
68+
* edge destination vertex IDs (if the transposed graph adjacency matrix is stored). Vertex IDs are
69+
* updated in-place ([INOUT] parameter). Edges should be pre-shuffled to their final target process
70+
* & matrix partition; i.e. applying the compute_gpu_id_from_edge_t functor to every (major, minor)
71+
* pair should return the GPU ID of this process and applying the compute_partition_id_from_edge_t
72+
* fuctor to every (major, minor) pair for a local matrix partition should return the partition ID
73+
* of the corresponding matrix partition.
74+
* @param edgelist_minors Pointers (one pointer per local graph adjacency matrix partition assigned
75+
* to this process) to edge destination vertex IDs (if the graph adjacency matrix is stored as is)
76+
* or edge source vertex IDs (if the transposed graph adjacency matrix is stored). Vertex IDs are
77+
* updated in-place ([INOUT] parameter). Edges should be pre-shuffled to their final target process
78+
* & matrix partition; i.e. applying the compute_gpu_id_from_edge_t functor to every (major, minor)
79+
* pair should return the GPU ID of this process and applying the compute_partition_id_from_edge_t
80+
* fuctor to every (major, minor) pair for a local matrix partition should return the partition ID
81+
* of the corresponding matrix partition.
8382
* @param edgelist_edge_counts Edge counts (one count per local graph adjacency matrix partition
8483
* assigned to this process).
8584
* @param edgelist_intra_partition_segment_offsets If valid, store segment offsets within a local
@@ -101,9 +100,9 @@ std::enable_if_t<
101100
std::tuple<rmm::device_uvector<vertex_t>, renumber_meta_t<vertex_t, edge_t, multi_gpu>>>
102101
renumber_edgelist(
103102
raft::handle_t const& handle,
104-
std::optional<std::tuple<vertex_t const*, vertex_t>> local_vertex_span,
105-
std::vector<vertex_t*> const& edgelist_major_vertices /* [INOUT] */,
106-
std::vector<vertex_t*> const& edgelist_minor_vertices /* [INOUT] */,
103+
std::optional<rmm::device_uvector<vertex_t>>&& local_vertices,
104+
std::vector<vertex_t*> const& edgelist_majors /* [INOUT] */,
105+
std::vector<vertex_t*> const& edgelist_minors /* [INOUT] */,
107106
std::vector<edge_t> const& edgelist_edge_counts,
108107
std::optional<std::vector<std::vector<edge_t>>> const& edgelist_intra_partition_segment_offsets,
109108
bool do_expensive_check = false);
@@ -117,17 +116,14 @@ renumber_edgelist(
117116
* or multi-GPU (true).
118117
* @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
119118
* handles to various CUDA libraries) to run graph algorithms.
120-
* @param vertex_span If valid, vertices in the graph to be renumbered. The first tuple element is
121-
* the pointer to the array and the second tuple element is the size of the array. This parameter
122-
* can be used to include isolated vertices.
123-
* @param vertices The entire set of vertices in the graph to be renumbered.
124-
* @param num_vertices Number of vertices.
125-
* @param edgelist_major_vertices Edge source vertex IDs (if the graph adjacency matrix is stored as
126-
* is) or edge destination vertex IDs (if the transposed graph adjacency matrix is stored). Vertex
127-
* IDs are updated in-place ([INOUT] parameter).
128-
* @param edgelist_minor_vertices Edge destination vertex IDs (if the graph adjacency matrix is
129-
* stored as is) or edge source vertex IDs (if the transposed graph adjacency matrix is stored).
130-
* Vertex IDs are updated in-place ([INOUT] parameter).
119+
* @param vertices If valid, vertices in the graph to be renumbered. This parameter can be used to
120+
* include isolated vertices.
121+
* @param edgelist_majors Edge source vertex IDs (if the graph adjacency matrix is stored as is) or
122+
* edge destination vertex IDs (if the transposed graph adjacency matrix is stored). Vertex IDs are
123+
* updated in-place ([INOUT] parameter).
124+
* @param edgelist_minors Edge destination vertex IDs (if the graph adjacency matrix is stored as
125+
* is) or edge source vertex IDs (if the transposed graph adjacency matrix is stored). Vertex IDs
126+
* are updated in-place ([INOUT] parameter).
131127
* @param num_edgelist_edges Number of edges in the edgelist.
132128
* @param do_expensive_check A flag to run expensive checks for input arguments (if set to `true`).
133129
* @return std::tuple<rmm::device_uvector<vertex_t>, renumber_meta_t<vertex_t, edge_t, multi_gpu>>
@@ -141,9 +137,9 @@ std::enable_if_t<
141137
!multi_gpu,
142138
std::tuple<rmm::device_uvector<vertex_t>, renumber_meta_t<vertex_t, edge_t, multi_gpu>>>
143139
renumber_edgelist(raft::handle_t const& handle,
144-
std::optional<std::tuple<vertex_t const*, vertex_t>> vertex_span,
145-
vertex_t* edgelist_major_vertices /* [INOUT] */,
146-
vertex_t* edgelist_minor_vertices /* [INOUT] */,
140+
std::optional<rmm::device_uvector<vertex_t>>&& vertices,
141+
vertex_t* edgelist_majors /* [INOUT] */,
142+
vertex_t* edgelist_minors /* [INOUT] */,
147143
edge_t num_edgelist_edges,
148144
bool do_expensive_check = false);
149145

@@ -462,7 +458,7 @@ extract_induced_subgraphs(
462458
* or multi-GPU (true).
463459
* @param handle RAFT handle object to encapsulate resources (e.g. CUDA stream, communicator, and
464460
* handles to various CUDA libraries) to run graph algorithms.
465-
* @param vertex_span If valid, part of the entire set of vertices in the graph to be renumbered.
461+
* @param vertices If valid, part of the entire set of vertices in the graph to be renumbered.
466462
* This parameter can be used to include isolated vertices. If multi-GPU, applying the
467463
* compute_gpu_id_from_vertex_t to every vertex should return the local GPU ID for this function to
468464
* work (vertices should be pre-shuffled).
@@ -487,7 +483,7 @@ template <typename vertex_t,
487483
std::tuple<cugraph::graph_t<vertex_t, edge_t, weight_t, store_transposed, multi_gpu>,
488484
std::optional<rmm::device_uvector<vertex_t>>>
489485
create_graph_from_edgelist(raft::handle_t const& handle,
490-
std::optional<rmm::device_uvector<vertex_t>>&& vertex_span,
486+
std::optional<rmm::device_uvector<vertex_t>>&& vertices,
491487
rmm::device_uvector<vertex_t>&& edgelist_rows,
492488
rmm::device_uvector<vertex_t>&& edgelist_cols,
493489
std::optional<rmm::device_uvector<weight_t>>&& edgelist_weights,

0 commit comments

Comments
 (0)