diff --git a/tensorflow/python/keras/layers/convolutional_test.py b/tensorflow/python/keras/layers/convolutional_test.py index 24b61feec27..ea088783606 100644 --- a/tensorflow/python/keras/layers/convolutional_test.py +++ b/tensorflow/python/keras/layers/convolutional_test.py @@ -421,7 +421,7 @@ class ZeroPaddingTest(keras_parameterized.TestCase): keras.layers.ZeroPadding3D(padding=None) -@test_util.disable_all_xla('b/124289666') # align_corners=False unimplemented +@test_util.disable_all_xla('align_corners=False not supported by XLA') @keras_parameterized.run_all_keras_modes class UpSamplingTest(keras_parameterized.TestCase): diff --git a/tensorflow/python/ops/image_grad_test.py b/tensorflow/python/ops/image_grad_test.py index f363f1b24a0..e4bec8e2551 100644 --- a/tensorflow/python/ops/image_grad_test.py +++ b/tensorflow/python/ops/image_grad_test.py @@ -28,7 +28,7 @@ from tensorflow.python.ops import image_ops from tensorflow.python.platform import test -@test_util.disable_all_xla("b/124289666") # align_corners=False unimplemented +@test_util.disable_all_xla('align_corners=False not supported by XLA') class ResizeNearestNeighborOpTest(test.TestCase): TYPES = [np.float32, np.float64] @@ -150,14 +150,18 @@ class ResizeBilinearOpTest(test.TestCase): self.assertLess(err, 1e-3) @test_util.run_deprecated_v1 - @test_util.disable_xla("b/124290659") # align_corners=False unimplemented def testCompareGpuVsCpu(self): in_shape = [2, 4, 6, 3] out_shape = [2, 8, 16, 3] size = np.prod(in_shape) x = 1.0 / size * np.arange(0, size).reshape(in_shape).astype(np.float32) - for align_corners in [True, False]: + + # Align corners will be deprecated for tf2.0 and the false version is not + # supported by XLA. + align_corner_options = [True + ] if test_util.is_xla_enabled() else [True, False] + for align_corners in align_corner_options: grad = {} for use_gpu in [False, True]: with self.cached_session(use_gpu=use_gpu): diff --git a/tensorflow/python/ops/image_ops_test.py b/tensorflow/python/ops/image_ops_test.py index 1b0d574f7c3..71e310edc85 100644 --- a/tensorflow/python/ops/image_ops_test.py +++ b/tensorflow/python/ops/image_ops_test.py @@ -2269,7 +2269,7 @@ class ResizeImagesV2Test(test_util.TensorFlowTestCase): else: return False - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") @test_util.run_deprecated_v1 def testNoOp(self): img_shape = [1, 6, 4, 1] @@ -2416,7 +2416,7 @@ class ResizeImagesV2Test(test_util.TensorFlowTestCase): if method in self.INTERPOLATING_METHODS: self.assertAllClose(resized, img_np, atol=1e-5) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testResizeDown(self): # This test is also conducted with int8, so 127 is the maximum # value that can be used. @@ -2448,7 +2448,7 @@ class ResizeImagesV2Test(test_util.TensorFlowTestCase): resized = self.evaluate(y) self.assertAllClose(resized, expected, atol=1e-5) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testResizeUp(self): img_shape = [1, 3, 2, 1] data = [64, 32, 32, 64, 50, 100] @@ -2507,7 +2507,8 @@ class ResizeImagesV2Test(test_util.TensorFlowTestCase): [1, target_height, target_width, 1]) self.assertAllClose(resized, expected, atol=1e-04) - @test_util.disable_xla("TODO(jflynn): Figure out why this fails.") + # XLA doesn't implement half_pixel_centers + @test_util.disable_xla("b/127616992") def testLegacyBicubicMethodsMatchNewMethods(self): img_shape = [1, 3, 2, 1] data = [64, 32, 32, 64, 50, 100] @@ -2562,7 +2563,7 @@ class ResizeImagesV2Test(test_util.TensorFlowTestCase): resized = self.evaluate(y) self.assertAllClose(resized, expected, atol=1) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testCompareNearestNeighbor(self): if test.is_gpu_available(): input_shape = [1, 5, 6, 3] @@ -2767,7 +2768,7 @@ class ResizeImagesTest(test_util.TensorFlowTestCase): else: return False - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") @test_util.run_deprecated_v1 def testNoOp(self): img_shape = [1, 6, 4, 1] @@ -2884,7 +2885,7 @@ class ResizeImagesTest(test_util.TensorFlowTestCase): expected_dtype = dtypes.float32 self.assertEqual(y.dtype, expected_dtype) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testSumTensor(self): img_shape = [1, 6, 4, 1] # This test is also conducted with int8, so 127 is the maximum @@ -2911,7 +2912,7 @@ class ResizeImagesTest(test_util.TensorFlowTestCase): self.assertAllEqual(img_shape, newshape) self.assertAllClose(resized, img_np, atol=1e-5) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testResizeDown(self): # This test is also conducted with int8, so 127 is the maximum # value that can be used. @@ -2943,7 +2944,7 @@ class ResizeImagesTest(test_util.TensorFlowTestCase): resized = self.evaluate(y) self.assertAllClose(resized, expected, atol=1e-5) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testResizeUpAlignCornersFalse(self): img_shape = [1, 3, 2, 1] data = [64, 32, 32, 64, 50, 100] @@ -3069,7 +3070,7 @@ class ResizeImagesTest(test_util.TensorFlowTestCase): resized = self.evaluate(y) self.assertAllClose(resized, expected, atol=1) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") def testCompareNearestNeighbor(self): if test.is_gpu_available(): input_shape = [1, 5, 6, 3] @@ -3405,7 +3406,7 @@ class ResizeImageWithPadV2Test(test_util.TensorFlowTestCase): self.assertEqual(y.get_shape().as_list(), post_shape) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") @test_util.run_deprecated_v1 def testNoOp(self): x_shape = [10, 10, 10] @@ -3413,7 +3414,7 @@ class ResizeImageWithPadV2Test(test_util.TensorFlowTestCase): self._assertReturns(x, x_shape, x, x_shape) - @test_util.disable_xla("b/124289666") # align_corners=False unimplemented + @test_util.disable_xla("align_corners=False not supported by XLA") @test_util.run_deprecated_v1 def testPad(self): # Reduce vertical dimension