Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 3516962

Browse files
committed
Use consistent tag types
1 parent e58deb0 commit 3516962

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ext/SparseDiffToolsZygote.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ function SparseDiffTools.numback_hesvec(f, x, v)
4141
end
4242

4343
function SparseDiffTools.autoback_hesvec!(dy, f, x, v,
44-
cache1 = Dual{typeof(ForwardDiff.Tag(DeivVecTag, eltype(x))),
44+
cache1 = Dual{typeof(ForwardDiff.Tag(DeivVecTag(), eltype(x))),
4545
eltype(x), 1
4646
}.(x,
4747
ForwardDiff.Partials.(Tuple.(reshape(v, size(x))))),
48-
cache2 = Dual{typeof(ForwardDiff.Tag(DeivVecTag, eltype(x))),
48+
cache2 = Dual{typeof(ForwardDiff.Tag(DeivVecTag(), eltype(x))),
4949
eltype(x), 1
5050
}.(x,
5151
ForwardDiff.Partials.(Tuple.(reshape(v, size(x))))))
5252
g = let f = f
5353
(dx, x) -> dx .= first(Zygote.gradient(f, x))
5454
end
55-
cache1 .= Dual{typeof(ForwardDiff.Tag(DeivVecTag, eltype(x))), eltype(x), 1
55+
cache1 .= Dual{typeof(ForwardDiff.Tag(DeivVecTag(), eltype(x))), eltype(x), 1
5656
}.(x, ForwardDiff.Partials.(Tuple.(reshape(v, size(x)))))
5757
g(cache2, cache1)
5858
dy .= partials.(cache2, 1)

0 commit comments

Comments
 (0)