diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-03-07 08:46:06 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-03-07 09:11:37 -0800 |
commit | ceb7fc1b64611b09a1d03490f5f0a9c155a93137 (patch) | |
tree | cdba0cc807e711ead312dd7b90edcf655f080c55 /tensorflow | |
parent | 6a3d4aba45a45d0e3820330e010e3b3ded58aed1 (diff) |
Fix timeout for matmul_op_test in Windows.
Change: 149423117
Diffstat (limited to 'tensorflow')
-rw-r--r-- | tensorflow/contrib/cmake/tf_tests.cmake | 4 | ||||
-rw-r--r-- | tensorflow/python/kernel_tests/BUILD | 2 | ||||
-rw-r--r-- | tensorflow/python/kernel_tests/matmul_op_test.py | 50 |
3 files changed, 26 insertions, 30 deletions
diff --git a/tensorflow/contrib/cmake/tf_tests.cmake b/tensorflow/contrib/cmake/tf_tests.cmake index 523ad07115..27a3583bcd 100644 --- a/tensorflow/contrib/cmake/tf_tests.cmake +++ b/tensorflow/contrib/cmake/tf_tests.cmake @@ -188,8 +188,6 @@ if (tensorflow_BUILD_PYTHON_TESTS) "${tensorflow_source_dir}/tensorflow/python/debug/wrappers/dumping_wrapper_test.py" "${tensorflow_source_dir}/tensorflow/python/debug/wrappers/local_cli_wrapper_test.py" "${tensorflow_source_dir}/tensorflow/python/debug/wrappers/framework_test.py" - # Needs debug - "${tensorflow_source_dir}/tensorflow/python/kernel_tests/matmul_op_test.py" ) endif() @@ -296,7 +294,7 @@ if (tensorflow_BUILD_CC_TESTS) "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/gru_ops_test.cc" # status 5 "${tensorflow_source_dir}/tensorflow/contrib/rnn/ops/lstm_ops_test.cc" # status 5 - # TODO: not compiling + # TODO: not compiling "${tensorflow_source_dir}/tensorflow/core/kernels/quantization_utils_test.cc" "${tensorflow_source_dir}/tensorflow/core/kernels/quantize_and_dequantize_op_test.cc" "${tensorflow_source_dir}/tensorflow/core/kernels/quantize_down_and_shrink_range_op_test.cc" diff --git a/tensorflow/python/kernel_tests/BUILD b/tensorflow/python/kernel_tests/BUILD index 5b0bdb4688..e1e9dcd157 100644 --- a/tensorflow/python/kernel_tests/BUILD +++ b/tensorflow/python/kernel_tests/BUILD @@ -1359,7 +1359,7 @@ cuda_py_test( "//tensorflow/python:random_ops", "//tensorflow/python:variables", ], - shard_count = 10, + shard_count = 20, ) cuda_py_test( diff --git a/tensorflow/python/kernel_tests/matmul_op_test.py b/tensorflow/python/kernel_tests/matmul_op_test.py index 4060ba8b0e..69d4198877 100644 --- a/tensorflow/python/kernel_tests/matmul_op_test.py +++ b/tensorflow/python/kernel_tests/matmul_op_test.py @@ -54,11 +54,6 @@ class MatMulTest(test_lib.TestCase): def _GetMatMulTest(a_np_, b_np_, use_static_shape_, **kwargs_): def Test(self): - # TODO(rmlarsen): Re-enable this test when we have fixed the failure on - # Windows. - if not use_static_shape_ and a_np_.dtype is np.int32: - self.skipTest("Skipping test to avoid failure on Windows.") - np_val = np.matrix(a_np_) * np.matrix(b_np_) use_gpu = True @@ -160,28 +155,31 @@ class MatMulStatsTest(test_lib.TestCase): if __name__ == "__main__": sizes = [1, 3, 5] trans_options = [[False, False], [True, False], [False, True]] - for dtype in (np.int32, np.float16, np.float32, np.float64, np.complex64, - np.complex128): - for m in sizes: - for n in sizes: - for k in sizes: - # Construct compatible random matrices a_np of size [m, k] and b_np - # of size [k, n]. - a_np = np.random.normal(-5, 5, m * k).astype(dtype).reshape([m, k]) - if dtype in (np.complex64, np.complex128): - a_np.imag = np.random.normal(-5, 5, - m * k).astype(dtype).reshape([m, k]) - - b_np = np.random.normal(-5, 5, k * n).astype(dtype).reshape([k, n]) - if dtype in (np.complex64, np.complex128): - b_np.imag = np.random.normal(-5, 5, - k * n).astype(dtype).reshape([k, n]) - for adjoint_a, transpose_a in trans_options: - for adjoint_b, transpose_b in trans_options: - for use_static_shape in [False, True]: + for use_static_shape in [False, True]: + for dtype in (np.int32, np.float16, np.float32, np.float64, np.complex64, + np.complex128): + if not use_static_shape and dtype == np.int32: + # TODO(rmlarsen): Re-enable this test when we have fixed the underlying + # bug in Windows (b/35935459). + continue + for m in sizes: + for n in sizes: + for k in sizes: + # Construct compatible random matrices a_np of size [m, k] and b_np + # of size [k, n]. + a_np = np.random.normal(-5, 5, m * k).astype(dtype).reshape([m, k]) + if dtype in (np.complex64, np.complex128): + a_np.imag = np.random.normal(-5, 5, + m * k).astype(dtype).reshape([m, k]) + b_np = np.random.normal(-5, 5, k * n).astype(dtype).reshape([k, n]) + if dtype in (np.complex64, np.complex128): + b_np.imag = np.random.normal(-5, 5, + k * n).astype(dtype).reshape([k, n]) + for adjoint_a, transpose_a in trans_options: + for adjoint_b, transpose_b in trans_options: name = "%s_%s_%s_%s_%s_%s_%s_%s_%s" % ( - dtype.__name__, m, n, k, adjoint_a, transpose_a, adjoint_b, - transpose_b, use_static_shape) + use_static_shape, dtype.__name__, m, n, k, adjoint_a, + transpose_a, adjoint_b, transpose_b) _AddTest(MatMulTest, "MatMulTest", name, _GetMatMulTest( a_np, |