Skip to content

Commit

Permalink
Fix caching for forwarderr
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Apr 15, 2024
1 parent 1f62a0d commit a5a40bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion enzyme/Enzyme/CallDerivatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,8 @@ bool AdjointGenerator::handleKnownCallDerivatives(
}

// Cache and rematerialization irrelevant for forward mode.
if (Mode == DerivativeMode::ForwardMode) {
if (Mode == DerivativeMode::ForwardMode ||
Mode == DerivativeMode::ForwardModeError) {
eraseIfUnused(call);
return true;
}
Expand Down

0 comments on commit a5a40bc

Please sign in to comment.