We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here's a MWE for an error I experienced:
julia> using Enzyme julia> function f(x) y = (x + im)*(x - im) real(y) end f (generic function with 1 method) julia> autodiff(f, Active(2.0)) 4.0julia> function g(x) y = (x + im)*(1 - im*x) real(y) end g (generic function with 1 method) julia> autodiff(g, Active(2.0))define dso_local double @preprocess_julia_overdub_1835(double) local_unnamed_addr { top: %1 = bitcast double %0 to i64 %2 = and i64 %1, -9223372036854775808 %3 = bitcast i64 %2 to double %4 = fsub double 1.000000e+00, %3 %5 = fmul double %4, %0 %6 = fadd double %5, %0 ret double %6 } constantinst[ %1 = bitcast double %0 to i64] = 0 val:0 type: {[-1]:Float@double} constantinst[ %2 = and i64 %1, -9223372036854775808] = 0 val:0 type: {[-1]:Float@double} constantinst[ ret double %6] = 1 val:1 type: {} constantinst[ %3 = bitcast i64 %2 to double] = 0 val:0 type: {[-1]:Float@double} constantinst[ %4 = fsub double 1.000000e+00, %3] = 0 val:0 type: {[-1]:Float@double} constantinst[ %5 = fmul double %4, %0] = 0 val:0 type: {[-1]:Float@double} constantinst[ %6 = fadd double %5, %0] = 0 val:0 type: {[-1]:Float@double} cannot handle unknown binary operator: %2 = and i64 %1, -9223372036854775808 ERROR: LLVM error: unknown binary operator Stacktrace: [1] handle_error(::Cstring) at /home/mason/.julia/packages/LLVM/dVU7J/src/core/context.jl:105
The text was updated successfully, but these errors were encountered:
Oh this is a pretty interesting bithack that Julia seems to have emitted (signed zero(x) == and(x, MAGIC NUM)).
Usually horrible bithacks of active values tend not to be handled in Enzyme automatically but this one should be easy to ensure happens.
I'll make a patch to Enzyme proper and we'll propagate that to Enzyme.jl shortly
Sorry, something went wrong.
Merged in #31
Successfully merging a pull request may close this issue.
Here's a MWE for an error I experienced:
The text was updated successfully, but these errors were encountered: