Skip to content

Commit

Permalink
fix incorrect reduction when there's fewer bins than jobs (#2984)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes-intel authored Nov 21, 2024
1 parent 14f4e79 commit 49c0200
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ inline void merge_stat(Float& dst_count,
Float src_s2c) {
if (Float(0) == src_count)
return;
if (!dst_count) {
dst_count = src_count;
dst_mean = src_mean;
dst_s2c = src_s2c;
return;
}

Float sum_n1n2 = dst_count + src_count;
Float mul_n1n2 = dst_count * src_count;
Expand Down

0 comments on commit 49c0200

Please sign in to comment.