swift
607228c6 - [AutoDiff] Unify 'shouldDifferentiateInstruction' between JVP and VJP. (#27421)

Commit
6 years ago
[AutoDiff] Unify 'shouldDifferentiateInstruction' between JVP and VJP. (#27421) Differentiation conditions were inconsistent between JVP and VJP. Originally, `shouldDifferentiateInstruction` blindly differentiated any side-effecting instruction that has active operands. This worked well with VJP but not with JVP, so #26743 added more specific conditions for JVP, but they did not work well with VJP because activity analysis was not yet unified. Now that activity analysis has been unified by #27358, `shouldDifferentiateInstruction` no longer needs to distinguish between JVP and VJP, and the JVP differentiation conditions now apply to VJP as well. This PR makes both JVP and VJP use the same differentiation conditions. All existing tests pass. Fixes [TF-800](https://bugs.swift.org/browse/TF-800).
Author
Parents
Loading