Skip to content

Commit

Permalink
Merged commit includes the following changes:
Browse files Browse the repository at this point in the history
179858783  by gunan:

    [XLA] Add a pass to replace all non-side-effecting and removable zero sized
    HLOs.

--
179853916  by A. Unique TensorFlower:

    Fix missing backtick in parse_example docstring, causing wrong markdown formatting.

--
179852823  by apassos:

    Another attempt at adding int64 indices to Fill.

--
179852553  by A. Unique TensorFlower:

    Stop grappler optimization to reorder BiasAdd ops.

--
179850703  by yaozhang:

    Support reverse op.

--
179850204  by blakehechtman:

    [XLA] Add a pass to replace all non-side-effecting and removable zero sized
    HLOs.

--

PiperOrigin-RevId: 179858783
  • Loading branch information
tensorflower-gardener committed Dec 21, 2017
1 parent 5b03666 commit 7989a3a
Show file tree
Hide file tree
Showing 12 changed files with 344 additions and 240 deletions.
2 changes: 2 additions & 0 deletions tensorflow/core/grappler/op_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ bool IsRestore(const NodeDef& node) {
node.op() == "RestoreSlice");
}

bool IsReverseV2(const NodeDef& node) { return node.op() == "ReverseV2"; }

bool IsRsqrtGrad(const NodeDef& node) { return node.op() == "RsqrtGrad"; }

bool IsSelect(const NodeDef& node) { return node.op() == "Select"; }
Expand Down
1 change: 1 addition & 0 deletions tensorflow/core/grappler/op_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ bool IsRecv(const NodeDef& node);
bool IsReduction(const NodeDef& node);
bool IsReshape(const NodeDef& node);
bool IsRestore(const NodeDef& node);
bool IsReverseV2(const NodeDef& node);
bool IsRsqrtGrad(const NodeDef& node);
bool IsSelect(const NodeDef& node);
bool IsSeluGrad(const NodeDef& node);
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/core/grappler/optimizers/constant_folding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ Status ConstantFolding::SimplifyGraph(GraphDef* output,
// TODO(rmlarsen): Handle non-associative/non-commutative operators like
// subtraction and division, as well as mixed subtraction/addition,
// division/multiplication.
if ((is_add || is_mul) && NumNonControlInputs(*node) == 2) {
if ((IsAdd(*node) || is_mul) && NumNonControlInputs(*node) == 2) {
NodeDef* left_child = node_map_->GetNode(node->input(0));
NodeDef* right_child = node_map_->GetNode(node->input(1));
// One child must be constant, and the other the same op as the parent.
Expand Down
Loading

0 comments on commit 7989a3a

Please sign in to comment.