Skip to content

Commit bcfb32d

Browse files
committed
Fix
1 parent c9156b2 commit bcfb32d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • DifferentiationInterface/ext/DifferentiationInterfaceEnzymeExt

DifferentiationInterface/ext/DifferentiationInterfaceEnzymeExt/utils.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,19 @@ function _translate_prepared!(dc, c_wrapped::DI.Cache, ::Val{B}) where {B}
175175
end
176176

177177
function _translate_prepared!(
178-
_dc, c_wrapped::Union{DI.ConstantOrCache,DI.FunctionContext}, ::Val{B}
178+
dc, c_wrapped::Union{DI.ConstantOrCache,DI.FunctionContext}, ::Val{B}
179179
) where {B}
180180
c = DI.unwrap(c_wrapped)
181181
if isnothing(dc)
182182
return Const(c)
183183
else
184184
# make_zero!(dc) # doesn't work because of immutable values
185185
if B == 1
186-
dc = make_zero(c)
187-
return Duplicated(c, dc)
186+
dc_new = make_zero(c)
187+
return Duplicated(c, dc_new)
188188
else
189-
dc = ntuple(_ -> make_zero(c), Val(B))
190-
return BatchDuplicated(c, dc)
189+
dc_new = ntuple(_ -> make_zero(c), Val(B))
190+
return BatchDuplicated(c, dc_new)
191191
end
192192
end
193193
end

0 commit comments

Comments
 (0)