aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/test
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-02-03 23:50:51 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-04 00:08:31 -0800
commita544546c31edc97aaab31d77170911811f524306 (patch)
treeae6a4dc1e576ce23c80377ee752c7b6014da9423 /tensorflow/tools/test
parentcb02b740a00a63aeaddfe6904e3f50d5c00eeb02 (diff)
A few changes to get tf_cc_logged_benchmark's running under tensorflow/. Pass in benchmark argument to tf_cc_logged_benchmark. Also, add _gpu suffix to benchmarks.
Change: 146552100
Diffstat (limited to 'tensorflow/tools/test')
-rw-r--r--tensorflow/tools/test/BUILD2
-rw-r--r--tensorflow/tools/test/performance.bzl4
-rw-r--r--tensorflow/tools/test/run_and_gather_logs_lib.py7
3 files changed, 11 insertions, 2 deletions
diff --git a/tensorflow/tools/test/BUILD b/tensorflow/tools/test/BUILD
index 9b04d62385..50acac3014 100644
--- a/tensorflow/tools/test/BUILD
+++ b/tensorflow/tools/test/BUILD
@@ -80,7 +80,7 @@ py_binary(
tf_cc_logged_benchmark(
name = "cast_op_benchmark",
- target = "//tensorflow/core/kernels:cast_op_test",
+ target = "//tensorflow/core/kernels:cast_op_test_gpu",
)
tf_py_logged_benchmark(
diff --git a/tensorflow/tools/test/performance.bzl b/tensorflow/tools/test/performance.bzl
index 83dace61e4..5a458fbf0b 100644
--- a/tensorflow/tools/test/performance.bzl
+++ b/tensorflow/tools/test/performance.bzl
@@ -26,10 +26,12 @@ def tf_cc_logged_benchmark(
tf_py_test(
name = name,
tags = all_tags,
+ size = "large",
srcs = ["//tensorflow/tools/test:run_and_gather_logs.py"],
args = [
"--name=//%s:%s" % (PACKAGE_NAME, name),
- "--test_name=" + target
+ "--test_name=" + target,
+ "--test_args=--benchmarks=%s" % benchmarks
],
data = [
target,
diff --git a/tensorflow/tools/test/run_and_gather_logs_lib.py b/tensorflow/tools/test/run_and_gather_logs_lib.py
index 0d78cd9da9..963e1e8321 100644
--- a/tensorflow/tools/test/run_and_gather_logs_lib.py
+++ b/tensorflow/tools/test/run_and_gather_logs_lib.py
@@ -29,6 +29,10 @@ from tensorflow.python.platform import gfile
from tensorflow.tools.test import system_info_lib
+class MissingLogsError(Exception):
+ pass
+
+
def get_git_commit_sha():
"""Get git commit SHA for this build.
@@ -103,6 +107,7 @@ def run_and_gather_logs(name, test_name, test_args):
ValueError: If the test_name is not a valid target.
subprocess.CalledProcessError: If the target itself fails.
IOError: If there are problems gathering test log output from the test.
+ MissingLogsError: If we couldn't find benchmark logs.
"""
if not (test_name and test_name.startswith("//") and ".." not in test_name and
not test_name.endswith(":") and not test_name.endswith(":all") and
@@ -135,6 +140,8 @@ def run_and_gather_logs(name, test_name, test_args):
subprocess.check_call([test_executable] + test_args)
run_time = time.time() - start_time
log_files = gfile.Glob("{}*".format(test_file_prefix))
+ if not log_files:
+ raise MissingLogsError("No log files found at %s." % test_file_prefix)
return (process_test_logs(
name,