aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/tests/image_ops_test.py
diff options
context:
space:
mode:
authorGravatar Bixia Zheng <bixia@google.com>2018-04-13 15:15:44 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-13 15:18:31 -0700
commit1298c3240aa9f36b79ea7f0e772edfff87381771 (patch)
tree2a38699c7d6bdf08d8db36db5a2da3e98366b9ef /tensorflow/compiler/tests/image_ops_test.py
parentaedc409605be54f9c7cb67f7b49bdc123d65a8fb (diff)
[TF] Enable half precision XLA compiler tests for the gpu backend.
Modify some tests to allow larger error for half precision. Enable half precision SpaceToBatchNDTest for the cpu backend. PiperOrigin-RevId: 192831909
Diffstat (limited to 'tensorflow/compiler/tests/image_ops_test.py')
-rw-r--r--tensorflow/compiler/tests/image_ops_test.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/compiler/tests/image_ops_test.py b/tensorflow/compiler/tests/image_ops_test.py
index 3bc41b7cfd..12791ef8ac 100644
--- a/tensorflow/compiler/tests/image_ops_test.py
+++ b/tensorflow/compiler/tests/image_ops_test.py
@@ -65,7 +65,8 @@ class RGBToHSVTest(XLATestCase):
# Verify that processing batch elements together is the same as separate
self.assertAllClose(batch1, join1)
self.assertAllClose(batch2, join2)
- self.assertAllCloseAccordingToType(batch2, inp, bfloat16_atol=0.03)
+ self.assertAllCloseAccordingToType(
+ batch2, inp, bfloat16_atol=0.03, half_rtol=0.02)
def testRGBToHSVRoundTrip(self):
data = [0, 5, 13, 54, 135, 226, 37, 8, 234, 90, 255, 1]