Implement unary chain hoisting optimization for Concat, Split, and SplitV.
For Concat, hoist prefix chains of unary ops before concatenation, e.g.
// Rewrites
// Concat({Cos(Exp(a)), Cos(Exp(b)), Cos(Exp(c))})
// into
// Cos(Exp(Concat({a, b, c}))).
For Split/SplitV hoist unary postfix chains before the split, e.g.
// Rewrites
// [Cos(Exp(y)) for y in Split(x)]
// into
// [y for y in Split(Cos(Exp(x)))].
The new optimization is off by default.
PiperOrigin-RevId: 194850318
Loading
Please sign in to comment