aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/test/BUILD
blob: 28d651e9106b29058824c06b160df2b9b5781757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Description:
# Tools for testing

package(default_visibility = ["//tensorflow:internal"])

load(
    "//tensorflow/tools/test:performance.bzl",
    "tf_cc_logged_benchmark",
    "tf_py_logged_benchmark",
)
load("//tensorflow:tensorflow.bzl", "py_test")

licenses(["notice"])  # Apache 2.0

exports_files(["LICENSE"])

py_library(
    name = "system_info_lib",
    srcs = [
        "gpu_info_lib.py",
        "system_info_lib.py",
    ],
    srcs_version = "PY2AND3",
    deps = [
        "//tensorflow/core:protos_all_py",
        "//tensorflow/python:client",
        "//tensorflow/python:errors",
        "//tensorflow/python:platform",
    ],
)

py_binary(
    name = "system_info",
    srcs = ["system_info.py"],
    srcs_version = "PY2AND3",
    deps = [
        ":system_info_lib",
        "//tensorflow/python:platform",
    ],
)

py_library(
    name = "run_and_gather_logs_lib",
    srcs = [
        "run_and_gather_logs_lib.py",
    ],
    srcs_version = "PY2AND3",
    deps = [
        ":system_info_lib",
        "//tensorflow/core:protos_all_py",
        "//tensorflow/python:platform",
    ],
)

py_binary(
    name = "run_and_gather_logs",
    srcs = ["run_and_gather_logs.py"],
    srcs_version = "PY2AND3",
    visibility = ["//visibility:public"],
    deps = [
        ":run_and_gather_logs_lib",
        "//tensorflow/core:protos_all_py",
        "//tensorflow/python:client_testlib",
        "//tensorflow/python:platform",
    ],
)

# Unit test that calls run_and_gather_logs on a benchmark, and
# prints the result.
#cuda_py_test(
#    name = "run_and_gather_logs_test",
#    srcs = ["run_and_gather_logs.py"],
#    additional_deps = [
#        ":run_and_gather_logs",
#    ],
#    args = [
#        "--test_name=" + "//tensorflow/core/kernels:cast_op_test",
#        "--test_args=" + "'--benchmarks=BM_cpu_float'",
#    ],
#    data = [
#        "//tensorflow/core/kernels:cast_op_test",
#    ],
#    main = "run_and_gather_logs.py",
#)

tf_cc_logged_benchmark(
    name = "cast_op_benchmark",
    target = "//tensorflow/core/kernels:cast_op_test_gpu",
)

tf_py_logged_benchmark(
    name = "rnn_op_benchmark",
    target = "//tensorflow/python/kernel_tests:rnn_test",
)

filegroup(
    name = "all_files",
    srcs = glob(
        ["**/*"],
        exclude = [
            "**/METADATA",
            "**/OWNERS",
        ],
    ),
    visibility = ["//tensorflow:__subpackages__"],
)

py_test(
    name = "check_futures_test",
    size = "small",
    srcs = ["check_futures_test.py"],
    data = ["//tensorflow:all_opensource_files"],
    srcs_version = "PY2AND3",
    deps = ["@six_archive//:six"],
)