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
Even very simple broadcasting can't infer in Diffractor forward mode
Consider:
using Diffractor using Diffractor: TaylorBundle, ZeroBundle, CompositeBundle forward = Diffractor.∂☆{1}() f(x) = 2 .* x cb = CompositeBundle{1, Tuple{Float64, Float64}}((TaylorBundle{1}(1.0, (1.0,)), TaylorBundle{1}(1.0, (2.0,)))) @code_warntype forward(ZeroBundle{1}(f), cb)
The output is
julia> @code_warntype forward(ZeroBundle{1}(f), cb) MethodInstance for (::Diffractor.∂☆{1})(::ZeroBundle{1, typeof(f)}, ::CompositeBundle{1, Tuple{Float64, Float64}, Tuple{Diffractor.TangentBundle{1, Float64, Diffractor.TaylorTangent{Tuple{Float64}}}, Diffractor.TangentBundle{1, Float64, Diffractor.TaylorTangent{Tuple{Float64}}}}}) from (::Diffractor.∂☆{N})(args::Diffractor.AbstractTangentBundle{N}...) where N @ Diffractor ~/.julia/packages/Diffractor/a9mlv/src/stage1/forward.jl:148 Static Parameters N = 1 Arguments #self#::Core.Const(Diffractor.∂☆{1}()) args::Tuple{ZeroBundle{1, typeof(f)}, CompositeBundle{1, Tuple{Float64, Float64}, Tuple{Diffractor.TangentBundle{1, Float64, Diffractor.TaylorTangent{Tuple{Float64}}}, Diffractor.TangentBundle{1, Float64, Diffractor.TaylorTangent{Tuple{Float64}}}}}} Body::Any 1 ─ %1 = Core.apply_type(Diffractor.∂☆internal, $(Expr(:static_parameter, 1)))::Core.Const(Diffractor.∂☆internal{1}) │ %2 = (%1)()::Core.Const(Diffractor.∂☆internal{1}()) │ %3 = Core._apply_iterate(Base.iterate, %2, args)::Any └── return %3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Even very simple broadcasting can't infer in Diffractor forward mode
Consider:
The output is
The text was updated successfully, but these errors were encountered: