Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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 cpp/src/c_api/leiden.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct leiden_functor : public cugraph::c_api::abstract_functor {
handle_.get_stream());

// FIXME: Revisit the constant edge property idea. We could consider an alternate
// implementation (perhaps involving the thrust::constant_iterator), or we
// implementation (perhaps involving the cuda::constant_iterator), or we
// could add support in Leiden for std::nullopt as the edge weights behaving
// as desired and only instantiating a real edge_property_view_t for the
// coarsened graphs.
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/c_api/louvain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct louvain_functor : public cugraph::c_api::abstract_functor {
handle_.get_stream());

// FIXME: Revisit the constant edge property idea. We could consider an alternate
// implementation (perhaps involving the thrust::constant_iterator), or we
// implementation (perhaps involving the cuda::constant_iterator), or we
// could add support in Louvain for std::nullopt as the edge weights behaving
// as desired and only instantiating a real edge_property_view_t for the
// coarsened graphs.
Expand Down
1 change: 0 additions & 1 deletion cpp/src/centrality/eigenvector_centrality_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <cuda/std/tuple>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/transform.h>

Expand Down
1 change: 0 additions & 1 deletion cpp/src/centrality/katz_centrality_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <cuda/std/tuple>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/transform.h>

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/community/k_truss_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <raft/util/integer_utils.hpp>

#include <cuda/functional>
#include <cuda/iterator>
#include <cuda/std/iterator>
#include <cuda/std/optional>
#include <cuda/std/tuple>
Expand Down Expand Up @@ -490,7 +491,7 @@ k_truss(raft::handle_t const& handle,
thrust::reduce_by_key(handle.get_thrust_policy(),
get_dataframe_buffer_begin(edgelist_to_update_count),
get_dataframe_buffer_end(edgelist_to_update_count),
thrust::make_constant_iterator(size_t{1}),
cuda::make_constant_iterator(size_t{1}),
get_dataframe_buffer_begin(vertex_pair_buffer_unique),
decrease_count.begin(),
thrust::equal_to<cuda::std::tuple<vertex_t, vertex_t>>{});
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/components/weakly_connected_components_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
#include <rmm/device_uvector.hpp>

#include <cuda/functional>
#include <cuda/iterator>
#include <cuda/std/iterator>
#include <cuda/std/optional>
#include <cuda/std/tuple>
#include <thrust/binary_search.h>
#include <thrust/copy.h>
#include <thrust/for_each.h>
#include <thrust/functional.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/discard_iterator.h>
#include <thrust/iterator/transform_iterator.h>
Expand Down Expand Up @@ -753,7 +753,7 @@ void weakly_connected_components_impl(raft::handle_t const& handle,
vertex_frontier,
raft::host_span<size_t const>(next_frontier_bucket_indices.data(),
next_frontier_bucket_indices.size()),
thrust::make_constant_iterator(0) /* dummy */,
cuda::make_constant_iterator(0) /* dummy */,
thrust::make_discard_iterator() /* dummy */,
v_op_t<GraphViewType>{
vertex_partition, level_components, bucket_idx_next, bucket_idx_conflict});
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/converters/legacy/COOtoCSR.cuh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
/*
Expand All @@ -20,14 +20,14 @@

#include <cub/device/device_radix_sort.cuh>
#include <cub/device/device_run_length_encode.cuh>
#include <cuda/std/iterator>
#include <cuda/std/tuple>
#include <thrust/device_ptr.h>
#include <thrust/extrema.h>
#include <thrust/fill.h>
#include <thrust/for_each.h>
#include <thrust/functional.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/reverse_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/scan.h>
#include <thrust/sort.h>
Expand Down Expand Up @@ -109,7 +109,7 @@ void fill_offset(VT* source,
thrust::device_ptr<ET> off = thrust::device_pointer_cast(offsets);
off[src[0]] = ET{0};

auto iter = thrust::make_reverse_iterator(offsets + number_of_vertices + 1);
auto iter = cuda::std::make_reverse_iterator(offsets + number_of_vertices + 1);
thrust::inclusive_scan(rmm::exec_policy(stream_view),
iter,
iter + number_of_vertices + 1,
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/detail/permute_range.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>

#include <cuda/iterator>
#include <cuda/std/iterator>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/reduce.h>
#include <thrust/sort.h>

Expand Down Expand Up @@ -84,7 +84,7 @@ rmm::device_uvector<vertex_t> permute_range(raft::handle_t const& handle,
auto output_end = thrust::reduce_by_key(handle.get_thrust_policy(),
d_target_ranks.begin(),
d_target_ranks.end(),
thrust::make_constant_iterator(1),
cuda::make_constant_iterator(1),
d_reduced_ranks.begin(),
d_reduced_counts.begin(),
thrust::equal_to<int>());
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/link_analysis/hits_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#include <cugraph/edge_src_dst_property.hpp>
#include <cugraph/graph_view.hpp>

#include <cuda/iterator>
#include <cuda/std/tuple>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <thrust/functional.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/transform.h>

Expand All @@ -38,7 +38,7 @@ void normalize(raft::handle_t const& handle,
thrust::transform(handle.get_thrust_policy(),
hubs,
hubs + graph_view.local_vertex_partition_range_size(),
thrust::make_constant_iterator(hubs_norm),
cuda::make_constant_iterator(hubs_norm),
hubs,
thrust::divides<result_t>());
}
Expand Down
1 change: 0 additions & 1 deletion cpp/src/link_analysis/pagerank_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <thrust/count.h>
#include <thrust/fill.h>
#include <thrust/for_each.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/reduce.h>
#include <thrust/transform.h>
Expand Down
1 change: 0 additions & 1 deletion cpp/src/prims/detail/partition_v_frontier.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <cuda/std/tuple>
#include <thrust/copy.h>
#include <thrust/count.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/remove.h>
#include <thrust/sort.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <thrust/adjacent_difference.h>
#include <thrust/copy.h>
#include <thrust/count.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/remove.h>
#include <thrust/sort.h>
Expand Down
1 change: 0 additions & 1 deletion cpp/src/prims/edge_bucket.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <cuda/std/tuple>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/merge.h>
#include <thrust/partition.h>
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/prims/fill_edge_property.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

#include <rmm/exec_policy.hpp>

#include <cuda/iterator>
#include <cuda/std/functional>
#include <cuda/std/optional>
#include <cuda/std/tuple>
#include <thrust/fill.h>
#include <thrust/iterator/constant_iterator.h>

#include <cstddef>

Expand Down Expand Up @@ -93,8 +93,8 @@ void fill_edge_property(raft::handle_t const& handle,
} else {
if (edge_partition_e_mask) {
thrust::transform_if(handle.get_thrust_policy(),
thrust::make_constant_iterator(input),
thrust::make_constant_iterator(input) + edge_counts[i],
cuda::make_constant_iterator(input),
cuda::make_constant_iterator(input) + edge_counts[i],
thrust::make_counting_iterator(edge_t{0}),
value_firsts[i],
cuda::std::identity{},
Expand Down
15 changes: 7 additions & 8 deletions cpp/src/prims/fill_edge_src_dst_property.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@

#include <rmm/exec_policy.hpp>

#include <cuda/std/iterator>
#include <cuda/iterator>
#include <cuda/std/tuple>
#include <thrust/count.h>
#include <thrust/fill.h>
#include <thrust/iterator/constant_iterator.h>

#include <cstddef>
#include <utility>
Expand Down Expand Up @@ -212,7 +211,7 @@ void fill_edge_major_property(raft::handle_t const& handle,
cuda::proclaim_return_type<vertex_t>([edge_partition] __device__(auto v) {
return edge_partition.major_offset_from_major_nocheck(v);
}));
auto val_first = thrust::make_constant_iterator(input);
auto val_first = cuda::make_constant_iterator(input);
// FIXME: this scatter is unnecessary if NCCL directly takes a permutation iterator (and
// directly scatters from the internal buffer)
thrust::scatter(handle.get_thrust_policy(),
Expand All @@ -235,7 +234,7 @@ void fill_edge_major_property(raft::handle_t const& handle,
[input, output_value_first = edge_partition_value_firsts[0]] __device__(
auto v) { packed_bool_atomic_set(output_value_first, v, input); });
} else {
auto val_first = thrust::make_constant_iterator(input);
auto val_first = cuda::make_constant_iterator(input);
thrust::scatter(
handle.get_thrust_policy(),
val_first,
Expand Down Expand Up @@ -834,7 +833,7 @@ void fill_edge_minor_property(raft::handle_t const& handle,
local_v_list_range_firsts[partition_idx]] __device__(auto v_offset) {
return static_cast<vertex_t>(v_offset + (range_first - minor_range_first));
}));
auto val_first = thrust::make_constant_iterator(input);
auto val_first = cuda::make_constant_iterator(input);
thrust::scatter(rmm::exec_policy_nosync(loop_stream),
val_first,
val_first + local_v_list_sizes[partition_idx],
Expand All @@ -845,7 +844,7 @@ void fill_edge_minor_property(raft::handle_t const& handle,
std::get<0>(edge_partition_v_buffers[j]).begin(),
cuda::proclaim_return_type<vertex_t>(
[minor_range_first] __device__(auto v) { return v - minor_range_first; }));
auto val_first = thrust::make_constant_iterator(input);
auto val_first = cuda::make_constant_iterator(input);
thrust::scatter(rmm::exec_policy_nosync(loop_stream),
val_first,
val_first + local_v_list_sizes[partition_idx],
Expand Down Expand Up @@ -913,7 +912,7 @@ void fill_edge_minor_property(raft::handle_t const& handle,
fill_scalar_or_thrust_tuple(output_value_first, minor_offset, input);
});
} else {
auto val_first = thrust::make_constant_iterator(input);
auto val_first = cuda::make_constant_iterator(input);
if (compressed_v_list) {
auto map_first = thrust::make_transform_iterator(
thrust::make_counting_iterator(vertex_t{0}),
Expand Down Expand Up @@ -974,7 +973,7 @@ void fill_edge_minor_property(raft::handle_t const& handle,
fill_scalar_or_thrust_tuple(output_value_first, v, input);
});
} else {
auto val_first = thrust::make_constant_iterator(input);
auto val_first = cuda::make_constant_iterator(input);
thrust::scatter(
handle.get_thrust_policy(),
val_first,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <cuda/std/tuple>
#include <thrust/copy.h>
#include <thrust/count.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/remove.h>
#include <thrust/sort.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <thrust/count.h>
#include <thrust/fill.h>
#include <thrust/functional.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/transform_iterator.h>
#include <thrust/iterator/zip_iterator.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#include <thrust/count.h>
#include <thrust/execution_policy.h>
#include <thrust/functional.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/iterator_traits.h>
#include <thrust/iterator/zip_iterator.h>
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/prims/vertex_frontier.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

#include <cuda/atomic>
#include <cuda/functional>
#include <cuda/iterator>
#include <cuda/std/iterator>
#include <cuda/std/tuple>
#include <thrust/binary_search.h>
#include <thrust/copy.h>
#include <thrust/fill.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/merge.h>
#include <thrust/partition.h>
Expand Down Expand Up @@ -777,7 +777,7 @@ class vertex_frontier_t {
auto it = thrust::reduce_by_key(handle_ptr_->get_thrust_policy(),
bucket_idx_first,
bucket_idx_last,
thrust::make_constant_iterator(size_t{1}),
cuda::make_constant_iterator(size_t{1}),
d_indices.begin(),
d_counts.begin());
d_indices.resize(cuda::std::distance(d_indices.begin(), cuda::std::get<0>(it)),
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/sampling/negative_sampling_impl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

#include <rmm/device_scalar.hpp>

#include <cuda/iterator>
#include <cuda/std/functional>
#include <cuda/std/iterator>
#include <thrust/adjacent_difference.h>
#include <thrust/binary_search.h>
#include <thrust/copy.h>
Expand Down Expand Up @@ -106,7 +106,7 @@ normalize_biases(raft::handle_t const& handle,

// FIXME: conclusion of above. Using 1.1 since it is > 1.0 and easy to type
thrust::copy_n(handle.get_thrust_policy(),
thrust::make_constant_iterator<weight_t>(1.1),
cuda::make_constant_iterator<weight_t>(1.1),
trailing_zeros + 1,
gpu_biases->begin() + gpu_biases->size() - trailing_zeros - 1);
}
Expand Down
Loading
Loading