remove kDepXOut for abs_grad op, test=develop (#21407)

revert-21172-masked_select_api
Leo Chen 6 years ago committed by GitHub
parent 407f883f5a
commit add62acfd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,12 +41,6 @@ enum ActBwdOpFwdDeps {
kNoDeps = 0x00, // Do not need any forward input/output
kDepX = 0x01, // Only need forward input X
kDepOut = 0x02, // Only need forward output Out
// Never add kDepXOut, because Out can be always calculated
// by forward input X in backward part.
// FIXME(zjl): but in MKLDNN abs, X and Out are all needed...
// Developers should not rely on this enum value!
kDepXOut = 0x03
};
/* The following operator can be used to process SelectedRows, because the
@ -769,7 +763,7 @@ struct AbsGradFunctor : public BaseActivationFunctor<T> {
dx.device(d) = dout * x.sign();
}
static constexpr ActBwdOpFwdDeps FwdDeps() { return kDepXOut; }
static constexpr ActBwdOpFwdDeps FwdDeps() { return kDepX; }
};
// reciprocal(x) = 1 / x

Loading…
Cancel
Save