Seriously incorrect computation in Juno REPL?

See this
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)

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: Conv layers with CPU backend randomly mixes up batch dimensions · Issue #982 · FluxML/Flux.jl · GitHub

1 Like