Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
01e352d
initial implementation of new graph class
seunghwak Aug 18, 2020
7ef65eb
Merge branch 'branch-0.15' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Aug 18, 2020
d33328e
fix compile errors
seunghwak Aug 19, 2020
83bf444
update CMakeLists.txt
seunghwak Aug 19, 2020
b24a6c7
Merge branch 'branch-0.15' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Aug 19, 2020
c5a1fe5
move graph.hpp to the experimental directory
seunghwak Aug 19, 2020
6d23d28
Merge branch 'branch-0.16' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Aug 19, 2020
19bdb94
refactor graph classes (create graph_base_t common for both SG and MG)
seunghwak Aug 19, 2020
2fc6583
Merge branch 'branch-0.16' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Aug 20, 2020
12cf609
add graph_view.hpp & graph_utils.cuh
seunghwak Aug 21, 2020
8d784e4
add graph test
seunghwak Aug 21, 2020
e25b79d
rename compute_row_degree to compute_major_degree to avoid confusion
seunghwak Aug 21, 2020
47ce146
add a FIXME comment
seunghwak Aug 21, 2020
7a2d2cf
Merge branch 'branch-0.15' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Aug 24, 2020
a077827
bug fixes
seunghwak Aug 24, 2020
24633cc
expand experimental graph explicit template instantiation
seunghwak Aug 24, 2020
b59cc2e
Merge remote-tracking branch 'upstream/branch-0.16' into fea_2d_graph
seunghwak Aug 25, 2020
905eddf
thrust patch
kkraus14 Aug 27, 2020
2f36196
Merge pull request #1125 from kkraus14/thrust_patch
raydouglass Aug 27, 2020
c5b903d
Merge pull request #1127 from rapidsai/branch-0.15
GPUtester Aug 27, 2020
2107d53
update compute_major_degree to work with both a vector of rmm::device…
seunghwak Aug 27, 2020
7d3e609
Centralizing test data to a few common sets
BradReesWork Aug 28, 2020
386acad
reference doc
BradReesWork Aug 28, 2020
4900b49
update
BradReesWork Aug 28, 2020
e62978e
add graph_view.cu for error checks using thrust
seunghwak Aug 28, 2020
e081580
docs
BradReesWork Aug 28, 2020
8a554c5
changed formating
BradReesWork Aug 28, 2020
8b846bf
better formating
BradReesWork Aug 28, 2020
ed00428
formating
BradReesWork Aug 28, 2020
352d56b
pr 1129 changelog
BradReesWork Aug 28, 2020
bbb70ab
type
BradReesWork Aug 28, 2020
4a1f52b
more ref
BradReesWork Aug 28, 2020
6ab0a0e
re-add edge_t number_of_edges to graph_t constructor, sum edgelists[i…
seunghwak Aug 28, 2020
72e1654
add error checks to graph_t
seunghwak Aug 28, 2020
22879f4
Merge branch 'branch-0.16' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Aug 28, 2020
8f59a9e
add error checkes/comments for graph_t & graph_view_t
seunghwak Aug 31, 2020
e6d339b
update change log
seunghwak Aug 31, 2020
8cfdd3b
clang-format
seunghwak Aug 31, 2020
0cc71a2
updates
BradReesWork Aug 31, 2020
19cc333
change log
BradReesWork Aug 31, 2020
124c074
fixed
BradReesWork Aug 31, 2020
a0d5156
dropped changelog entry
BradReesWork Aug 31, 2020
4aab511
updated changelog for pr 1129
BradReesWork Aug 31, 2020
9834def
change dataset type to speed to tests
BradReesWork Aug 31, 2020
a118ab1
fixed typos
BradReesWork Aug 31, 2020
e4291ce
reset
BradReesWork Aug 31, 2020
ba2e929
one more try
BradReesWork Aug 31, 2020
3b648c1
addressing code review
BradReesWork Aug 31, 2020
9628a1b
Update CHANGELOG.md
BradReesWork Aug 31, 2020
b72837c
Update CHANGELOG.md
BradReesWork Aug 31, 2020
dbff65a
Update CHANGELOG.md
BradReesWork Aug 31, 2020
7ba1572
Merge branch 'branch-0.16' into 0.16-disjoint
ajschmidt8 Sep 1, 2020
b852bb8
flake8 errors
BradReesWork Sep 1, 2020
88b9896
FIX set +e on style check script
raydouglass Sep 1, 2020
86edcae
DOC Update changelog
raydouglass Sep 1, 2020
4a684b3
DOC Document why set +x is needed
raydouglass Sep 1, 2020
dcd1044
minor fixes
seunghwak Sep 1, 2020
778dc44
address reviewer comments
seunghwak Sep 1, 2020
9fca70e
update comments on currently public (but will become private in the f…
seunghwak Sep 1, 2020
474941f
fix spelling errors
seunghwak Sep 1, 2020
99f91c3
clang-format
seunghwak Sep 1, 2020
1a1d434
Merge pull request #1131 from raydouglass/fix-style
BradReesWork Sep 1, 2020
c52257d
struct_t partition_t to class_t partition_t
seunghwak Sep 2, 2020
4f6e5c3
replace for loop with std::any_of
seunghwak Sep 2, 2020
5ea86a5
misc updates
seunghwak Sep 2, 2020
322fcb2
factor out matrix market garph file read
seunghwak Sep 2, 2020
50b2909
Merge branch 'branch-0.16' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Sep 2, 2020
41b8e9d
Added HITS and sorted algorithms alphabetically
BradReesWork Sep 2, 2020
9e4d81c
fix doc issues and added additional docs
BradReesWork Sep 2, 2020
03d7982
dropped regular karate to reduce number of tests. Now only the douib…
BradReesWork Sep 2, 2020
6975d8d
removed Renumbering since it is now in Graph. Drop RMAT since it is n…
BradReesWork Sep 2, 2020
0bd7fa8
fix docstring errors
BradReesWork Sep 2, 2020
93e768f
Merge branch '0.16-disjoint' of https://github.com/BradReesWork/cugra…
BradReesWork Sep 2, 2020
9274bfe
flake8 issues
BradReesWork Sep 2, 2020
fe2883f
add necessary stream syncs
seunghwak Sep 2, 2020
488f1ce
fix compile error
seunghwak Sep 2, 2020
1318518
fixed test issues
BradReesWork Sep 2, 2020
be2d449
addressing dask issues
BradReesWork Sep 3, 2020
20be166
flake8 unused fixes
BradReesWork Sep 3, 2020
9048133
added missing copyright
BradReesWork Sep 3, 2020
8f59b53
added a version of Karate that contains a second disjoint version
BradReesWork Sep 3, 2020
fc2ed41
added additional blogs
BradReesWork Sep 3, 2020
c2817f7
looking at comms time-out issues
BradReesWork Sep 3, 2020
56619b5
addeed a call to gc.coolect()
BradReesWork Sep 3, 2020
53c54b2
flake8 issue
BradReesWork Sep 3, 2020
9f645f4
updated dataset list again
BradReesWork Sep 3, 2020
e46d1be
Merge pull request #1129 from BradReesWork/0.16-disjoint
BradReesWork Sep 3, 2020
fda347d
Merge branch 'branch-0.16' of github.com:rapidsai/cugraph into fea_2d…
seunghwak Sep 4, 2020
a91c773
remove NCC_TEST
seunghwak Sep 4, 2020
3637aa1
update graph_t & graph_view_t to take properties_t object
seunghwak Sep 4, 2020
f4ac4f1
uint32_t & uint64_t to int32_t & int64_t in expliciit template instan…
seunghwak Sep 4, 2020
bc01ce3
clang-format
seunghwak Sep 4, 2020
bf6c27d
Merge pull request #1098 from seunghwak/fea_2d_graph
BradReesWork Sep 8, 2020
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ datasets/*
!datasets/cyber.csv
!datasets/karate-data.csv
!datasets/karate_undirected.csv
!datasets/karate-disjoint.csv
!datasets/netscience.csv


Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# cuGraph 0.16.0 (Date TBD)

## New Features
- PR 1098 Add new graph classes to support 2D partitioning

## Improvements
- PR 1081 MNMG Renumbering - sort partitions by degree
- PR 1115 Replace deprecated rmm::mr::get_default_resource with rmm::mr::get_current_device_resource
- PR #1129 Refactored test to use common dataset and added additional doc pages

## Bug Fixes
- PR #1131 Show style checker errors with set +e

# cuGraph 0.15.0 (26 Aug 2020)

Expand Down Expand Up @@ -100,6 +103,8 @@
- PR #1087 Updated benchmarks README to better describe how to get plugin, added rapids-pytest-benchmark plugin to conda dev environments
- PR #1101 Removed unnecessary device-to-host copy which caused a performance regression
- PR #1106 Added new release.ipynb to notebook test skip list
- PR #1125 Patch Thrust to workaround `CUDA_CUB_RET_IF_FAIL` macro clearing CUDA errors


# cuGraph 0.14.0 (03 Jun 2020)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The [RAPIDS](https://rapids.ai) cuGraph library is a collection of GPU accelerat

For more project details, see [rapids.ai](https://rapids.ai/).

**NOTE:** For the latest stable [README.md](https://github.com/rapidsai/cudf/blob/main/README.md) ensure you are on the latest branch.
**NOTE:** For the latest stable [README.md](https://github.com/rapidsai/cugraph/blob/main/README.md) ensure you are on the latest branch.



Expand Down
3 changes: 3 additions & 0 deletions ci/checks/style.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
# captured for returning a final status code. This allows all style check to
# take place to provide a more comprehensive list of style violations.
set -o pipefail
# CI does `set -e` then sources this file, so we override that so we can output
# the results from the various style checkers
set +e
ERRORCODE=0
PATH=/conda/bin:$PATH

Expand Down
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ FetchContent_Declare(
GIT_REPOSITORY https://github.com/thrust/thrust.git
GIT_TAG 1.9.10
GIT_SHALLOW true
PATCH_COMMAND COMMAND patch -p1 < "${CMAKE_CURRENT_SOURCE_DIR}/cmake/thrust-ret-if-fail.patch"
)

FetchContent_GetProperties(thrust)
Expand Down Expand Up @@ -356,6 +357,8 @@ add_library(cugraph SHARED
src/components/connectivity.cu
src/centrality/katz_centrality.cu
src/centrality/betweenness_centrality.cu
src/experimental/graph.cu
src/experimental/graph_view.cu
)

#
Expand Down
16 changes: 16 additions & 0 deletions cpp/cmake/thrust-ret-if-fail.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/thrust/system/cuda/detail/core/util.h b/thrust/system/cuda/detail/core/util.h
index a2c87772..ea4ed640 100644
--- a/thrust/system/cuda/detail/core/util.h
+++ b/thrust/system/cuda/detail/core/util.h
@@ -652,7 +652,10 @@ namespace core {
}

#define CUDA_CUB_RET_IF_FAIL(e) \
- if (cub::Debug((e), __FILE__, __LINE__)) return e;
+ { \
+ auto const error = (e); \
+ if (cub::Debug(error, __FILE__, __LINE__)) return error; \
+ }

// uninitialized
// -------
129 changes: 129 additions & 0 deletions cpp/include/experimental/detail/graph_utils.cuh
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/*
* Copyright (c) 2020, 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

#include <experimental/graph_view.hpp>

#include <rmm/thrust_rmm_allocator.h>
#include <raft/handle.hpp>
#include <rmm/device_uvector.hpp>

#include <thrust/sort.h>
#include <thrust/transform.h>

#include <algorithm>
#include <vector>

namespace cugraph {
namespace experimental {
namespace detail {

// compute the numbers of nonzeros in rows (of the graph adjacency matrix, if store_transposed =
// false) or columns (of the graph adjacency matrix, if store_transposed = true)
template <typename vertex_t, typename edge_t>
rmm::device_uvector<edge_t> compute_major_degree(
raft::handle_t const &handle,
std::vector<edge_t const *> const &adj_matrix_partition_offsets,
partition_t<vertex_t> const &partition)
{
auto &comm_p_row = handle.get_subcomm(comm_p_row_key);
auto const comm_p_row_rank = comm_p_row.get_rank();
auto const comm_p_row_size = comm_p_row.get_size();
auto &comm_p_col = handle.get_subcomm(comm_p_col_key);
auto const comm_p_col_rank = comm_p_col.get_rank();
auto const comm_p_col_size = comm_p_col.get_size();

rmm::device_uvector<edge_t> local_degrees(0, handle.get_stream());
rmm::device_uvector<edge_t> degrees(0, handle.get_stream());

vertex_t max_num_local_degrees{0};
for (int i = 0; i < comm_p_col_size; ++i) {
auto vertex_partition_idx =
partition.is_hypergraph_partitioned()
? static_cast<size_t>(comm_p_row_size) * static_cast<size_t>(i) +
static_cast<size_t>(comm_p_row_rank)
: static_cast<size_t>(comm_p_col_size) * static_cast<size_t>(comm_p_row_rank) +
static_cast<size_t>(i);
vertex_t major_first{};
vertex_t major_last{};
std::tie(major_first, major_last) = partition.get_vertex_partition_range(vertex_partition_idx);
max_num_local_degrees = std::max(max_num_local_degrees, major_last - major_first);
if (i == comm_p_col_rank) { degrees.resize(major_last - major_first, handle.get_stream()); }
}
local_degrees.resize(max_num_local_degrees, handle.get_stream());
for (int i = 0; i < comm_p_col_size; ++i) {
auto vertex_partition_idx =
partition.is_hypergraph_partitioned()
? static_cast<size_t>(comm_p_row_size) * static_cast<size_t>(i) +
static_cast<size_t>(comm_p_row_rank)
: static_cast<size_t>(comm_p_col_size) * static_cast<size_t>(comm_p_row_rank) +
static_cast<size_t>(i);
vertex_t major_first{};
vertex_t major_last{};
std::tie(major_first, major_last) = partition.get_vertex_partition_range(vertex_partition_idx);
auto p_offsets = partition.is_hypergraph_partitioned()
? adj_matrix_partition_offsets[i]
: adj_matrix_partition_offsets[0] +
(major_first - partition.get_vertex_partition_range_first(
comm_p_col_size * comm_p_row_rank));
thrust::transform(rmm::exec_policy(handle.get_stream())->on(handle.get_stream()),
thrust::make_counting_iterator(vertex_t{0}),
thrust::make_counting_iterator(major_last - major_first),
local_degrees.data(),
[p_offsets] __device__(auto i) { return p_offsets[i + 1] - p_offsets[i]; });
comm_p_row.reduce(local_degrees.data(),
i == comm_p_col_rank ? degrees.data() : static_cast<edge_t *>(nullptr),
degrees.size(),
raft::comms::op_t::SUM,
comm_p_col_rank,
handle.get_stream());
}

auto status = handle.get_comms().sync_stream(
handle.get_stream()); // this is neessary as local_degrees will become out-of-scope once this
// function returns.
CUGRAPH_EXPECTS(status == raft::comms::status_t::SUCCESS, "sync_stream() failure.");

return degrees;
}

// compute the numbers of nonzeros in rows (of the graph adjacency matrix, if store_transposed =
// false) or columns (of the graph adjacency matrix, if store_transposed = true)
template <typename vertex_t, typename edge_t>
rmm::device_uvector<edge_t> compute_major_degree(
raft::handle_t const &handle,
std::vector<rmm::device_uvector<edge_t>> const &adj_matrix_partition_offsets,
partition_t<vertex_t> const &partition)
{
// we can avoid creating this temporary with "if constexpr" supported from C++17
std::vector<edge_t const *> tmp_offsets(adj_matrix_partition_offsets.size(), nullptr);
std::transform(adj_matrix_partition_offsets.begin(),
adj_matrix_partition_offsets.end(),
tmp_offsets.begin(),
[](auto const &offsets) { return offsets.data(); });
return compute_major_degree(handle, tmp_offsets, partition);
}

template <typename vertex_t, typename edge_t>
struct degree_from_offsets_t {
edge_t const *offsets{nullptr};

__device__ edge_t operator()(vertex_t v) { return offsets[v + 1] - offsets[v]; }
};

} // namespace detail
} // namespace experimental
} // namespace cugraph
Loading