diff options
author | 2016-03-14 13:22:21 -0800 | |
---|---|---|
committer | 2016-03-14 14:27:37 -0700 | |
commit | 49792ef0a608da81807647ed4c23ab954398bd43 (patch) | |
tree | 60c8b73f4380ef0b45a396319fca8d9ed282757c /tensorflow/core | |
parent | 86ddfc7a007d7e26f7c00df488969e302f5cd7a1 (diff) |
Add the test runner run_and_gather_logs to tools/test
* includes a unit test that runs a benchmark and collects the results.
* CC tests in tf/core/kernels now set linkstatic so GPU-based CC tests can be run by this test runner.
* refactored the py test declarations in tensorflow.bzl to allow users to set main and args directly. necessary for the test runner.
Change: 117170938
Diffstat (limited to 'tensorflow/core')
-rw-r--r-- | tensorflow/core/kernels/BUILD | 21 | ||||
-rw-r--r-- | tensorflow/core/util/test_log.proto | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/tensorflow/core/kernels/BUILD b/tensorflow/core/kernels/BUILD index b482eac8a1..09c0147243 100644 --- a/tensorflow/core/kernels/BUILD +++ b/tensorflow/core/kernels/BUILD @@ -1,6 +1,10 @@ # Description: # Op kernel implementations for TensorFlow. - +# +# Note: Any test that uses GPU support and which we would like to +# benchmark should be linked statically so that it can be executed +# from a py_binary or cuda_py_test test logger. +# package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 @@ -16,6 +20,7 @@ load( load( "//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library", + "tf_kernel_tests_linkstatic", ) # Public support libraries ---------------------------------------------------- @@ -111,6 +116,7 @@ cc_library( tf_cc_test( name = "ops_util_test", + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking deps = [ ":ops_util", "//tensorflow/core:test", @@ -259,6 +265,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "concat_op_test", "constant_op_test", @@ -323,6 +330,7 @@ cc_library( tf_cc_test( name = "range_sampler_test", + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking deps = [ ":range_sampler", "//tensorflow/core:framework", @@ -357,6 +365,7 @@ tf_kernel_library( tf_cc_test( name = "control_flow_ops_test", + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking deps = [ ":control_flow_ops", ":ops_testutil", @@ -405,6 +414,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "dynamic_partition_op_test", "dynamic_stitch_op_test", @@ -495,6 +505,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "restore_op_test", "save_op_test", @@ -543,6 +554,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "adjust_contrast_op_benchmark_test", "adjust_contrast_op_test", @@ -625,6 +637,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "logging_ops_test", "summary_image_op_test", @@ -675,6 +688,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "cast_op_test", "cross_op_test", @@ -760,6 +774,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "lrn_op_test", "nn_ops_test", @@ -843,6 +858,7 @@ tf_kernel_library( tf_cc_test( name = "random_op_test", + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking deps = [ ":random_ops", "//tensorflow/core:framework", @@ -888,6 +904,7 @@ tf_kernel_libraries( ) tf_cc_tests( + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking tests = [ "sparse_tensor_dense_matmul_op_test", "sparse_to_dense_op_test", @@ -928,6 +945,7 @@ tf_kernel_libraries( tf_cc_test( name = "scatter_op_test", + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking deps = [ ":ops_testutil", ":ops_util", @@ -966,6 +984,7 @@ tf_kernel_library( tf_cc_test( name = "training_ops_test", + linkstatic = tf_kernel_tests_linkstatic(), # Required for benchmarking deps = [ ":ops_util", ":training_ops", diff --git a/tensorflow/core/util/test_log.proto b/tensorflow/core/util/test_log.proto index 82cf0433e6..391b76eec3 100644 --- a/tensorflow/core/util/test_log.proto +++ b/tensorflow/core/util/test_log.proto @@ -130,7 +130,7 @@ message MachineConfiguration { // Run-specific items such as arguments to the test / benchmark. message RunConfiguration { - repeated string arguments = 1; + repeated string argument = 1; } // The output of one benchmark / test run. Each run contains a list of |