Decorates a few more tests to pass in tf2 nightlies
PiperOrigin-RevId: 236012401
This commit is contained in:
parent
08e48b6138
commit
4951bd6b6e
tensorflow/python
@ -257,7 +257,7 @@ class GpuMultiSessionMemoryTest(test_util.TensorFlowTestCase):
|
|||||||
if len(results) != 1:
|
if len(results) != 1:
|
||||||
break
|
break
|
||||||
|
|
||||||
@test_util.run_deprecated_v1
|
@test_util.run_v1_only('b/126596827 needs graph mode in multiple threads')
|
||||||
def testConcurrentSessions(self):
|
def testConcurrentSessions(self):
|
||||||
n_threads = 4
|
n_threads = 4
|
||||||
threads = []
|
threads = []
|
||||||
|
@ -167,6 +167,7 @@ class MatrixTriangularSolveOpTest(test.TestCase):
|
|||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError):
|
||||||
self._verifySolve(matrix, rhs, batch_dims=[2, 3])
|
self._verifySolve(matrix, rhs, batch_dims=[2, 3])
|
||||||
|
|
||||||
|
@test_util.run_deprecated_v1
|
||||||
def testNotInvertible(self):
|
def testNotInvertible(self):
|
||||||
# The input should be invertible.
|
# The input should be invertible.
|
||||||
# The matrix is singular because it has a zero on the diagonal.
|
# The matrix is singular because it has a zero on the diagonal.
|
||||||
|
@ -49,13 +49,17 @@ def build_graph(device, n, m, k, transpose_a, transpose_b, dtype):
|
|||||||
"""
|
"""
|
||||||
with ops.device('%s' % device):
|
with ops.device('%s' % device):
|
||||||
if not transpose_a:
|
if not transpose_a:
|
||||||
x = variables.VariableV1(random_ops.random_uniform([n, m], dtype=dtype))
|
x = variables.VariableV1(random_ops.random_uniform([n, m], dtype=dtype),
|
||||||
|
use_resource=False)
|
||||||
else:
|
else:
|
||||||
x = variables.VariableV1(random_ops.random_uniform([m, n], dtype=dtype))
|
x = variables.VariableV1(random_ops.random_uniform([m, n], dtype=dtype),
|
||||||
|
use_resource=False)
|
||||||
if not transpose_b:
|
if not transpose_b:
|
||||||
y = variables.VariableV1(random_ops.random_uniform([m, k], dtype=dtype))
|
y = variables.VariableV1(random_ops.random_uniform([m, k], dtype=dtype),
|
||||||
|
use_resource=False)
|
||||||
else:
|
else:
|
||||||
y = variables.VariableV1(random_ops.random_uniform([k, m], dtype=dtype))
|
y = variables.VariableV1(random_ops.random_uniform([k, m], dtype=dtype),
|
||||||
|
use_resource=False)
|
||||||
|
|
||||||
z = math_ops.matmul(x, y, transpose_a=transpose_a, transpose_b=transpose_b)
|
z = math_ops.matmul(x, y, transpose_a=transpose_a, transpose_b=transpose_b)
|
||||||
return control_flow_ops.group(z)
|
return control_flow_ops.group(z)
|
||||||
|
Loading…
Reference in New Issue
Block a user