There was an error while loading. Please reload this page.
2 parents af15d93 + 06cb693 commit 51770a0Copy full SHA for 51770a0
6 files changed
cpp/include/raft/comms/detail/test.hpp
@@ -1,5 +1,5 @@
1
/*
2
- * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION.
+ * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
@@ -376,8 +376,9 @@ bool test_pointToPoint_device_send_or_recv(raft::resources const& h, int numTria
376
std::cout << "Trial " << i << std::endl;
377
}
378
379
- bool sender = (rank % 2) == 0 ? true : false;
380
- rmm::device_scalar<int> received_data(-1, stream);
+ bool sender = (rank % 2) == 0 ? true : false;
+ int received_data_value = -1;
381
+ rmm::device_scalar<int> received_data(received_data_value, stream);
382
rmm::device_scalar<int> sent_data(rank, stream);
383
384
if (sender) {
@@ -418,7 +419,8 @@ bool test_pointToPoint_device_sendrecv(raft::resources const& h, int numTrials)
418
419
420
421
422
423
424
425
426
if (rank % 2 == 0) {
cpp/include/raft/sparse/solver/detail/mst_solver_inl.cuh
@@ -80,8 +80,8 @@ MST_solver<vertex_t, edge_t, weight_t, alteration_t>::MST_solver(raft::resources
80
temp_src(2 * v_, stream_),
81
temp_dst(2 * v_, stream_),
82
temp_weights(2 * v_, stream_),
83
- mst_edge_count(1, stream_),
84
- prev_mst_edge_count(1, stream_),
+ mst_edge_count(stream_),
+ prev_mst_edge_count(stream_),
85
stream(stream_),
86
symmetrize_output(symmetrize_output_),
87
initialize_colors(initialize_colors_),
@@ -225,6 +225,7 @@ void MST_solver<vertex_t, edge_t, weight_t, alteration_t>::alteration()
225
// Random number generator
226
curandGenerator_t randGen;
227
curandCreateGenerator(&randGen, CURAND_RNG_PSEUDO_DEFAULT);
228
+ curandSetStream(randGen, stream);
229
curandSetPseudoRandomGeneratorSeed(randGen, 1234567);
230
231
// Initialize rand values
cpp/tests/linalg/dot.cu
@@ -63,7 +63,8 @@ class DotTest : public ::testing::TestWithParam<DotInputs<T>> {
63
uniform(handle, r, x.data(), x_len, T(-1.0), T(1.0));
64
uniform(handle, r, y.data(), y_len, T(-1.0), T(1.0));
65
66
- rmm::device_scalar<T> ref(0, resource::get_cuda_stream(handle));
+ T zero = 0;
67
+ rmm::device_scalar<T> ref(zero, resource::get_cuda_stream(handle));
68
raft::launch_kernel(handle,
69
256,
70
@@ -77,7 +78,7 @@ class DotTest : public ::testing::TestWithParam<DotInputs<T>> {
77
78
raft::update_host(&ref_output, ref.data(), 1, stream);
79
// Test out both the device and host api's
- rmm::device_scalar<T> out(0, resource::get_cuda_stream(handle));
+ rmm::device_scalar<T> out(zero, resource::get_cuda_stream(handle));
auto device_out_view = make_device_scalar_view<T, IndexType>(out.data());
auto host_out_view = make_host_scalar_view<T, IndexType>(&host_output);
cpp/tests/linalg/mean_squared_error.cu
@@ -43,14 +43,15 @@ class MeanSquaredErrorTest : public ::testing::TestWithParam<MeanSquaredErrorInp
43
MeanSquaredErrorInputs<T> params;
44
45
raft::resources handle;
46
47
rmm::device_scalar<T> output;
48
rmm::device_scalar<T> refoutput;
49
50
public:
51
MeanSquaredErrorTest()
52
: testing::TestWithParam<MeanSquaredErrorInputs<T>>(),
- output(0, resource::get_cuda_stream(handle)),
53
- refoutput(0, resource::get_cuda_stream(handle))
+ output(zero, resource::get_cuda_stream(handle)),
54
+ refoutput(zero, resource::get_cuda_stream(handle))
55
{
56
resource::sync_stream(handle);
57
cpp/tests/util/device_atomics.cu
@@ -38,7 +38,8 @@ TEST(Raft, AtomicIncWarp)
38
rmm::cuda_stream_pool pool{1};
39
auto s = pool.get_stream();
40
41
- rmm::device_scalar<int> counter{0, s};
+ int zero = 0;
42
+ rmm::device_scalar<int> counter{zero, s};
rmm::device_uvector<int> out_device{num_elts, s};
std::array<int, num_elts> out_host{0};
cpp/tests/util/popc.cu
@@ -93,7 +93,8 @@ class PopcTest : public ::testing::TestWithParam<PopcInputs<index_t>> {
93
auto max_len_view = raft::make_host_scalar_view<const index_t, index_t>(&max_len);
94
95
index_t nnz_actual_h = 0;
96
- rmm::device_scalar<index_t> nnz_actual_d(0, stream);
+ index_t zero = 0;
97
+ rmm::device_scalar<index_t> nnz_actual_d(zero, stream);
98
auto nnz_actual_view = raft::make_device_scalar_view<index_t>(nnz_actual_d.data());
99
100
raft::execute_with_dry_run_check(
0 commit comments