DiffRules.jl
DiffRules.jl copied to clipboard
no type annotations
Note that differentiation rules are purely symbolic, so no type annotations should be used.
should some of the differentiation rules like (+)(a,b) -> (1, 1) use the one(a), function instead? Some types might deliberately not implement implicit integer conversion.
Possibly. This is at least something that needs deciding - how tied to "Julia" is the DiffRules format? If it's agnostic, we should keep 1 and then downstream consumers can convert how they'd like. Otherwise, we should probably change many other things in order to better support Julia-specific code generation. I think we're moving in that direction anyway...