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
using Enzyme
# As per previous error
Enzyme.API.strictAliasing!(false)
g(x) =mapreduce(identity, hcat, eachcol(x))
f(x) =sum(g(x))
X =zeros((10,10))
G =zeros((10,10))
autodiff(set_runtime_activity(ReverseWithPrimal), Const(f), Active, Duplicated(X,G))
The following fails as well, BUT ONLY IN A FRESH SESSION. Rerunning things makes it work for some reason. HOWEVER, for an application using something like the below, rerunning things does not make it work.
begin
using Enzyme
Enzyme.API.strictAliasing!(false)
h2(x) = x .- log(sum(exp.(x)))
h1(x) = vcat(
x[1],
h2(x[2:3]),
h2(x[4:6]),
x[7:end]
)
g(x) = mapreduce(h1, hcat, eachcol(x))
f(x) = sum(g(x))
X = zeros((10,10))
G = zeros((10,10))
autodiff(set_runtime_activity(ReverseWithPrimal), Const(f), Active, Duplicated(X,G))
end
The following fails:
Part of the output:
The following fails as well, BUT ONLY IN A FRESH SESSION. Rerunning things makes it work for some reason. HOWEVER, for an application using something like the below, rerunning things does not make it work.
Part of the output:
The text was updated successfully, but these errors were encountered: