Skip to content

Commit b050c39

Browse files
committed
fix bug in broadcasting with TrackedReal
1 parent a78ae74 commit b050c39

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/derivatives/broadcast.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ end
222222
@noinline function special_forward_exec!(instruction::SpecialInstruction{typeof(∇broadcast)})
223223
input, output = instruction.input, instruction.output
224224
results, df, _ = instruction.cache
225+
pull_value!.(input)
225226
broadcast!(df, results, value.(input)...)
226227
output_value = value(output)
227228
output_value .= DiffResults.value.(results)
@@ -266,6 +267,7 @@ end
266267
input, output = instruction.input, instruction.output
267268
f = instruction.cache[1]
268269
output_value = value(output)
270+
pull_value!.(input)
269271
broadcast!(f, output_value, value.(input)...)
270272
return nothing
271273
end

0 commit comments

Comments
 (0)