You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ran into this while trying to reproduce another bug.
The following code errors:
using Diffractor
# this is needed as transform! is *always* called on Arguments regardless of what visit_custom saysidentity_transform!(ir, ssa::Core.SSAValue, order) = ir[ssa]
functionidentity_transform!(ir, arg::Core.Argument, order)
return Core.Compiler.insert_node!(ir, Core.SSAValue(1), Core.Compiler.NewInstruction(Expr(:call, Diffractor.ZeroBundle{1}, arg), Any))
endfunctionphi_run(x::Float64, b1::Bool, b2::Bool)
if b1
a =0.elseif b2
a = z
endreturn x - a
end
input_ir =first(only(Base.code_ircode(phi_run, Tuple{Float64, Bool, Bool})))
Diffractor.forward_diff_no_inf!(copy(input_ir), Core.SSAValue.(1:length(input_ir.stmts)) .=>1; transform! = identity_transform!)
I think the fix is easy, add the case to forward_visit about what to do for this kind of node.
Which i think is return nothing
The text was updated successfully, but these errors were encountered:
Ran into this while trying to reproduce another bug.
The following code errors:
I think the fix is easy, add the case to
forward_visit
about what to do for this kind of node.Which i think is
return nothing
The text was updated successfully, but these errors were encountered: