Skip to content

Commit 51770a0

Browse files
authored
Merge branch 'main' into fea-dry-run-protocol
2 parents af15d93 + 06cb693 commit 51770a0

6 files changed

Lines changed: 19 additions & 12 deletions

File tree

cpp/include/raft/comms/detail/test.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION.
2+
* SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

@@ -376,8 +376,9 @@ bool test_pointToPoint_device_send_or_recv(raft::resources const& h, int numTria
376376
std::cout << "Trial " << i << std::endl;
377377
}
378378

379-
bool sender = (rank % 2) == 0 ? true : false;
380-
rmm::device_scalar<int> received_data(-1, stream);
379+
bool sender = (rank % 2) == 0 ? true : false;
380+
int received_data_value = -1;
381+
rmm::device_scalar<int> received_data(received_data_value, stream);
381382
rmm::device_scalar<int> sent_data(rank, stream);
382383

383384
if (sender) {
@@ -418,7 +419,8 @@ bool test_pointToPoint_device_sendrecv(raft::resources const& h, int numTrials)
418419
std::cout << "Trial " << i << std::endl;
419420
}
420421

421-
rmm::device_scalar<int> received_data(-1, stream);
422+
int received_data_value = -1;
423+
rmm::device_scalar<int> received_data(received_data_value, stream);
422424
rmm::device_scalar<int> sent_data(rank, stream);
423425

424426
if (rank % 2 == 0) {

cpp/include/raft/sparse/solver/detail/mst_solver_inl.cuh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ MST_solver<vertex_t, edge_t, weight_t, alteration_t>::MST_solver(raft::resources
8080
temp_src(2 * v_, stream_),
8181
temp_dst(2 * v_, stream_),
8282
temp_weights(2 * v_, stream_),
83-
mst_edge_count(1, stream_),
84-
prev_mst_edge_count(1, stream_),
83+
mst_edge_count(stream_),
84+
prev_mst_edge_count(stream_),
8585
stream(stream_),
8686
symmetrize_output(symmetrize_output_),
8787
initialize_colors(initialize_colors_),
@@ -225,6 +225,7 @@ void MST_solver<vertex_t, edge_t, weight_t, alteration_t>::alteration()
225225
// Random number generator
226226
curandGenerator_t randGen;
227227
curandCreateGenerator(&randGen, CURAND_RNG_PSEUDO_DEFAULT);
228+
curandSetStream(randGen, stream);
228229
curandSetPseudoRandomGeneratorSeed(randGen, 1234567);
229230

230231
// Initialize rand values

cpp/tests/linalg/dot.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ class DotTest : public ::testing::TestWithParam<DotInputs<T>> {
6363
uniform(handle, r, x.data(), x_len, T(-1.0), T(1.0));
6464
uniform(handle, r, y.data(), y_len, T(-1.0), T(1.0));
6565

66-
rmm::device_scalar<T> ref(0, resource::get_cuda_stream(handle));
66+
T zero = 0;
67+
rmm::device_scalar<T> ref(zero, resource::get_cuda_stream(handle));
6768
raft::launch_kernel(handle,
6869
256,
6970
256,
@@ -77,7 +78,7 @@ class DotTest : public ::testing::TestWithParam<DotInputs<T>> {
7778
raft::update_host(&ref_output, ref.data(), 1, stream);
7879

7980
// Test out both the device and host api's
80-
rmm::device_scalar<T> out(0, resource::get_cuda_stream(handle));
81+
rmm::device_scalar<T> out(zero, resource::get_cuda_stream(handle));
8182
auto device_out_view = make_device_scalar_view<T, IndexType>(out.data());
8283
auto host_out_view = make_host_scalar_view<T, IndexType>(&host_output);
8384

cpp/tests/linalg/mean_squared_error.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@ class MeanSquaredErrorTest : public ::testing::TestWithParam<MeanSquaredErrorInp
4343
MeanSquaredErrorInputs<T> params;
4444

4545
raft::resources handle;
46+
T zero = 0;
4647
rmm::device_scalar<T> output;
4748
rmm::device_scalar<T> refoutput;
4849

4950
public:
5051
MeanSquaredErrorTest()
5152
: testing::TestWithParam<MeanSquaredErrorInputs<T>>(),
52-
output(0, resource::get_cuda_stream(handle)),
53-
refoutput(0, resource::get_cuda_stream(handle))
53+
output(zero, resource::get_cuda_stream(handle)),
54+
refoutput(zero, resource::get_cuda_stream(handle))
5455
{
5556
resource::sync_stream(handle);
5657
}

cpp/tests/util/device_atomics.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ TEST(Raft, AtomicIncWarp)
3838
rmm::cuda_stream_pool pool{1};
3939
auto s = pool.get_stream();
4040

41-
rmm::device_scalar<int> counter{0, s};
41+
int zero = 0;
42+
rmm::device_scalar<int> counter{zero, s};
4243
rmm::device_uvector<int> out_device{num_elts, s};
4344
std::array<int, num_elts> out_host{0};
4445

cpp/tests/util/popc.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ class PopcTest : public ::testing::TestWithParam<PopcInputs<index_t>> {
9393
auto max_len_view = raft::make_host_scalar_view<const index_t, index_t>(&max_len);
9494

9595
index_t nnz_actual_h = 0;
96-
rmm::device_scalar<index_t> nnz_actual_d(0, stream);
96+
index_t zero = 0;
97+
rmm::device_scalar<index_t> nnz_actual_d(zero, stream);
9798
auto nnz_actual_view = raft::make_device_scalar_view<index_t>(nnz_actual_d.data());
9899

99100
raft::execute_with_dry_run_check(

0 commit comments

Comments
 (0)