-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indeterministic illegal instruction: 4 #1626
Comments
Unfortunately not, this feels like a GC error. The first thing I'd do is check if it's resolved by the GC fix in Julia 1.10.5 JuliaLang/julia#54851 If not definitely needs more minimization |
I compiled Julia with the backports from that PR, and am still seeing this issue. Any other ideas for where indeterminacy might come from? |
Alas not, this one will need to be minimized rather small if possible and
likely will take a bit longer to fix depending on cause
…On Thu, Jul 11, 2024 at 12:32 PM Markus Hauru ***@***.***> wrote:
I compiled Julia with the backports from that PR, and am still seeing this
issue. Any other ideas for where indeterminacy might come from?
—
Reply to this email directly, view it on GitHub
<#1626 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXBUIKKBTOZWPAIJCMTZL2XSXAVCNFSM6AAAAABKU5AC2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRTGM4DOMBWGI>
.
You are receiving this because you commented.Message ID: <EnzymeAD/Enzyme.
***@***.***>
|
Sorry to add context the fix is likely trivial, finding the cause will
likely take time
…On Thu, Jul 11, 2024 at 12:33 PM Billy Moses ***@***.***> wrote:
Alas not, this one will need to be minimized rather small if possible and
likely will take a bit longer to fix depending on cause
On Thu, Jul 11, 2024 at 12:32 PM Markus Hauru ***@***.***>
wrote:
> I compiled Julia with the backports from that PR, and am still seeing
> this issue. Any other ideas for where indeterminacy might come from?
>
> —
> Reply to this email directly, view it on GitHub
> <#1626 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJTUXBUIKKBTOZWPAIJCMTZL2XSXAVCNFSM6AAAAABKU5AC2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRTGM4DOMBWGI>
> .
> You are receiving this because you commented.Message ID: <EnzymeAD/Enzyme
> .***@***.***>
>
|
MWE that only depends on StdLib:
Output:
I get that something like 1/20 times, the rest of the times everything passes without issue. Tested on Enzyme v0.12.23, Enzyme_jll v0.0.134+0. This is quite finicky and minimisation is hard, are you good to take this from here @wsmoses? |
Presently trying to see if can repro in a debug julia with rr. |
@mhauru to confirm does this fail still with the backports PR. I'm having difficulty reproducing. Was there anything that reduced the probability that can be reverted [even if sadly making less simple]
|
Yeah, I'm running a Julia from commit 48e140b, so all except the very last commit from the backports PR. It's pretty bad with the randomness. Can you confirm that you can at least get it to trigger by running it 100 times, maybe without
I can probably find something in the git history that fails more often but relies on extra dependencies, give me a moment. |
This seems to error out closer to half the time, or maybe a third:
|
@mhauru with the fix to the other memory issue [and apparent issues I have reproducing this], can you confirm this still fails? |
|
In the reverse pass, we have an atomic load, from a previous stack to heap'd value. We decide to lower it back to a stack, believing we can recompute it. This is wrong as we can't -- and have an undefined load as a result. in diffejulia_ressatellite_model_matrix_3508 %3 = alloca { {} addrspace(10)*, i32, i64 }, i64 1, align 8
%4 = bitcast { {} addrspace(10)*, i32, i64 }* %3 to i8*
%9 = bitcast i8* %4 to { {} addrspace(10)*, i32, i64 }*
%getfield_addr = getelementptr inbounds { {} addrspace(10)*, i32, i64 }, { {} addrspace(10)*, i32, i64 }* %9, i64 0, i32 0, !dbg !3301
%getfield = load atomic {} addrspace(10)*, {} addrspace(10)** %getfield_addr unordered, align 8, !dbg !3301 |
Nondeterminstic in enzyme repro: https://fwd.gymni.ch/kWvrgB |
Resolved but due to the bug in the julia compiler itself on this code, requires use of Julia 1.10.5 or waiting til backported. x/ref JuliaLang/julia#55306 and JuliaLang/julia#55305 |
About half of the time when I run this it passes fine, the other half it crashes with
I appreciate the MWE probably needs more minimisation, but if you have any pointers as to where the indeterminism might be coming from, that would be great.
Enzyme v0.12.22.
The text was updated successfully, but these errors were encountered: