Open dpsanders opened 4 years ago
I wonder if we need to open an unstream issue on julia itself about this.
I tried
@inline function rrule(::typeof(*), x::Number, y::Number)
@inline function times_pullback(ΔΩ)
return (NO_FIELDS, ΔΩ * y', x' * ΔΩ)
end
return x * y, times_pullback
end
which seems to work correctly with intervals.
Time to Inline All The Things?
We can at least add it to @scalar_rule
.
I am hesitant to add it to everything, nor to add it to the best practices; because visual noise. but we might want to at least mentioned it as a thing that can be considered in best practices?
The following MWE does not inline when using intervals from
IntervalArithmetic.jl
:Cf. the beautiful code when using floats: