Skip to content

Commit

Permalink
Temporarily disabling Conv2D fusions in grappler (#442)
Browse files Browse the repository at this point in the history
* Temorarily commented out Conv2D fusion

* Commented out Conv2D fusion tests.
  • Loading branch information
agramesh1 committed Nov 20, 2018
1 parent f827bad commit 81b2969
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow/core/grappler/optimizers/remapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ Status Remapper::Optimize(Cluster* /*cluster*/, const GrapplerItem& item,
for (const NodeDef& node : topo_sorted_item.graph.node()) {
// Check if node was invalidated by one of the previous remaps.
if (invalidated_nodes.count(&node) > 0) continue;

#ifndef INTEL_MKL
// Remap Conv2D+BiasAdd into the _FusedConv2D.
if (FindConv2DWithBias(ctx, &node, &conv2d_with_bias)) {
AddFusedConv2DNode(conv2d_with_bias, optimized_graph, &invalidated_nodes);
Expand Down Expand Up @@ -712,7 +712,7 @@ Status Remapper::Optimize(Cluster* /*cluster*/, const GrapplerItem& item,
&invalidated_nodes);
continue;
}

#endif // INTEL_MKL
// Infer properties lazily in case they are not needed.
if (!ctx.inferred_graph_properties && IsFusedBatchNormCandidate(node)) {
TF_RETURN_IF_ERROR(ctx.graph_properties.InferStatically(false));
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/core/grappler/optimizers/remapper_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ TEST_F(RemapperTest, FusedBatchNormNCHW) {
}
}

#ifndef INTEL_MKL
TEST_F(RemapperTest, FuseConv2DWithBias) {
if (!EigenSupportsContractionOutputKernel()) return;

Expand Down Expand Up @@ -456,6 +457,7 @@ TEST_F(RemapperTest, FuseConv2DWithSqueezeAndBias) {
EXPECT_EQ(1, tensors.size());
test::ExpectTensorNear<float>(tensors_expected[0], tensors[0], 1e-6);
}
#endif // INTEL_MKL

} // namespace grappler
} // namespace tensorflow

0 comments on commit 81b2969

Please sign in to comment.