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
When I use a StaticMatrix from (StaticArrays.jl) inside a struct I get the following error. If I use the StaticMatrix without the struct everything works.
Julia 1.9.3
Enzyme v0.11.7 [7da242da]
StaticArrays v1.6.3 [90137ffa]
A minimal example:
using Enzyme, StaticArrays;
functionf(x, loss, M::SMatrix{2,2,Float64}, param)
# No problem with this multiplication
y1 = M * x
loss[] +=sum(y1)
# ERROR: Unsupported Active{SVector{3, Float64}}, consider Duplicated or Const
y2 = param.M * x
loss[] +=sum(y2)
returnnothingend
x =rand(2);
M =SMatrix{2,2,Float64}(1, 0, 0, 1);
struct params
M::SMatrix{2,2,Float64}endconst param =params(M);
autodiff(Reverse, f, Duplicated(x, zero(x)),
Duplicated([0.0], [1.0]),
Const(M),
Const(param));
When I use a StaticMatrix from (StaticArrays.jl) inside a struct I get the following error. If I use the StaticMatrix without the struct everything works.
A minimal example:
The text was updated successfully, but these errors were encountered: