You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] A column with one infinity sums to NaN in raft::stats::sum #3232
Put one positive infinity in a column of 32 floats and fill the rest with ones. raft::stats::sum returns NaN. The same thing happens with a single negative infinity and with doubles.
The example should print inf. Changing the first entry to negative infinity should give -inf. A column that contains both signs of infinity should still give NaN.
Environment
RAFT main at b74966f, CUDA 12.9.1, GeForce GTX 1660 SUPER, driver 580.159.03. The example was compiled against the source headers with nvcc in the nvidia/cuda:12.9.1-devel-ubuntu24.04 image on Vast.ai.
Additional context
The running sum reaches infinity, then the compensation step subtracts infinity from itself and gets NaN. Adding that correction back changes the result. A local patch keeps the ordinary partial sum when it is already nonfinite. The same example prints inf with that patch.
Activity