Commit 8cc14c54 authored by Adrian Kuegel's avatar Adrian Kuegel Committed by TensorFlower Gardener
Browse files

Make sure that we can fuse diamond shaped graphs.

We have some logic which does a global analysis of the graph to
determine if we want to allow duplication of specific instructions.
This logic however does not take into account whether actually
duplication is needed because the analysis runs on the original
graph and is not recomputed when nodes are fused. For the GPU
and CPU backends, we run the fusion pass twice: once where we
disallow *all* duplications, and once where we allow *some*
duplications. The global analysis is therefore not needed if we
disallow *all* duplications, and then we can successfully fuse
diamond-shaped graphs because we do a reverse postorder traversal
through the graph.

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