message: Temporarily disable Grappler memory optimization for fused_conv tests.
diff: @@ -21,6 +21,8 @@ from __future__ import print_function
  import numpy as np
  from tensorflow.contrib.fused_conv.python.ops import fused_conv2d_bias_activation_op
  +from tensorflow.core.protobuf import config_pb2
  +from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  @@ -33,6 +35,13 @@ from tensorflow.python.platform import test
  from tensorflow.python.platform import tf_logging
  +def NoMemoryOptimizationConfig():
  + config = config_pb2.ConfigProto()
  + config.graph_options.rewrite_options.memory_optimization = (
  + rewriter_config_pb2.RewriterConfig.OFF)
  + return config
  +
  +
  def GetShrunkInceptionShapes(shrink=10):
  """Iterator for smaller versions of convolution shapes in 2015 Inception.
  @@ -193,7 +202,8 @@ class FusedConv2DBiasActivationTest(test.TestCase):
  # This is to guarantee that there is always negative values after
  # bias add so that we can test whether relu works correctly.
  x3 = bias
  - with self.test_session(use_gpu=True):
  + # TODO(b/79323979): re-enable memory optimization after this bug is fixed.
  + with self.test_session(use_gpu=True, config=NoMemoryOptimizationConfig()):
  t1 = constant_op.constant(x1, shape=tensor_in_sizes, dtype=dtype)
  t2 = constant_op.constant(x2, shape=filter_in_sizes, dtype=dtype)
  fused_t2 = t2
  @@ -241,7 +251,9 @@ class FusedConv2DBiasActivationTest(test.TestCase):
  x3 = np.random.rand(*[filter_in_sizes[-1]]).astype(np.float32)
  def _SetupVal(data_format, use_gpu):
  - with self.test_session(use_gpu=use_gpu):
  + # TODO(b/79323979): re-enable memory optimization after this bug is fixed.
  + with self.test_session(
  + use_gpu=use_gpu, config=NoMemoryOptimizationConfig()):
  t1 = constant_op.constant(x1, shape=tensor_in_sizes)
  t2 = constant_op.constant(x2, shape=filter_in_sizes)
  t3 = constant_op.constant(x3, shape=[filter_in_sizes[-1]])
  @@ -864,7 +876,9 @@ class FusedConvInt8Tests(test.TestCase):
  conv_input_scale, conv_input, kernel, padding_type, strides,
  side_input_scale, side_input, biases)
  - with self.test_session(use_gpu=True) as sess:
  + # TODO(b/79323979): re-enable memory optimization after this bug is fixed.
  + with self.test_session(
  + use_gpu=True, config=NoMemoryOptimizationConfig()) as sess:
  actual_y, expected_y = sess.run([actual, expected])
  print("actual_y = ", actual_y)
  print("expected_y = ", expected_y)
  