Commit 1c7661be authored by Jacques Pienaar's avatar Jacques Pienaar Committed by TensorFlower Gardener
Browse files

[TF2XLA] Flow down across switch edges separately.

* Change the way that the clustering was done by flowing down along the branches of the switch node separately;
  - It was previously wrong to assume that the operands of an op are in the same control scope if they are not a switch or a merge node, as a zero-input op (such as a const) could be referenced by both "branches" of a switch without this op not being exclusively in either branch.
* Change from matching a switch for a merge cluster, to matching a merge for a switch cluster:
  - The new matching considers switch-merge subgraphs where all nodes within the subgraph are dominated by the switch nodes, so reversing the matching makes it easier to perform the dominance checking.
  - This allows for cases where there is a cluster with a control dependency on a switch node and used by a branch of the switch.

PiperOrigin-RevId: 176446211
parent cf57817f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment