Add If op rewriter.
authorJacques Pienaar <jpienaar@google.com>
Mon, 14 May 2018 21:04:05 +0000 (14:04 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 14 May 2018 21:06:56 +0000 (14:06 -0700)
commit321d69b55a61a623360b70fc96dac2c7e1f71ad3
tree14eb0828317db10d07cb7485093fcfab86d0d5a8
parent22a5e527e99124b57f05e281f5a07e894a9000ff
Add If op rewriter.

* Add attribute to If op to indicate if lowering to switch-merge form is
  needed;
* Add initial version of If op rewriter than transforms a If op into
  switch/merge nodes (as would have been constructed via tf.cond) if the If op
  has the lowering attribute set.
  - The pass is not ready for general use and, for example, does not support
    reference data types.

PiperOrigin-RevId: 196563421
tensorflow/core/BUILD
tensorflow/core/common_runtime/lower_if_op.cc [new file with mode: 0644]
tensorflow/core/common_runtime/lower_if_op.h [new file with mode: 0644]
tensorflow/core/common_runtime/lower_if_op_test.cc [new file with mode: 0644]