Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
additional_dependencies:
- flake8==7.1.1
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
rev: v20.1.4
hooks:
- id: clang-format
types_or: [c, c++, cuda]
Expand Down
4 changes: 2 additions & 2 deletions cpp/include/cugraph/graph.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
* Copyright (c) 2020-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -291,7 +291,7 @@ class graph_t<vertex_t, edge_t, store_transposed, multi_gpu, std::enable_if_t<!m
graph_t(raft::handle_t const& handle)
: detail::graph_base_t<vertex_t, edge_t>(),
offsets_(0, handle.get_stream()),
indices_(0, handle.get_stream()){};
indices_(0, handle.get_stream()) {};

graph_t(raft::handle_t const& handle,
rmm::device_uvector<edge_t>&& offsets,
Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/graph_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class graph_base_t {
graph_base_t(vertex_t number_of_vertices, edge_t number_of_edges, graph_properties_t properties)
: number_of_vertices_(number_of_vertices),
number_of_edges_(number_of_edges),
properties_(properties){};
properties_(properties) {};

vertex_t number_of_vertices() const { return number_of_vertices_; }

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/cugraph/utilities/shuffle_comm.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ ValueIterator mem_frugal_partition(
value_first,
value_last,
value_group_id_less_t<typename thrust::iterator_traits<ValueIterator>::value_type,
ValueToGroupIdOp>{value_to_group_id_op, pivot}));
ValueToGroupIdOp>{value_to_group_id_op, pivot}));
auto second_size = num_elements - first_size;

auto tmp_buffer =
Expand Down
4 changes: 2 additions & 2 deletions cpp/libcugraph_etl/src/renumbering.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
* Copyright (c) 2022-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -44,7 +44,7 @@ using accum_type = uint32_t;
constexpr uint32_t hash_inc_constant = 9999;

typedef struct str_hash_value {
__host__ __device__ str_hash_value(){};
__host__ __device__ str_hash_value() {};

__host__ __device__ str_hash_value(size_type row, accum_type count, int32_t col)
{
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/c_api/graph_generators.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -328,7 +328,7 @@ extern "C" cugraph_error_code_t cugraph_generate_edge_weights(
std::make_unique<cugraph::c_api::cugraph_type_erased_device_array_t>(tmp, dtype);
break;
}
otherwise : {
otherwise: {
*error = reinterpret_cast<::cugraph_error_t*>(new cugraph::c_api::cugraph_error_t(
"Only FLOAT and DOUBLE supported as generated edge weights"));
return CUGRAPH_INVALID_INPUT;
Expand Down
45 changes: 22 additions & 23 deletions cpp/src/lookup/lookup_src_dst_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -408,26 +408,25 @@ EdgeTypeAndIdToSrcDstLookupContainerType build_edge_id_and_type_to_src_dst_looku
auto& minor_comm = handle.get_subcomm(cugraph::partition_manager::minor_comm_name());
auto const minor_comm_size = minor_comm.get_size();

auto [gpu_ids, edge_types] =
cugraph::extract_transform_e(
handle,
graph_view,
cugraph::edge_src_dummy_property_t{}.view(),
cugraph::edge_dst_dummy_property_t{}.view(),
view_concat(edge_id_view, edge_type_view),
cuda::proclaim_return_type<thrust::tuple<int, edge_type_t>>(
[key_func =
cugraph::detail::compute_gpu_id_from_ext_edge_id_t<edge_t>{
comm_size,
major_comm_size,
minor_comm_size}] __device__(auto,
auto,
cuda::std::nullopt_t,
cuda::std::nullopt_t,
thrust::tuple<edge_t, edge_type_t> id_and_type) {
return thrust::make_tuple(key_func(thrust::get<0>(id_and_type)),
thrust::get<1>(id_and_type));
}));
auto [gpu_ids, edge_types] = cugraph::extract_transform_e(
handle,
graph_view,
cugraph::edge_src_dummy_property_t{}.view(),
cugraph::edge_dst_dummy_property_t{}.view(),
view_concat(edge_id_view, edge_type_view),
cuda::proclaim_return_type<thrust::tuple<int, edge_type_t>>(
[key_func =
cugraph::detail::compute_gpu_id_from_ext_edge_id_t<edge_t>{
comm_size,
major_comm_size,
minor_comm_size}] __device__(auto,
auto,
cuda::std::nullopt_t,
cuda::std::nullopt_t,
thrust::tuple<edge_t, edge_type_t> id_and_type) {
return thrust::make_tuple(key_func(thrust::get<0>(id_and_type)),
thrust::get<1>(id_and_type));
}));

auto type_and_gpu_id_pair_begin =
thrust::make_zip_iterator(thrust::make_tuple(edge_types.begin(), gpu_ids.begin()));
Expand Down Expand Up @@ -656,9 +655,9 @@ EdgeTypeAndIdToSrcDstLookupContainerType build_edge_id_and_type_to_src_dst_looku
edgelist_types.end())),
[key_func =
cugraph::detail::compute_gpu_id_from_ext_edge_id_t<edge_t>{
comm_size,
major_comm_size,
minor_comm_size}] __device__(auto val) { return key_func(thrust::get<2>(val)); },
comm_size, major_comm_size, minor_comm_size}] __device__(auto val) {
return key_func(thrust::get<2>(val));
},
handle.get_stream());
}

Expand Down
30 changes: 15 additions & 15 deletions cpp/src/prims/detail/extract_transform_if_v_frontier_e.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ __global__ static void extract_transform_if_v_frontier_e_hypersparse_or_low_degr
edge_partition_e_value_input,
pred_op};
auto call_e_op = call_e_op_with_key_t<GraphViewType,
key_t,
EdgePartitionSrcValueInputWrapper,
EdgePartitionDstValueInputWrapper,
EdgePartitionEdgeValueInputWrapper,
EdgeOp>{edge_partition,
key_t,
EdgePartitionSrcValueInputWrapper,
EdgePartitionDstValueInputWrapper,
EdgePartitionEdgeValueInputWrapper,
EdgeOp>{edge_partition,
edge_partition_src_value_input,
edge_partition_dst_value_input,
edge_partition_e_value_input,
Expand Down Expand Up @@ -376,11 +376,11 @@ __global__ static void extract_transform_if_v_frontier_e_mid_degree(
indices,
local_edge_offset};
auto call_e_op = call_e_op_t<GraphViewType,
key_t,
EdgePartitionSrcValueInputWrapper,
EdgePartitionDstValueInputWrapper,
EdgePartitionEdgeValueInputWrapper,
EdgeOp>{edge_partition,
key_t,
EdgePartitionSrcValueInputWrapper,
EdgePartitionDstValueInputWrapper,
EdgePartitionEdgeValueInputWrapper,
EdgeOp>{edge_partition,
edge_partition_src_value_input,
edge_partition_dst_value_input,
edge_partition_e_value_input,
Expand Down Expand Up @@ -496,11 +496,11 @@ __global__ static void extract_transform_if_v_frontier_e_high_degree(
indices,
local_edge_offset};
auto call_e_op = call_e_op_t<GraphViewType,
key_t,
EdgePartitionSrcValueInputWrapper,
EdgePartitionDstValueInputWrapper,
EdgePartitionEdgeValueInputWrapper,
EdgeOp>{edge_partition,
key_t,
EdgePartitionSrcValueInputWrapper,
EdgePartitionDstValueInputWrapper,
EdgePartitionEdgeValueInputWrapper,
EdgeOp>{edge_partition,
edge_partition_src_value_input,
edge_partition_dst_value_input,
edge_partition_e_value_input,
Expand Down
6 changes: 2 additions & 4 deletions cpp/src/prims/detail/nbr_intersection.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -1148,13 +1148,11 @@ nbr_intersection(raft::handle_t const& handle,
[[maybe_unused]] std::conditional_t<
!std::is_same_v<edge_property_value_t, cuda::std::nullopt_t>,
std::vector<rmm::device_uvector<edge_property_value_t>>,
std::byte /* dummy */>
edge_partition_nbr_intersection_e_property_values0{};
std::byte /* dummy */> edge_partition_nbr_intersection_e_property_values0{};
[[maybe_unused]] std::conditional_t<
!std::is_same_v<edge_property_value_t, cuda::std::nullopt_t>,
std::vector<rmm::device_uvector<edge_property_value_t>>,
std::byte /* dummy */>
edge_partition_nbr_intersection_e_property_values1{};
std::byte /* dummy */> edge_partition_nbr_intersection_e_property_values1{};

if constexpr (!std::is_same_v<edge_property_value_t, cuda::std::nullopt_t>) {
edge_partition_nbr_intersection_e_property_values0.reserve(
Expand Down
12 changes: 4 additions & 8 deletions cpp/src/prims/detail/per_v_transform_reduce_e.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,7 @@ __global__ static void per_v_transform_reduce_e_mid_degree(
reduced_e_op_result{};
[[maybe_unused]] std::conditional_t<update_major && std::is_same_v<ReduceOp, reduce_op::any<T>>,
int32_t,
std::byte /* dummy */>
first_valid_lane_id{};
std::byte /* dummy */> first_valid_lane_id{};
if constexpr (update_major) {
reduced_e_op_result =
(lane_id == 0) ? init : identity_element; // init == identity_element for reduce_op::any<T>
Expand Down Expand Up @@ -735,8 +734,7 @@ __global__ static void per_v_transform_reduce_e_high_degree(
[[maybe_unused]] __shared__
std::conditional_t<update_major && std::is_same_v<ReduceOp, reduce_op::any<T>>,
int32_t,
std::byte /* dummy */>
output_thread_id;
std::byte /* dummy */> output_thread_id;

while (idx < static_cast<size_t>(cuda::std::distance(key_first, key_last))) {
auto key = *(key_first + idx);
Expand Down Expand Up @@ -777,8 +775,7 @@ __global__ static void per_v_transform_reduce_e_high_degree(
reduced_e_op_result{};
[[maybe_unused]] std::conditional_t<update_major && std::is_same_v<ReduceOp, reduce_op::any<T>>,
int32_t,
std::byte /* dummy */>
first_valid_thread_id{};
std::byte /* dummy */> first_valid_thread_id{};
if constexpr (update_major) {
reduced_e_op_result = threadIdx.x == 0
? init
Expand Down Expand Up @@ -1634,8 +1631,7 @@ void per_v_transform_reduce_e(raft::handle_t const& handle,
[[maybe_unused]] std::conditional_t<GraphViewType::is_multi_gpu && update_major &&
std::is_same_v<ReduceOp, reduce_op::any<T>>,
int,
std::byte /* dummy */>
subgroup_size{};
std::byte /* dummy */> subgroup_size{};
if constexpr (GraphViewType::is_multi_gpu && update_major &&
std::is_same_v<ReduceOp, reduce_op::any<T>>) {
auto& comm = handle.get_comms();
Expand Down
30 changes: 15 additions & 15 deletions cpp/src/prims/detail/sample_and_compute_local_nbr_indices.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -2667,11 +2667,11 @@ compute_aggregate_local_frontier_bias_type_pairs(
using edge_value_t = typename EdgeValueInputWrapper::value_type;
using edge_type_t = typename EdgeTypeInputWrapper::value_type;
using bias_t = typename edge_op_result_type<key_t,
vertex_t,
typename EdgeSrcValueInputWrapper::value_type,
typename EdgeDstValueInputWrapper::value_type,
typename EdgeValueInputWrapper::value_type,
BiasEdgeOp>::type;
vertex_t,
typename EdgeSrcValueInputWrapper::value_type,
typename EdgeDstValueInputWrapper::value_type,
typename EdgeValueInputWrapper::value_type,
BiasEdgeOp>::type;
static_assert(std::is_arithmetic_v<bias_t>);
static_assert(std::is_integral_v<edge_type_t>);

Expand Down Expand Up @@ -5536,11 +5536,11 @@ homogeneous_biased_sample_and_compute_local_nbr_indices(
using key_t = typename thrust::iterator_traits<KeyIterator>::value_type;

using bias_t = typename edge_op_result_type<key_t,
vertex_t,
typename EdgeSrcValueInputWrapper::value_type,
typename EdgeDstValueInputWrapper::value_type,
typename EdgeValueInputWrapper::value_type,
BiasEdgeOp>::type;
vertex_t,
typename EdgeSrcValueInputWrapper::value_type,
typename EdgeDstValueInputWrapper::value_type,
typename EdgeValueInputWrapper::value_type,
BiasEdgeOp>::type;
using edge_type_t = int32_t; // dummy

int minor_comm_rank{0};
Expand Down Expand Up @@ -5727,11 +5727,11 @@ heterogeneous_biased_sample_and_compute_local_nbr_indices(
using key_t = typename thrust::iterator_traits<KeyIterator>::value_type;

using bias_t = typename edge_op_result_type<key_t,
vertex_t,
typename EdgeSrcValueInputWrapper::value_type,
typename EdgeDstValueInputWrapper::value_type,
typename EdgeValueInputWrapper::value_type,
BiasEdgeOp>::type;
vertex_t,
typename EdgeSrcValueInputWrapper::value_type,
typename EdgeDstValueInputWrapper::value_type,
typename EdgeValueInputWrapper::value_type,
BiasEdgeOp>::type;
using edge_type_t = typename EdgeTypeInputWrapper::value_type;

int minor_comm_rank{0};
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/prims/per_v_pair_transform_dst_nbr_intersection.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ void per_v_pair_transform_dst_nbr_intersection(
rmm::device_uvector<size_t> intersection_offsets(size_t{0}, handle.get_stream());
rmm::device_uvector<vertex_t> intersection_indices(size_t{0}, handle.get_stream());
[[maybe_unused]] rmm::device_uvector<edge_property_value_t>
r_nbr_intersection_property_values0(size_t{0}, handle.get_stream());
r_nbr_intersection_property_values0(size_t{0}, handle.get_stream());
[[maybe_unused]] rmm::device_uvector<edge_property_value_t>
r_nbr_intersection_property_values1(size_t{0}, handle.get_stream());
r_nbr_intersection_property_values1(size_t{0}, handle.get_stream());

if constexpr (!std::is_same_v<edge_property_value_t, cuda::std::nullopt_t>) {
std::tie(intersection_offsets,
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/generators/generate_bipartite_rmat_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -223,7 +223,7 @@ struct GenerateBipartiteRmat_Usecase {
src_edge_factor(src_edge_factor),
a(a),
b(b),
c(c){};
c(c) {};
};

class Tests_GenerateBipartiteRmat : public ::testing::TestWithParam<GenerateBipartiteRmat_Usecase> {
Expand Down
6 changes: 3 additions & 3 deletions cpp/tests/generators/generate_rmat_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2024, NVIDIA CORPORATION.
* Copyright (c) 2020-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -160,7 +160,7 @@ struct GenerateRmat_Usecase {

GenerateRmat_Usecase(
size_t scale, size_t edge_factor, double a, double b, double c, bool clip_and_flip)
: scale(scale), edge_factor(edge_factor), a(a), b(b), c(c), clip_and_flip(clip_and_flip){};
: scale(scale), edge_factor(edge_factor), a(a), b(b), c(c), clip_and_flip(clip_and_flip) {};
};

class Tests_GenerateRmat : public ::testing::TestWithParam<GenerateRmat_Usecase> {
Expand Down Expand Up @@ -323,7 +323,7 @@ struct GenerateRmats_Usecase {
max_scale(max_scale),
component_distribution(component_distribution),
edge_distribution(edge_distribution),
edge_factor(edge_factor){};
edge_factor(edge_factor) {};
};

class Tests_GenerateRmats : public ::testing::TestWithParam<GenerateRmats_Usecase> {
Expand Down