Commit 745eb924 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower Committed by TensorFlower Gardener
Browse files

Fix tests that prevent enabling the dependency optimizer in grappler.

  - Most of these use constant inputs that cause the new optimizer to turn various backprop nodes into NoOps because their outputs are not consumed.

Improve or fix a few issues in the dependency optimizer:
  - Prune duplicate control inputs. Don't add new control inputs if the target already has the source as a regular input.
  - Don't turn Merge, Switch, Enter, Exit, NextIteration, _TPUExecute or _TPUCompile nodes into NoOps.
  - Don't call ConstantFolding::AddControlDependency() when re-routing, since the nodes
    in questions already have control inputs, so cannot be Switch nodes.
  - Don't clear inputs from NoOps unless we know the fetch nodes.

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