From 390cf72a0cc780c8256bd2f916fee054b6d6beb2 Mon Sep 17 00:00:00 2001 From: Chuck Hastings <45364586+ChuckHastings@users.noreply.github.com> Date: Sat, 26 Feb 2022 19:06:56 -0500 Subject: [PATCH] Allocate sufficient memory for Hungarian if number of batches > 1 (#531) Addresses Hungarian bug described in #528. The `dualUpdate` method was originally using an array of size one which was eventually changed to a scalar. It really needs to be an array of size SP (number of subproblems in Date/Nagi nomenclature, number of batches as integrated into raft). Authors: - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: https://github.com/rapidsai/raft/pull/531 --- cpp/include/raft/lap/detail/lap_functions.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/include/raft/lap/detail/lap_functions.cuh b/cpp/include/raft/lap/detail/lap_functions.cuh index 3a801ff060..e03185f508 100644 --- a/cpp/include/raft/lap/detail/lap_functions.cuh +++ b/cpp/include/raft/lap/detail/lap_functions.cuh @@ -466,7 +466,7 @@ inline void dualUpdate(raft::handle_t const& handle, dim3 threads_per_block; int total_blocks; - rmm::device_scalar sp_min_v(handle.get_stream()); + rmm::device_uvector sp_min_v(SP, handle.get_stream()); raft::lap::detail::calculateLinearDims(blocks_per_grid, threads_per_block, total_blocks, SP); kernel_dualUpdate_1<<>>(