Home | History | Annotate | Download | only in test
      1 # Description:
      2 # Tools for testing
      3 
      4 package(default_visibility = ["//tensorflow:internal"])
      5 
      6 load(
      7     "//tensorflow/tools/test:performance.bzl",
      8     "tf_cc_logged_benchmark",
      9     "tf_py_logged_benchmark",
     10 )
     11 load("//tensorflow:tensorflow.bzl", "py_test")
     12 
     13 licenses(["notice"])  # Apache 2.0
     14 
     15 exports_files(["LICENSE"])
     16 
     17 py_library(
     18     name = "system_info_lib",
     19     srcs = [
     20         "gpu_info_lib.py",
     21         "system_info_lib.py",
     22     ],
     23     srcs_version = "PY2AND3",
     24     deps = [
     25         "//tensorflow/core:protos_all_py",
     26         "//tensorflow/python:client",
     27         "//tensorflow/python:errors",
     28         "//tensorflow/python:platform",
     29     ],
     30 )
     31 
     32 py_binary(
     33     name = "system_info",
     34     srcs = ["system_info.py"],
     35     srcs_version = "PY2AND3",
     36     deps = [
     37         ":system_info_lib",
     38         "//tensorflow/python:platform",
     39     ],
     40 )
     41 
     42 py_library(
     43     name = "run_and_gather_logs_lib",
     44     srcs = [
     45         "run_and_gather_logs_lib.py",
     46     ],
     47     srcs_version = "PY2AND3",
     48     deps = [
     49         ":system_info_lib",
     50         "//tensorflow/core:protos_all_py",
     51         "//tensorflow/python:platform",
     52     ],
     53 )
     54 
     55 py_binary(
     56     name = "run_and_gather_logs",
     57     srcs = ["run_and_gather_logs.py"],
     58     srcs_version = "PY2AND3",
     59     visibility = ["//visibility:public"],
     60     deps = [
     61         ":run_and_gather_logs_lib",
     62         "//tensorflow/core:protos_all_py",
     63         "//tensorflow/python:client_testlib",
     64         "//tensorflow/python:platform",
     65     ],
     66 )
     67 
     68 # Unit test that calls run_and_gather_logs on a benchmark, and
     69 # prints the result.
     70 #cuda_py_test(
     71 #    name = "run_and_gather_logs_test",
     72 #    srcs = ["run_and_gather_logs.py"],
     73 #    additional_deps = [
     74 #        ":run_and_gather_logs",
     75 #    ],
     76 #    args = [
     77 #        "--test_name=" + "//tensorflow/core/kernels:cast_op_test",
     78 #        "--test_args=" + "'--benchmarks=BM_cpu_float'",
     79 #    ],
     80 #    data = [
     81 #        "//tensorflow/core/kernels:cast_op_test",
     82 #    ],
     83 #    main = "run_and_gather_logs.py",
     84 #)
     85 
     86 tf_cc_logged_benchmark(
     87     name = "cast_op_benchmark",
     88     target = "//tensorflow/core/kernels:cast_op_test_gpu",
     89 )
     90 
     91 tf_py_logged_benchmark(
     92     name = "rnn_op_benchmark",
     93     target = "//tensorflow/python/kernel_tests:rnn_test",
     94 )
     95 
     96 filegroup(
     97     name = "all_files",
     98     srcs = glob(
     99         ["**/*"],
    100         exclude = [
    101             "**/METADATA",
    102             "**/OWNERS",
    103         ],
    104     ),
    105     visibility = ["//tensorflow:__subpackages__"],
    106 )
    107