| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
the most costly functions in Grappler.
PiperOrigin-RevId: 214853009
|
|
|
|
|
|
| |
Handle empty strings in NodePositionIfSameNode.
PiperOrigin-RevId: 214393567
|
|
|
|
| |
PiperOrigin-RevId: 214338100
|
|
|
|
|
|
| |
MutableGraphView was implemented so that the view could be updated when new nodes are added or connections changed. The current passes do not require it only because they do not do any optimization on already optimized nodes, but optimizations like MapFusion require it.
PiperOrigin-RevId: 206046420
|
|
|
|
|
|
|
|
|
| |
1) Rewrite a tree of Add/AddN ops with a single AddN,
if all shapes are symbolically equal
2) Lookup shape properties using GraphProperties instead
of direct access to Node attributes
PiperOrigin-RevId: 189131726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Actually remove nodes marked for removal if fetches are known.
* Remove trivial nodes even in the presence of control inputs, except
for Identity nodes when
a) they are anchored on an Identity following a Switch node and
removal would require anchoring a control identity on the Switch, or
b) they have control inputs and feed a Merge node.
* Remove nodes only when in_degree * out_degree <= in_degree + out_degree.
Move input deduping utility function to utils.{h,cc}.
PiperOrigin-RevId: 184858685
|
|
|
|
| |
PiperOrigin-RevId: 184589487
|
|
|
|
|
|
|
|
| |
utilities to a shared location.
Generalize the GetTailOfXXXChain to a more generic graph walker that takes a predicate functor that controls when to stop.
PiperOrigin-RevId: 176577743
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first two rewrites implemented are:
1. Turn nodes with only control outputs into NoOps, if we know that they are safe to remove. Such nodes can be produced, e.g., by rewrite rules in the arithmetic optimizer.
2. Completely disconnect NoOp nodes with at most 1 input or at most 1 output by rerouting their inputs to their outputs. The restriction on fan-in/fan-out guarantees that we reduce the number of control dependencies in the graph. The two (slightly) non-trivial cases are:
// Case a)
// x --^> +------+ x --^> +---+
// y --^> | NoOp | --^> a ==> y --^> | a |
// ... | | ... | |
// z --^> +------+ z --^> +---+
//
// Case b)
// +------+ --^> a +---+ --^> a
// x --^> | NoOp | --^> b ==> | x | --^> b
// | | ... | | ...
// +------+ --^> c +---+ --^> c
PiperOrigin-RevId: 175780178
|
|
|
|
| |
PiperOrigin-RevId: 169604180
|
|
|
|
| |
Change: 153959030
|
|
|
|
| |
Change: 150388263
|
|
|
|
| |
Change: 150289918
|
|
|
|
|
|
| |
to the node name.
Change: 149576194
|
|
Change: 149558284
|