Seriously incorrect computation in Juno REPL?

See this
https://discourse.julialang.org/t/alarming-incorrect-computation-in-flux-juno/33017
But I am flagging it here because it seems to be a problem in Juno, and is very serious. Someone here should have a look as well.

The results of this simple computation (below) should be deterministic,
and seem to be outside of Juno, but in the Juno REPL there is a big error (far beyond flowing point numerics).

The simplest way to reporduce it:

    using Flux
    batchsize = 2
    ii = randn(Float32, 5,4,3,batchsize)
    ll = Conv((3,3), 3=>3)
    maximum(ll(ii)-ll(ii))

It is just creating a random matrix ii, then passing it through a small convolution, twice, and looking at the maximum difference in results. Which should be zero, but sometimes is a huge value like 5.

Repeat the last line about 10 times to see the problem.

This occurs in an Atom 1.42 installed two days ago, Julia1.3.1+Flux 0.9,

but does not happen when running the same Julia in the terminal, as described in the linked post.

OK, I may be wrong. Though it does not happen in the terminal, someone said it did happen for them.

So maybe not a Juno problem!

It is a thread safety issue: https://github.com/FluxML/Flux.jl/issues/982#issuecomment-571471224

1 Like