aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/compiler
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2018-02-01 15:11:35 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-02-01 17:38:49 -0800
commita7398af84e30eda2cf47496c82bdfe1c9e36381d (patch)
tree01e750168c2319f4688e2b97d71972562e9797a5 /tensorflow/contrib/compiler
parent16ce8ed3f9c2eafb7e1f96ea620698da382e621c (diff)
Make jit_test.py work with C API enabled.
PiperOrigin-RevId: 184202470
Diffstat (limited to 'tensorflow/contrib/compiler')
-rw-r--r--tensorflow/contrib/compiler/jit_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/contrib/compiler/jit_test.py b/tensorflow/contrib/compiler/jit_test.py
index 2108e42bce..29a593f6bc 100644
--- a/tensorflow/contrib/compiler/jit_test.py
+++ b/tensorflow/contrib/compiler/jit_test.py
@@ -24,6 +24,7 @@ from tensorflow.python.framework import function
from tensorflow.python.framework import op_def_registry
from tensorflow.python.framework import ops
from tensorflow.python.framework import random_seed
+from tensorflow.python.framework import test_util
from tensorflow.python.ops import gradients
from tensorflow.python.ops import init_ops
from tensorflow.python.ops import math_ops
@@ -169,6 +170,7 @@ class JITTest(test.TestCase):
self.assertEqual(b"jit_scope_0", func_attrs["_XlaScope"].s)
+@test_util.with_c_api
class CompilationEnabledInGradientTest(test.TestCase):
def testCompilationInGradient(self):
@@ -188,7 +190,7 @@ class CompilationEnabledInGradientTest(test.TestCase):
for cg in c_grad_ops:
self.assertTrue(cg.get_attr("_XlaCompile"))
for ncg in nc_grad_ops:
- with self.assertRaisesRegexp(ValueError, "No attr named"):
+ with self.assertRaisesRegexp(ValueError, "[Nn]o attr named"):
ncg.get_attr("_XlaCompile")
# d/dx (x ** 4) = 4 * (x ** 3)