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
I have been trying to write a custom rule in the context of higher order differentiation. However, I simply cannot get it to work.
Happy to try to track this issue down further, but I don't know where to start.
The (relatively) minimal code is the following. The return of the custom rule is not the correct differential, but it is simple enough to try to work with.
using Enzyme
import.EnzymeRules: forward
Enzyme.API.printall!(true)
fun(x, y) = (x - y)^2functionforward(func::Const{typeof(fun)}, o, x, y::Const)
println("Custom Rule")
returnDuplicated(x.val + y.val, 1.0)
end
x =1.
y =1.1df(y) =autodiff(Forward, fun, Duplicated, Duplicated(x, 1.0), y)
df(y)
only(autodiff(
Forward,
yt ->autodiff_deferred(Forward, fun, Duplicated, Duplicated(x, 1.0), yt),
Duplicated,
Duplicated(y, 1.0)))
I have been trying to write a custom rule in the context of higher order differentiation. However, I simply cannot get it to work.
Happy to try to track this issue down further, but I don't know where to start.
The (relatively) minimal code is the following. The return of the custom rule is not the correct differential, but it is simple enough to try to work with.
This code returns the following Error
and the Enzyme trace
The text was updated successfully, but these errors were encountered: