Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTEL MKL] 1.14 cherrypick request. Moving compat date for fused_bacth_norm_v3. New! #29924

Merged
merged 1 commit into from
Jun 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions tensorflow/contrib/quantize/python/fold_batch_norms_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _TestFoldConv2d(self, relu, relu_op_name, with_bypass, has_scaling,
self.assertFalse('//' in op.name, 'Double slash in op %s' % op.name)

def testFoldConv2d(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverParameters(self._TestFoldConv2d)

def testMultipleLayerConv2d(self,
Expand Down Expand Up @@ -339,7 +339,7 @@ def _TestFoldConv2dUnknownShape(self,
self.assertFalse('//' in op.name, 'Double slash in op %s' % op.name)

def testFoldConv2dUnknownShape(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverParameters(self._TestFoldConv2dUnknownShape)

def _TestFoldFullyConnectedLayer(
Expand Down Expand Up @@ -435,7 +435,7 @@ def _TestFoldFullyConnectedLayer(
self.assertFalse('//' in op.name, 'Double slash in op %s' % op.name)

def testFoldFullyConnectedLayer(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverParameters(self._TestFoldFullyConnectedLayer)

def _TestFoldDepthwiseConv2d(self, relu, relu_op_name, with_bypass,
Expand Down Expand Up @@ -547,7 +547,7 @@ def _TestFoldDepthwiseConv2d(self, relu, relu_op_name, with_bypass,
self.assertFalse('//' in op.name, 'Double slash in op %s' % op.name)

def testFoldDepthwiseConv2d(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverParameters(self._TestFoldDepthwiseConv2d)

def _TestFoldAtrousConv2d(self, relu, relu_op_name, with_bypass, has_scaling,
Expand Down Expand Up @@ -665,7 +665,7 @@ def _TestFoldAtrousConv2d(self, relu, relu_op_name, with_bypass, has_scaling,
self.assertFalse('//' in op.name, 'Double slash in op %s' % op.name)

def testFoldAtrousConv2d(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverParameters(self._TestFoldAtrousConv2d)

def _TestCompareFoldAndUnfolded(self,
Expand Down Expand Up @@ -739,7 +739,7 @@ def _TestCompareFoldAndUnfolded(self,
self.assertAllClose(unfolded_backward, folded_backward, atol=1e-3)

def testCompareFoldAndUnfolded(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverParameters(self._TestCompareFoldAndUnfolded)

def _BatchNormParams(self, scale=True, fused=False):
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/contrib/quantize/python/graph_matcher_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class GraphMatcherTest(test_util.TensorFlowTestCase):

def test_conv_layer(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
g = ops.Graph()
with g.as_default():
inputs = array_ops.placeholder(dtypes.float32, shape=[8, 5, 5, 3])
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/contrib/quantize/python/quantize_graph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def _TestIdempotent(self, rewrite_fn):
self.assertEqual(graph_def_before, graph_def_after)

def testIdentityNode(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverAllRewrites(self._TestIdentityNode)

def _TestIdentityNode(self, rewrite_fn):
Expand All @@ -298,7 +298,7 @@ def _TestIdentityNode(self, rewrite_fn):
['test/BatchNorm/FusedBatchNormV3'])

def testActivationQuantization(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunTestOverAllRewrites(self._TestActivationQuantization)

def _TestActivationQuantization(self, rewrite_fn):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ def _AssertCorrectQuantizedGraphWithBatchNorm(self, graph, scope, layer,
self._AssertIdempotent(graph)

def testQuantize_Conv2dWithBatchNorm(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunBatchNormTestOverParameters(
self._TestQuantize_Conv2dWithBatchNorm)

Expand Down Expand Up @@ -544,7 +544,7 @@ def _TestQuantize_Conv2dWithBatchNorm(self, activation, activation_op_name,
use_resource)

def testQuantize_FCWithBatchNorm(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunBatchNormTestOverParameters(self._TestQuantize_FCWithBatchNorm)

def _TestQuantize_FCWithBatchNorm(self, activation, activation_op_name,
Expand Down Expand Up @@ -600,7 +600,7 @@ def _TestQuantize_FCWithBatchNorm(self, activation, activation_op_name,
use_resource)

def testQuantize_DepthwiseConv2dWithBatchNorm(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunBatchNormTestOverParameters(
self._TestQuantize_DepthwiseConv2dWithBatchNorm)

Expand Down Expand Up @@ -659,7 +659,7 @@ def _TestQuantize_DepthwiseConv2dWithBatchNorm(
with_bypass, delay, use_resource)

def testQuantize_AtrousConvWithBatchNorm(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
self._RunBatchNormTestOverParameters(
self._TestQuantize_AtrousConvWithBatchNorm)

Expand Down Expand Up @@ -729,7 +729,7 @@ def _AssertIdempotent(self, graph):
self.assertEqual(graph_def_before, graph_def_after)

def testBatchNormForcedUpdates(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
parameter_list = [
# (activation, activation_op_name, fused_batch_norm)
(nn_ops.relu6, 'Relu6', False),
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/python/grappler/auto_mixed_precision_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def _run_simple_loop_test(self, inp, body, out):
@test_util.run_deprecated_v1
def test_conv_bn(self):
"""Test graph with convolution followed by batch norm."""
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
if test.is_gpu_available(cuda_only=True):
random_seed.set_random_seed(0)
x = _input([2, 8, 8, 1])
Expand All @@ -363,7 +363,7 @@ def test_conv_bn(self):
@test_util.run_deprecated_v1
def test_conv_bn_dropout(self):
"""Test dropout precision of convolution batch norm graph."""
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
if test.is_gpu_available(cuda_only=True):
random_seed.set_random_seed(0)
x = _input([2, 8, 8, 1])
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/python/grappler/layout_optimizer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ def testLoopWithVecAnd4D(self):

@test_util.deprecated_graph_mode_only
def testBinaryOpSecondPort(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
if test.is_gpu_available(cuda_only=True):
output = _model_with_second_port()

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/python/ops/nn_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ def fused_batch_norm(
min_epsilon = 1.001e-5
epsilon = epsilon if epsilon > min_epsilon else min_epsilon

if compat.forward_compatible(2019, 6, 6):
if compat.forward_compatible(2019, 11, 10):
y, batch_mean, batch_var, _, _, _ = gen_nn_ops.fused_batch_norm_v3(
x,
scale,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def loop_fn(i):
self._test_loop_fn(loop_fn, 3, loop_fn_dtypes=[dtypes.float32] * 3)

def test_fused_batch_norm(self):
with compat.forward_compatibility_horizon(2019, 6, 7):
with compat.forward_compatibility_horizon(2019, 11, 11):
data_formats = ["NHWC"]
if test.is_gpu_available():
data_formats.append("NCHW")
Expand Down