aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/lower_if_op.cc
Commit message (Collapse)AuthorAge
* Copy device from If op to the lowered ops.Gravatar Saurabh Saxena2018-10-05
| | | | | | Enable GPU tests for cond_v2. PiperOrigin-RevId: 215956220
* Make cond_v2 If op lowering work in a defun + eager.Gravatar Skye Wanderman-Milne2018-10-01
| | | | | | | | | | | Prior to this change, the lowering pass assumed that the If op functions would be available in the If op's graph. If the If op is defined in a defun and then called via eager execution, the functions will be in the eager context, but not in the defun's graph. This change makes the lowering pass correctly use the function library passed in by the caller via GraphOptimizationPassOptions. PiperOrigin-RevId: 215271990
* Enables `If` operator lowering in cond_v2 when XLA is disabled. Lowering ↵Gravatar A. Unique TensorFlower2018-06-18
| | | | | | | | | | | | | | | | allows cond_v2 to avoid some of the limitations of Functions, allowing users to specify devices & colocation inside of cond_v2 branches, and enabling non-strict evaluation & partial pruning of branches. This brings cond_v2 closer to feature parity with tf.cond. However, we do not lower `If` in the XLA context because it is easier for XLA to apply its own optimizations when dealing with un-lowered `If` operators than with lowered switch/merge control flow. Also adds a toggleable flag in for InlineFunctionBody in function.cc that prevents the function caller device from overriding the devices of function body nodes. This is necessary for cond_v2 branches to support explicitly-specified devices. Adds several tests to make sure that: - lowering is usually enabled - lowering is disabled for XLA - node colocation inside of cond_v2 branches works - explicit device placement inside of cond_v2 branches works PiperOrigin-RevId: 201049850
* Merged commit includes the following changes:Gravatar A. Unique TensorFlower2018-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 200617269 by A. Unique TensorFlower: Internal change -- 200603378 by jpienaar: The output of the merge should be the value's and not the original output port. The output port of the IfOp is already taken into account by selecting the merge node and the output of the merge should be the value used (which is the 0th output of the merge node). -- 200601721 by A. Unique TensorFlower: Basic support for tf.tile that multiplies a single axis. -- 200600686 by A. Unique TensorFlower: Internal change. -- PiperOrigin-RevId: 200617269
* Add If op rewriter.Gravatar Jacques Pienaar2018-05-14
* 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