The CPU JIT bug was a good catch. I just found out that this code produced wrong results on CPU backend (thanks @Myhroun for detecting weird numbers in a larger code base):
#include <arrayfire.h> int main() { double data_[] = {1., 2., 3., 4.}; af::array a{2, 2, data_}; af::array b{2, 2, data_}; a + a; // remove this line and everything is fine af::print("difference", af::flat(a) - af::flat(b)); // nonzero difference! }
And while browsing through the arrayfire code, I saw this commit that fixed the issue for me. Thank you and I am looking forward to a new release (or backport :-) ).