Skip to content

Commit

Permalink
Fix OMP row reduction kernel
Browse files Browse the repository at this point in the history
The kernel requested more memory than necessary in most scenarios
because of a faulty temporary storage estimation.
  • Loading branch information
Thomas Grützmacher committed Jul 11, 2023
1 parent d60b02c commit 1281ef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omp/base/kernel_launch_reduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ void run_kernel_col_reduction_sized_impl(
const auto reduction_size =
ceildiv(reduction_kernel_oversubscription * num_threads, cols);
const auto rows_per_thread = ceildiv(rows, reduction_size);
const auto required_storage = sizeof(ValueType) * rows * reduction_size;
const auto required_storage = sizeof(ValueType) * cols * reduction_size;
if (tmp.get_num_elems() < required_storage) {
tmp.resize_and_reset(required_storage);
}
Expand Down

0 comments on commit 1281ef4

Please sign in to comment.