Skip to content

Commit

Permalink
Update to clang 16.0.6. (#3859)
Browse files Browse the repository at this point in the history
This PR updates cugraph to use clang 16.0.6. The previous version 16.0.1 has some minor formatting issues affecting several RAPIDS repos.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Brad Rees (https://github.com/BradReesWork)
  - Chuck Hastings (https://github.com/ChuckHastings)

URL: #3859
  • Loading branch information
bdice authored Sep 19, 2023
1 parent ed7b1a4 commit 686c372
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
additional_dependencies:
- flake8==6.0.0
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.1
rev: v16.0.6
hooks:
- id: clang-format
exclude: |
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/components/legacy/scc_matrix.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct SCC_Data {
SCC_Data(size_t nrows,
const IndexT* p_d_r_o, // row_offsets
const IndexT* p_d_c_i)
: // column indices
: // column indices
nrows_(nrows),
p_d_r_o_(p_d_r_o),
p_d_c_i_(p_d_c_i),
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/cores/core_number_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct v_to_core_number_t {
// a workaround for cudaErrorInvalidDeviceFunction error when device lambda is used
template <typename edge_t>
struct mult_degree_by_two_t {
__device__ edge_t operator()(edge_t d) const { return d* edge_t{2}; }
__device__ edge_t operator()(edge_t d) const { return d * edge_t{2}; }
};

} // namespace
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/prims/per_v_random_select_transform_outgoing_e.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ rmm::device_uvector<edge_t> get_sampling_index_without_replacement(
#ifndef NO_CUGRAPH_OPS
edge_t mid_partition_degree_range_last = static_cast<edge_t>(K * 10); // tuning parameter
assert(mid_partition_degree_range_last > K);
size_t high_partition_over_sampling_K = K * 2; // tuning parameter
size_t high_partition_over_sampling_K = K * 2; // tuning parameter
assert(high_partition_over_sampling_K > K);

rmm::device_uvector<edge_t> sample_nbr_indices(frontier_degrees.size() * K, handle.get_stream());
Expand Down Expand Up @@ -883,7 +883,7 @@ per_v_random_select_transform_e(raft::handle_t const& handle,
sample_nbr_indices); // neighbor index within an edge partition (note that each vertex's
// neighbors are distributed in minor_comm_size partitions)
std::optional<rmm::device_uvector<size_t>> sample_key_indices{
std::nullopt}; // relevant only when (minor_comm_size > 1)
std::nullopt}; // relevant only when (minor_comm_size > 1)
auto local_frontier_sample_counts = std::vector<size_t>{};
auto local_frontier_sample_displacements = std::vector<size_t>{};
if (minor_comm_size > 1) {
Expand Down
18 changes: 9 additions & 9 deletions cpp/src/sampling/random_walks.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@ struct col_indx_extract_t {
void operator()(
original::device_vec_t<vertex_t> const& d_coalesced_src_v, // in: coalesced vector of vertices
original::device_vec_t<vertex_t> const&
d_v_col_indx, // in: column indices, given by stepper's random engine
d_v_col_indx, // in: column indices, given by stepper's random engine
original::device_vec_t<vertex_t>&
d_v_next_vertices, // out: set of destination vertices, for next step
original::device_vec_t<weight_t>&
d_v_next_weights) // out: set of weights between src and destination vertices, for next step
d_v_next_weights) // out: set of weights between src and destination vertices, for next step
const
{
thrust::transform_if(
handle_.get_thrust_policy(),
thrust::make_counting_iterator<index_t>(0),
thrust::make_counting_iterator<index_t>(num_paths_), // input1
d_v_col_indx.begin(), // input2
out_degs_, // stencil
thrust::make_counting_iterator<index_t>(num_paths_), // input1
d_v_col_indx.begin(), // input2
out_degs_, // stencil
thrust::make_zip_iterator(
thrust::make_tuple(d_v_next_vertices.begin(), d_v_next_weights.begin())), // output
[max_depth = max_depth_,
Expand Down Expand Up @@ -575,9 +575,9 @@ struct random_walker_t {
d_crt_out_degs, // |current set of vertex out degrees| = nelems,
// to be used as stencil (don't scatter if 0)
original::device_vec_t<index_t> const&
d_sizes, // paths sizes used to provide delta in coalesced paths;
// pre-condition: assumed as updated to reflect new vertex additions;
// also, this is the number of _vertices_ in each path;
d_sizes, // paths sizes used to provide delta in coalesced paths;
// pre-condition: assumed as updated to reflect new vertex additions;
// also, this is the number of _vertices_ in each path;
// hence for scattering weights this needs to be adjusted; hence the `adjust` parameter
index_t
stride, // stride = coalesce block size (max_depth for vertices; max_depth-1 for weights)
Expand Down Expand Up @@ -762,7 +762,7 @@ random_walks_impl(
// pre-allocate num_paths * max_depth;
//
original::device_vec_t<vertex_t> d_coalesced_v(num_paths * max_depth,
stream); // coalesced vertex set
stream); // coalesced vertex set
original::device_vec_t<weight_t> d_coalesced_w(num_paths * (max_depth - 1),
stream); // coalesced weight set
original::device_vec_t<index_t> d_paths_sz(num_paths, stream); // paths sizes
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/structure/renumber_edgelist_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct find_unused_id_t {
for (size_t i = worker_id; i < sorted_local_vertices.size() + size_t{1}; i += num_workers) {
auto start = (i == size_t{0}) ? std::numeric_limits<vertex_t>::lowest()
: sorted_local_vertices[i - size_t{1}];
if (start != std::numeric_limits<vertex_t>::max()) { ++start; }; // now inclusive
if (start != std::numeric_limits<vertex_t>::max()) { ++start; }; // now inclusive
auto end = (i == sorted_local_vertices.size()) ? std::numeric_limits<vertex_t>::max()
: sorted_local_vertices[i]; // exclusive
for (vertex_t v = start; v < end; ++v) {
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/traversal/bfs_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ struct e_op_t {
if (*(prev_visited_flags + packed_bool_offset(dst)) &
packed_bool_mask(dst)) { // check if unvisited in previous iterations
push = false;
} else { // check if unvisited in this iteration as well
} else { // check if unvisited in this iteration as well
auto old = visited_flags.atomic_or(dst, true);
push = !old;
}
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/prims/mg_extract_transform_e.cu
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ class Tests_MGExtractTransformE
// 1. create MG graph

constexpr bool is_multi_gpu = true;
constexpr bool renumber = true; // needs to be true for multi gpu case
constexpr bool store_transposed = false; // needs to be false for using extract_transform_e
constexpr bool renumber = true; // needs to be true for multi gpu case
constexpr bool store_transposed = false; // needs to be false for using extract_transform_e
if (cugraph::test::g_perf) {
RAFT_CUDA_TRY(cudaDeviceSynchronize()); // for consistent performance measurement
handle_->get_comms().barrier();
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/traversal/mg_sssp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class Tests_MGSSSP : public ::testing::TestWithParam<std::tuple<SSSP_Usecase, in
auto h_sg_predecessors = cugraph::test::to_host(*handle_, d_sg_predecessors);

auto max_weight_element = std::max_element(h_sg_weights.begin(), h_sg_weights.end());
auto epsilon = *max_weight_element* weight_t{1e-6};
auto epsilon = *max_weight_element * weight_t{1e-6};
auto nearly_equal = [epsilon](auto lhs, auto rhs) {
return std::fabs(lhs - rhs) < epsilon;
};
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/traversal/sssp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class Tests_SSSP : public ::testing::TestWithParam<std::tuple<SSSP_Usecase, inpu
}

auto max_weight_element = std::max_element(h_weights.begin(), h_weights.end());
auto epsilon = *max_weight_element* weight_t{1e-6};
auto epsilon = *max_weight_element * weight_t{1e-6};
auto nearly_equal = [epsilon](auto lhs, auto rhs) { return std::fabs(lhs - rhs) < epsilon; };

ASSERT_TRUE(std::equal(h_reference_distances.begin(),
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/utilities/test_utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ mg_vertex_property_values_to_sg_vertex_property_values(
std::optional<raft::device_span<vertex_t const>>
sg_renumber_map, // std::nullopt if the SG graph is not renumbered
std::optional<raft::device_span<vertex_t const>>
mg_vertices, // std::nullopt if the entire local vertex partition range is assumed
mg_vertices, // std::nullopt if the entire local vertex partition range is assumed
raft::device_span<value_t const> mg_values);

template <typename type_t>
Expand Down

0 comments on commit 686c372

Please sign in to comment.