diff options
author | Nick Desaulniers <ndesaulniers@google.com> | 2018-04-16 13:36:55 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-16 13:47:09 -0700 |
commit | d54acdc8f669079301e4858b7675f2bbedea8190 (patch) | |
tree | bc65ff964995f8f15bb0f088a45b501b5decde1c /tensorflow/compiler/xla/service/algebraic_simplifier.cc | |
parent | c877eb3fcdff70ed43bfbd54df9eb678e3268eb5 (diff) |
[XLA] Document and enforce reduction order of init value
All existing backends apply the init_value on the lhs, except for the evaluator. This causes problems for reductions which apply an identity function to a reduce or reduce window.
PiperOrigin-RevId: 193091323
Diffstat (limited to 'tensorflow/compiler/xla/service/algebraic_simplifier.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/algebraic_simplifier.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/algebraic_simplifier.cc b/tensorflow/compiler/xla/service/algebraic_simplifier.cc index cd5737e4f9..8d26938c6e 100644 --- a/tensorflow/compiler/xla/service/algebraic_simplifier.cc +++ b/tensorflow/compiler/xla/service/algebraic_simplifier.cc @@ -1695,7 +1695,7 @@ Status AlgebraicSimplifierVisitor::HandleReduce(HloInstruction* reduce) { HloInstruction::CreateReshape(reduce->shape(), arg)); return ReplaceWithNewInstruction( reduce, HloInstruction::CreateMap(reduce->shape(), - {reshape, init_value}, function)); + {init_value, reshape}, function)); } return Status::OK(); } |