Skip to content

Commit b51681f

Browse files
committed
use predefined tag
1 parent 62cdc52 commit b51681f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/differentiation/compute_hessian_ad.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ mutable struct ForwardAutoColorHesCache{TJC,TG,TS,TC}
108108
colorvec::TC
109109
end
110110

111+
struct AutoAutoTag end
112+
111113
function ForwardAutoColorHesCache(f,
112114
x::AbstractVector{V},
113115
colorvec::AbstractVector{<:Integer}=eachindex(x),
@@ -117,7 +119,7 @@ function ForwardAutoColorHesCache(f,
117119
sparsity = sparse(ones(length(x), length(x)))
118120
end
119121

120-
tag = ForwardDiff.Tag(f, V)
122+
tag = ForwardDiff.Tag(AutoAutoTag(), V)
121123
chunksize = ForwardDiff.pickchunksize(maximum(colorvec))
122124
chunk = ForwardDiff.Chunk(chunksize)
123125

0 commit comments

Comments
 (0)