Registered Member
|
Hi,
How stable are the Eigen Results in terms of repeatability? Does vectorization of the code changes results between different runs, versions? Thanks S |
Moderator
|
Vectorization essentially affects the result of reductions, and consequently the result of any operations involving reductions (e.g., dot product, matrix products, etc.). So depending on the compilation flags and eigen versions, results might slightly vary because of the non associativity of floating point arithmetic.
|
Registered Member
|
But does this mean that two different runs of the same algorithm (both with vectorization on) can yield different results? If not, then what about machines with different architectures (with similar precision)? |
Moderator
|
Two runs of the same binary code on the same computer will produce the same result, but if you change the version of Eigen, or some compilation flags (vectorization, multi-threading), or change the processor (different number of cores with multi-threading enabled, different size of cache), then you might get very slightly different results up to rounding errors.
Note that the same remarks apply to any optimized BLAS library. |
Registered Member
|
ggael, Do you mean this happens irrespective of vectorization ON or OFF? |
Moderator
|
yes, for instance, if you do a scalar product between two vectors a and b, (i.e., sum_i a_i * b_i) we do not specify in which order the sums are carried out, and since (x+y)+z is not equal to x+(y+z) the results might be slightly differ. Again, that's not specific to Eigen and apply to any BLAS library.
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft