Test cxx11_tensor_expr fails on AArch64 (armv8.1-a) with Neon
The test cxx11_tensor_expr
fails on AArch64 (armv8.1-a):
Initializing random number generator with seed 1593792769
Repeating each test 10 times
actual = nan
expected = 0
Test test_minmax_nan_propagation() failed in ../unsupported/test/cxx11_tensor_expr.cpp (323)
test_is_equal(vec_res(i), Scalar(0), true)
Stack:
- test_minmax_nan_propagation()
- cxx11_tensor_expr
- Seed: 1593792769
[1] 4184 abort (core dumped) ./cxx11_tensor_expr
Minimal reproducible example:
Eigen::Tensor<float, 1> vec_nan(10), vec_zero(10), vec_res(10);
const float qnan = std::numeric_limits<float>::quiet_NaN();
vec_nan.setConstant(qnan);
vec_zero.setZero();
vec_res.setZero();
vec_res = vec_zero.cwiseMax(qnan); // Should be 0 but is 8xNaN and 2x0
If vectorization is disabled this works as expected (that's most likely the reason the remainder of two float32x4_t
packets is correct but the packets themself are not).