Skip to content

Conversation

@cdluminate
Copy link
Contributor

@cdluminate cdluminate commented Sep 27, 2018

The failure was spotted on Ubuntu builds.

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 spotted in the sum of random numbers.

@ginggs

| 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.
@fredrikekre fredrikekre added the arrays [a, r, r, a, y, s] label Sep 27, 2018
@fredrikekre fredrikekre requested a review from mbauman September 27, 2018 08:40
@mbauman
Copy link
Member

mbauman commented Oct 15, 2018

Thanks!

@mbauman mbauman merged commit 518f548 into JuliaLang:master Oct 15, 2018
KristofferC pushed a commit that referenced this pull request Oct 19, 2018
| 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)
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
| 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)
KristofferC pushed a commit that referenced this pull request Feb 20, 2020
| 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrays [a, r, r, a, y, s]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants