diff --git a/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp b/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp index e07d8172b53..c58574cc6c6 100644 --- a/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp +++ b/cpp/examples/users/multi_gpu_application/mg_graph_algorithms.cpp @@ -98,8 +98,8 @@ create_graph(raft::handle_t const& handle, auto start = comm_rank * (num_edges / comm_size); auto end = (comm_rank + 1) * (num_edges / comm_size); if (comm_rank == comm_size - 1) { end = num_edges; } - auto work_size = end - start; + rmm::device_uvector d_edge_srcs(work_size, handle.get_stream()); rmm::device_uvector d_edge_dsts(work_size, handle.get_stream());