Skip to content

Commit 9cf7f44

Browse files
committed
fix
1 parent e7c744e commit 9cf7f44

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/rules/parallelrules.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,6 @@ end
466466

467467
if mode == API.DEM_ReverseModeGradient
468468
v = lookup_value(gutils, v, B)
469-
if !(pv isa Nothing)
470-
pv = lookup_value(gutils, pv, B)
471-
end
472469
end
473470

474471
else
@@ -528,8 +525,8 @@ end
528525
end
529526

530527
if value_type(dv) != spllty
528+
pv = dv
531529
if width == 1
532-
pv = dv
533530
dv = load!(fwdbuilder, spllty, dv)
534531
if dv2 !== nothing
535532
dv = recombine_value!(fwdbuilder, dv, dv2)
@@ -745,6 +742,7 @@ end
745742

746743
for (pv, val, pllty) in copies
747744
ld = load!(B, pllty, val)
745+
pv = lookup_value(gutils, pv, B)
748746
store!(B, ld, pv)
749747
end
750748
return nothing

0 commit comments

Comments
 (0)