Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround subarray test failure due to associativity. (#29386)
| subarray: Test Failed at /usr/share/julia/test/subarray.jl:611 | Expression: #= /usr/share/julia/test/subarray.jl:611 =# @inferred(sum(Base.unaliascopy(V))) == sum(V) == sum(A[2:5, :, 2:5, 1:2:5]) | Evaluated: 121.8579669083425 == 121.8579669083425 == 121.85796690834263 A = rand(5,5,5,5) V = view(A, 2:5, :, 2:5, 1:2:5) @code_typed sum(V) # calls mapfoldl @code_typed sum(A[2:5, :, 2:5, 1:2:5]) # calls mapreduce mapreduce doesn't guarantee the associativity, which is likely the cause of this precision issue in random sum. (cherry picked from commit 518f548)
- Loading branch information