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
The pullbacks returned by @non_differentiable-generated rrule would ideally be identical for the same type signature. Presumably this could help compilation latency and type stability in user code.
Test:
f(x) =rand()*x*0.1g(x) =rand()*x*0.2using ChainRulesCore
@non_differentiablef(::Any)
@non_differentiableg(::Any)
using Test
@testlast(rrule(f, 0.3)) ===last(rrule(g, 0.4))
Failure:
julia> @testlast(rrule(f, 0.3)) ===last(rrule(g, 0.4))
Test Failed at REPL[7]:1
Expression: last(rrule(f, 0.3)) === last(rrule(g, 0.4))
Evaluated: var"#f_pullback#2"() === var"#g_pullback#4"()
ERROR: There was an error during testing
I'm not good with macros so I probably won't be tackling this.