mean() is returning different results for CuArray vs regular Int64 array.
using CUDA
using Statistics
INT = rand(Int64, 100000000)
CUDA_INT = CuArray(INT)
I get 7.086957573875891e14 for mean(INT) and -2.8149924332010597e10 for mean(CUDA_INT)
Also, I get the following error the first time I run mean(CUDA_INT)
┌ Error: Cannot use NVML, as it failed to initialize
│ exception =
│ NVML could not be initialized (NVML_ERROR_DRIVER_NOT_LOADED)
But subsequent runs of mean(CUDA_INT) do not produce the error.
I am running Julia inside WSL2 on Windows 10.
I also tried doing the same thing with Float64, but both regular array and CuArray produce the same mean().