Description
With #163 we effectily decided that as far as we are concerned, julia only has single output functions.
in #163 we made the approprate changes for rrules
which was that pullbacks need to take a single input, which might be a Composite{Tuple}
.
But we have not made the change for forward mode, at least not consistently or to the @scalar_rule
macro.
An example (and possibly the only example) of this problem is:
We currently have
julia> frule((Zero(), 1.0), sincos, π)
((1.2246467991473532e-16, -1.0), (-1.0, -1.2246467991473532e-16))
But we should have:
julia> frule((Zero(), 1.0), sincos, π)
((1.2246467991473532e-16, -1.0), Composite{Tuple{Float64, Float64}}(-1.0, -1.2246467991473532e-16))
This should be changed in this section:
ChainRulesCore.jl/src/rule_definition_tools.jl
Lines 157 to 162 in 0fe9da8
This issiue becomes more pressing with #207 because that macro can't trivially know if a function is returnig multiple outputs, but if we say multiple outputs don't exist, then it is easy.