Don't cluster nodes that have inputs with mismatching deadness
TensorFlow allows nodes to have some live inputs and some dead inputs. The
executor does not execute these nodes but instead propagates a dead signal to
all their outputs (i.e. these nodes are treated as fully dead).
This is a problem for auto-clustering because it means auto-clustering can kill
nodes that used to be alive. For instance say before clustering we have a graph
like
digraph {
Alive0 -> P
Alive1 -> Q
Dead -> R
P -> X
Q -> X
Q -> Y
R -> Y
}
and we cluster P, Q, R, X and Y into a single XLA cluster.
Then after clustering both X and Y are dead because the cluster is a single node
as far as the executor is concerned and said node won't get scheduled if any of
its inputs are dead.
This CL introduces a static analysis pass that our auto-clustering code can use
to ensure nodes that have inputs with mismatching deadness (like "Y" in the
example graph) are not included in XLA clusters.
PiperOrigin-RevId: 205143316
Loading
Please sign in to comment