From 4951bd6b6e7cca0354d1f2d1f48cf8808b3279a1 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Wed, 27 Feb 2019 16:08:21 -0800 Subject: [PATCH] Decorates a few more tests to pass in tf2 nightlies PiperOrigin-RevId: 236012401 --- tensorflow/python/kernel_tests/basic_gpu_test.py | 2 +- .../kernel_tests/matrix_triangular_solve_op_test.py | 1 + tensorflow/python/ops/matmul_benchmark.py | 12 ++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tensorflow/python/kernel_tests/basic_gpu_test.py b/tensorflow/python/kernel_tests/basic_gpu_test.py index 1a8513d022d..789f6e90c9f 100644 --- a/tensorflow/python/kernel_tests/basic_gpu_test.py +++ b/tensorflow/python/kernel_tests/basic_gpu_test.py @@ -257,7 +257,7 @@ class GpuMultiSessionMemoryTest(test_util.TensorFlowTestCase): if len(results) != 1: break - @test_util.run_deprecated_v1 + @test_util.run_v1_only('b/126596827 needs graph mode in multiple threads') def testConcurrentSessions(self): n_threads = 4 threads = [] diff --git a/tensorflow/python/kernel_tests/matrix_triangular_solve_op_test.py b/tensorflow/python/kernel_tests/matrix_triangular_solve_op_test.py index dde83f12f3c..2d0427cad94 100644 --- a/tensorflow/python/kernel_tests/matrix_triangular_solve_op_test.py +++ b/tensorflow/python/kernel_tests/matrix_triangular_solve_op_test.py @@ -167,6 +167,7 @@ class MatrixTriangularSolveOpTest(test.TestCase): with self.assertRaises(ValueError): self._verifySolve(matrix, rhs, batch_dims=[2, 3]) + @test_util.run_deprecated_v1 def testNotInvertible(self): # The input should be invertible. # The matrix is singular because it has a zero on the diagonal. diff --git a/tensorflow/python/ops/matmul_benchmark.py b/tensorflow/python/ops/matmul_benchmark.py index 138149e63dc..d597298c8d7 100644 --- a/tensorflow/python/ops/matmul_benchmark.py +++ b/tensorflow/python/ops/matmul_benchmark.py @@ -49,13 +49,17 @@ def build_graph(device, n, m, k, transpose_a, transpose_b, dtype): """ with ops.device('%s' % device): 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: - 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: - 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: - 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) return control_flow_ops.group(z)