Skip to content

Commit b200847

Browse files
committed
resolve merge conflicts
2 parents cb9c45e + 6d9fdb9 commit b200847

File tree

52 files changed

+306
-329
lines changed

Some content is hidden

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

52 files changed

+306
-329
lines changed

cpp/include/cugraph/edge_partition_device_view.cuh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <rmm/device_uvector.hpp>
1616
#include <rmm/exec_policy.hpp>
1717

18+
#include <cuda/iterator>
1819
#include <cuda/std/functional>
19-
#include <cuda/std/iterator>
2020
#include <cuda/std/optional>
2121
#include <cuda/std/tuple>
2222
#include <thrust/binary_search.h>
@@ -256,7 +256,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
256256
size_t tmp_storage_bytes{0};
257257

258258
if (dcs_nzd_vertices_) {
259-
auto local_degree_first = thrust::make_transform_iterator(
259+
auto local_degree_first = cuda::make_transform_iterator(
260260
major_first,
261261
detail::local_degree_op_t<vertex_t,
262262
edge_t,
@@ -278,7 +278,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
278278
cuda::std::distance(major_first, major_last),
279279
stream);
280280
} else {
281-
auto local_degree_first = thrust::make_transform_iterator(
281+
auto local_degree_first = cuda::make_transform_iterator(
282282
major_first,
283283
detail::local_degree_op_t<vertex_t,
284284
edge_t,
@@ -416,7 +416,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
416416
size_t tmp_storage_bytes{0};
417417

418418
if (dcs_nzd_vertices_) {
419-
auto local_degree_first = thrust::make_transform_iterator(
419+
auto local_degree_first = cuda::make_transform_iterator(
420420
major_first,
421421
detail::local_degree_with_mask_op_t<
422422
vertex_t,
@@ -443,7 +443,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
443443
cuda::std::distance(major_first, major_last),
444444
stream);
445445
} else {
446-
auto local_degree_first = thrust::make_transform_iterator(
446+
auto local_degree_first = cuda::make_transform_iterator(
447447
major_first,
448448
detail::local_degree_with_mask_op_t<
449449
vertex_t,
@@ -726,7 +726,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
726726
rmm::device_uvector<std::byte> d_tmp_storage(0, stream);
727727
size_t tmp_storage_bytes{0};
728728

729-
auto local_degree_first = thrust::make_transform_iterator(
729+
auto local_degree_first = cuda::make_transform_iterator(
730730
major_first,
731731
detail::local_degree_op_t<vertex_t,
732732
edge_t,

cpp/include/cugraph/utilities/mask_utils.cuh

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
#include <raft/core/handle.hpp>
1212

1313
#include <cuda/functional>
14-
#include <cuda/std/functional>
15-
#include <cuda/std/iterator>
14+
#include <cuda/iterator>
1615
#include <thrust/copy.h>
1716
#include <thrust/iterator/counting_iterator.h>
18-
#include <thrust/iterator/transform_iterator.h>
1917
#include <thrust/tabulate.h>
2018
#include <thrust/transform.h>
2119
#include <thrust/transform_reduce.h>
@@ -132,15 +130,15 @@ __device__ size_t copy_if_mask_set(InputIterator input_first,
132130

133131
return static_cast<size_t>(cuda::std::distance(
134132
output_first + output_start_offset,
135-
thrust::copy_if(thrust::seq,
136-
input_first + input_start_offset,
137-
input_first + (input_start_offset + num_items),
138-
thrust::make_transform_iterator(
139-
thrust::make_counting_iterator(size_t{0}),
140-
check_bit_set_t<MaskIterator, size_t>{mask_first, size_t{0}}) +
141-
input_start_offset,
142-
output_first + output_start_offset,
143-
is_equal_t<bool>{true})));
133+
thrust::copy_if(
134+
thrust::seq,
135+
input_first + input_start_offset,
136+
input_first + (input_start_offset + num_items),
137+
cuda::make_transform_iterator(thrust::make_counting_iterator(size_t{0}),
138+
check_bit_set_t<MaskIterator, size_t>{mask_first, size_t{0}}) +
139+
input_start_offset,
140+
output_first + output_start_offset,
141+
is_equal_t<bool>{true})));
144142
}
145143

146144
template <typename MaskIterator> // should be packed bool
@@ -177,8 +175,8 @@ OutputIterator copy_if_mask_set(raft::handle_t const& handle,
177175
handle.get_thrust_policy(),
178176
input_first,
179177
input_last,
180-
thrust::make_transform_iterator(thrust::make_counting_iterator(size_t{0}),
181-
check_bit_set_t<MaskIterator, size_t>{mask_first, size_t{0}}),
178+
cuda::make_transform_iterator(thrust::make_counting_iterator(size_t{0}),
179+
check_bit_set_t<MaskIterator, size_t>{mask_first, size_t{0}}),
182180
output_first,
183181
is_equal_t<bool>{true});
184182
}
@@ -196,8 +194,8 @@ OutputIterator copy_if_mask_unset(raft::handle_t const& handle,
196194
handle.get_thrust_policy(),
197195
input_first,
198196
input_last,
199-
thrust::make_transform_iterator(thrust::make_counting_iterator(size_t{0}),
200-
check_bit_set_t<MaskIterator, size_t>{mask_first, size_t{0}}),
197+
cuda::make_transform_iterator(thrust::make_counting_iterator(size_t{0}),
198+
check_bit_set_t<MaskIterator, size_t>{mask_first, size_t{0}}),
201199
output_first,
202200
is_equal_t<bool>{false});
203201
}

cpp/include/cugraph/utilities/misc_utils.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2021-2025, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55
#pragma once
@@ -12,11 +12,11 @@
1212

1313
#include <cuda/atomic>
1414
#include <cuda/functional>
15+
#include <cuda/iterator>
1516
#include <cuda/std/optional>
1617
#include <thrust/binary_search.h>
1718
#include <thrust/gather.h>
1819
#include <thrust/iterator/counting_iterator.h>
19-
#include <thrust/iterator/transform_iterator.h>
2020
#include <thrust/scan.h>
2121

2222
#include <optional>
@@ -34,7 +34,7 @@ std::tuple<std::vector<vertex_t>, std::vector<offset_t>> compute_offset_aligned_
3434
offset_t num_elements,
3535
vertex_t approx_element_chunk_size)
3636
{
37-
auto search_offset_first = thrust::make_transform_iterator(
37+
auto search_offset_first = cuda::make_transform_iterator(
3838
thrust::make_counting_iterator(size_t{1}),
3939
cuda::proclaim_return_type<size_t>(
4040
[approx_element_chunk_size] __device__(auto i) { return i * approx_element_chunk_size; }));

cpp/include/cugraph/utilities/shuffle_comm.cuh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717

1818
#include <cuda/atomic>
1919
#include <cuda/functional>
20-
#include <cuda/std/iterator>
20+
#include <cuda/iterator>
2121
#include <cuda/std/tuple>
2222
#include <thrust/binary_search.h>
2323
#include <thrust/copy.h>
2424
#include <thrust/count.h>
2525
#include <thrust/execution_policy.h>
2626
#include <thrust/fill.h>
2727
#include <thrust/iterator/iterator_traits.h>
28-
#include <thrust/iterator/transform_iterator.h>
2928
#include <thrust/iterator/zip_iterator.h>
3029
#include <thrust/partition.h>
3130
#include <thrust/reduce.h>
@@ -210,7 +209,7 @@ void multi_partition(ValueIterator value_first,
210209
rmm::exec_policy(stream_view),
211210
value_first,
212211
value_last,
213-
thrust::make_transform_iterator(
212+
cuda::make_transform_iterator(
214213
thrust::make_zip_iterator(group_id_offsets.begin(), intra_partition_displs.begin()),
215214
cuda::proclaim_return_type<size_t>(
216215
[displacements = raft::device_span<size_t const>(
@@ -261,7 +260,7 @@ void multi_partition(KeyIterator key_first,
261260
thrust::exclusive_scan(
262261
rmm::exec_policy(stream_view), counts.begin(), counts.end(), displacements.begin());
263262

264-
auto map_first = thrust::make_transform_iterator(
263+
auto map_first = cuda::make_transform_iterator(
265264
thrust::make_zip_iterator(group_id_offsets.begin(), intra_partition_displs.begin()),
266265
cuda::proclaim_return_type<size_t>([displacements = raft::device_span<size_t const>(
267266
displacements.data(),
@@ -815,7 +814,7 @@ rmm::device_uvector<size_t> groupby_and_count(
815814
stream_view,
816815
large_buffer_type);
817816

818-
auto group_id_first = thrust::make_transform_iterator(
817+
auto group_id_first = cuda::make_transform_iterator(
819818
tx_value_first, cuda::proclaim_return_type<int>([value_to_group_id_op] __device__(auto value) {
820819
return value_to_group_id_op(value);
821820
}));
@@ -856,7 +855,7 @@ rmm::device_uvector<size_t> groupby_and_count(
856855
stream_view,
857856
large_buffer_type);
858857

859-
auto group_id_first = thrust::make_transform_iterator(
858+
auto group_id_first = cuda::make_transform_iterator(
860859
tx_key_first, cuda::proclaim_return_type<int>([key_to_group_id_op] __device__(auto key) {
861860
return key_to_group_id_op(key);
862861
}));

cpp/src/c_api/degrees.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -17,6 +17,7 @@
1717
#include <cugraph/shuffle_functions.hpp>
1818
#include <cugraph/vertex_partition_device_view.cuh>
1919

20+
#include <cuda/iterator>
2021
#include <thrust/gather.h>
2122

2223
#include <optional>
@@ -112,7 +113,7 @@ struct degrees_functor : public cugraph::c_api::abstract_functor {
112113
auto vertex_partition = cugraph::vertex_partition_device_view_t<vertex_t, multi_gpu>(
113114
graph_view.local_vertex_partition_view());
114115

115-
auto vertices_iter = thrust::make_transform_iterator(
116+
auto vertices_iter = cuda::make_transform_iterator(
116117
vertex_ids.begin(),
117118
cuda::proclaim_return_type<vertex_t>([vertex_partition] __device__(auto v) {
118119
return vertex_partition.local_vertex_partition_offset_from_vertex_nocheck(v);

cpp/src/centrality/betweenness_centrality_impl.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828

2929
#include <cub/cub.cuh>
3030
#include <cuda/atomic>
31+
#include <cuda/iterator>
3132
#include <cuda/std/functional>
32-
#include <cuda/std/iterator>
3333
#include <cuda/std/optional>
3434
#include <cuda/std/tuple>
3535
#include <thrust/copy.h>
@@ -734,7 +734,7 @@ void multisource_backward_pass(
734734
// Find global maximum distance across all sources
735735
constexpr vertex_t invalid_distance = std::numeric_limits<vertex_t>::max();
736736

737-
auto d_first = thrust::make_transform_iterator(
737+
auto d_first = cuda::make_transform_iterator(
738738
distances_2d.begin(),
739739
cuda::proclaim_return_type<vertex_t>([invalid_distance] __device__(vertex_t d) {
740740
return d == invalid_distance ? vertex_t{0} : d;
@@ -891,7 +891,7 @@ void multisource_backward_pass(
891891
size_t num_segments_in_chunk = chunk_distance_end - chunk_distance_start;
892892

893893
if (num_segments_in_chunk > 0) {
894-
auto offset_first = thrust::make_transform_iterator(
894+
auto offset_first = cuda::make_transform_iterator(
895895
d_distance_offsets.data() + chunk_distance_start,
896896
cuda::proclaim_return_type<size_t>([chunk_vertex_start] __device__(size_t offset) {
897897
return offset - chunk_vertex_start;

cpp/src/community/detail/common_methods.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <cugraph/graph_functions.hpp>
2020

2121
#include <cuda/functional>
22-
#include <cuda/std/functional>
22+
#include <cuda/iterator>
2323
#include <cuda/std/optional>
2424
#include <cuda/std/tuple>
2525
#include <thrust/binary_search.h>
@@ -163,7 +163,7 @@ weight_t compute_modularity(
163163
//
164164
// Sum(Sigma_tot_c^2), over all clusters c
165165
//
166-
auto squared_first = thrust::make_transform_iterator(
166+
auto squared_first = cuda::make_transform_iterator(
167167
cluster_weights.begin(),
168168
cuda::proclaim_return_type<weight_t>([] __device__(weight_t p) { return p * p; }));
169169
weight_t sum_degree_squared = thrust::reduce(

cpp/src/community/k_truss_impl.cuh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@
2222

2323
#include <cuda/functional>
2424
#include <cuda/iterator>
25-
#include <cuda/std/iterator>
2625
#include <cuda/std/optional>
2726
#include <cuda/std/tuple>
2827
#include <cuda/std/utility>
2928
#include <thrust/copy.h>
3029
#include <thrust/count.h>
3130
#include <thrust/execution_policy.h>
32-
#include <thrust/iterator/transform_iterator.h>
3331
#include <thrust/sort.h>
3432
#include <thrust/transform.h>
3533

@@ -225,7 +223,7 @@ k_truss(raft::handle_t const& handle,
225223
edge_src_property_t<vertex_t, bool> edge_src_in_k_minus_1_cores(handle, cur_graph_view);
226224
edge_dst_property_t<vertex_t, bool> edge_dst_in_k_minus_1_cores(handle, cur_graph_view);
227225
auto in_k_minus_1_core_first =
228-
thrust::make_transform_iterator(core_numbers.begin(), is_k_or_greater_t<edge_t>{k - 1});
226+
cuda::make_transform_iterator(core_numbers.begin(), is_k_or_greater_t<edge_t>{k - 1});
229227
rmm::device_uvector<bool> in_k_minus_1_core_flags(core_numbers.size(), handle.get_stream());
230228
thrust::copy(handle.get_thrust_policy(),
231229
in_k_minus_1_core_first,

cpp/src/community/triangle_count_impl.cuh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
#include <cugraph/utilities/error.hpp>
1818
#include <cugraph/utilities/host_scalar_comm.hpp>
1919

20-
#include <cuda/std/iterator>
20+
#include <cuda/iterator>
2121
#include <cuda/std/optional>
2222
#include <cuda/std/tuple>
2323
#include <thrust/binary_search.h>
2424
#include <thrust/copy.h>
2525
#include <thrust/count.h>
2626
#include <thrust/execution_policy.h>
2727
#include <thrust/fill.h>
28-
#include <thrust/iterator/transform_iterator.h>
2928
#include <thrust/scatter.h>
3029
#include <thrust/sort.h>
3130
#include <thrust/transform.h>
@@ -387,7 +386,7 @@ void triangle_count(raft::handle_t const& handle,
387386
edge_src_property_t<vertex_t, bool> edge_src_in_two_cores(handle, cur_graph_view);
388387
edge_dst_property_t<vertex_t, bool> edge_dst_in_two_cores(handle, cur_graph_view);
389388
auto in_two_core_first =
390-
thrust::make_transform_iterator(core_numbers.begin(), is_two_or_greater_t<edge_t>{});
389+
cuda::make_transform_iterator(core_numbers.begin(), is_two_or_greater_t<edge_t>{});
391390
rmm::device_uvector<bool> in_two_core_flags(core_numbers.size(), handle.get_stream());
392391
thrust::copy(handle.get_thrust_policy(),
393392
in_two_core_first,
@@ -538,7 +537,7 @@ void triangle_count(raft::handle_t const& handle,
538537
handle.get_thrust_policy(),
539538
local_counts.begin(),
540539
local_counts.end(),
541-
thrust::make_transform_iterator(
540+
cuda::make_transform_iterator(
542541
local_vertices.begin(),
543542
vertex_offset_from_vertex_t<vertex_t>{graph_view.local_vertex_partition_range_first()}),
544543
counts.begin());

cpp/src/components/weakly_connected_components_impl.cuh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@
2929

3030
#include <cuda/functional>
3131
#include <cuda/iterator>
32-
#include <cuda/std/functional>
33-
#include <cuda/std/iterator>
3432
#include <cuda/std/optional>
3533
#include <cuda/std/tuple>
3634
#include <thrust/binary_search.h>
3735
#include <thrust/copy.h>
3836
#include <thrust/for_each.h>
3937
#include <thrust/iterator/counting_iterator.h>
4038
#include <thrust/iterator/discard_iterator.h>
41-
#include <thrust/iterator/transform_iterator.h>
4239
#include <thrust/iterator/zip_iterator.h>
4340
#include <thrust/merge.h>
4441
#include <thrust/partition.h>
@@ -738,7 +735,7 @@ void weakly_connected_components_impl(raft::handle_t const& handle,
738735
if constexpr (GraphViewType::is_multi_gpu) {
739736
rmm::device_uvector<vertex_t> gathered_level_components(
740737
vertex_frontier.bucket(bucket_idx_cur).size(), handle.get_stream());
741-
auto map_first = thrust::make_transform_iterator(
738+
auto map_first = cuda::make_transform_iterator(
742739
cuda::std::get<0>(vertex_frontier.bucket(bucket_idx_cur).begin().get_iterator_tuple()),
743740
detail::shift_left_t<vertex_t>{level_graph_view.local_vertex_partition_range_first()});
744741
thrust::gather(handle.get_thrust_policy(),

0 commit comments

Comments
 (0)