| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
Enable GPU tests for cond_v2.
PiperOrigin-RevId: 215956220
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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
|