Home | History | Annotate | Download | only in kernel_tests
      1 # Tests of TensorFlow kernels written using the Python API.
      2 
      3 package(
      4     default_visibility = ["//tensorflow:internal"],
      5 )
      6 
      7 licenses(["notice"])  # Apache 2.0
      8 
      9 load("//tensorflow:tensorflow.bzl", "tf_py_test")
     10 load("//tensorflow:tensorflow.bzl", "cuda_py_test")
     11 load("//tensorflow:tensorflow.bzl", "sycl_py_test")
     12 
     13 tf_py_test(
     14     name = "batch_dataset_op_test",
     15     size = "small",
     16     srcs = ["batch_dataset_op_test.py"],
     17     additional_deps = [
     18         "//third_party/py/numpy",
     19         "//tensorflow/python:array_ops",
     20         "//tensorflow/python:client_testlib",
     21         "//tensorflow/python:constant_op",
     22         "//tensorflow/python:dtypes",
     23         "//tensorflow/python:errors",
     24         "//tensorflow/python:math_ops",
     25         "//tensorflow/python:string_ops",
     26         "//tensorflow/python:tensor_shape",
     27         "//tensorflow/python:util",
     28         "//tensorflow/python/data/ops:dataset_ops",
     29     ],
     30 )
     31 
     32 tf_py_test(
     33     name = "dataset_constructor_op_test",
     34     size = "small",
     35     srcs = ["dataset_constructor_op_test.py"],
     36     additional_deps = [
     37         "//third_party/py/numpy",
     38         "//tensorflow/core:protos_all_py",
     39         "//tensorflow/python:array_ops",
     40         "//tensorflow/python:client_testlib",
     41         "//tensorflow/python:dtypes",
     42         "//tensorflow/python:errors",
     43         "//tensorflow/python:framework_ops",
     44         "//tensorflow/python:math_ops",
     45         "//tensorflow/python:random_ops",
     46         "//tensorflow/python:resource_variable_ops",
     47         "//tensorflow/python:session",
     48         "//tensorflow/python:sparse_tensor",
     49         "//tensorflow/python:tensor_shape",
     50         "//tensorflow/python/data/ops:dataset_ops",
     51         "//tensorflow/python/data/util:nest",
     52         "//tensorflow/python/data/util:sparse",
     53     ],
     54     tags = [
     55         "manual",
     56         "nomac",  # b/62040583
     57     ],
     58 )
     59 
     60 tf_py_test(
     61     name = "dataset_from_generator_op_test",
     62     size = "medium",
     63     srcs = ["dataset_from_generator_op_test.py"],
     64     additional_deps = [
     65         "//third_party/py/numpy",
     66         "//tensorflow/python:client_testlib",
     67         "//tensorflow/python:dtypes",
     68         "//tensorflow/python:errors",
     69         "//tensorflow/python:tensor_shape",
     70         "//tensorflow/python/data/ops:dataset_ops",
     71         "//tensorflow/python/data/util:sparse",
     72     ],
     73 )
     74 
     75 tf_py_test(
     76     name = "filter_dataset_op_test",
     77     size = "small",
     78     srcs = ["filter_dataset_op_test.py"],
     79     additional_deps = [
     80         "//third_party/py/numpy",
     81         "//tensorflow/python:array_ops",
     82         "//tensorflow/python:client_testlib",
     83         "//tensorflow/python:dtypes",
     84         "//tensorflow/python:errors",
     85         "//tensorflow/python:functional_ops",
     86         "//tensorflow/python:math_ops",
     87         "//tensorflow/python:sparse_tensor",
     88         "//tensorflow/python/data/ops:dataset_ops",
     89     ],
     90 )
     91 
     92 tf_py_test(
     93     name = "flat_map_dataset_op_test",
     94     size = "small",
     95     srcs = ["flat_map_dataset_op_test.py"],
     96     additional_deps = [
     97         "//third_party/py/numpy",
     98         "//tensorflow/python:client_testlib",
     99         "//tensorflow/python:errors",
    100         "//tensorflow/python:session",
    101         "//tensorflow/python:sparse_ops",
    102         "//tensorflow/python:sparse_tensor",
    103         "//tensorflow/python:training",
    104         "//tensorflow/python/data/ops:dataset_ops",
    105     ],
    106     grpc_enabled = True,
    107 )
    108 
    109 tf_py_test(
    110     name = "list_files_dataset_op_test",
    111     size = "small",
    112     srcs = ["list_files_dataset_op_test.py"],
    113     additional_deps = [
    114         "//tensorflow/python:array_ops",
    115         "//tensorflow/python:client_testlib",
    116         "//tensorflow/python:dtypes",
    117         "//tensorflow/python:errors",
    118         "//tensorflow/python:util",
    119         "//tensorflow/python/data/ops:dataset_ops",
    120     ],
    121 )
    122 
    123 tf_py_test(
    124     name = "interleave_dataset_op_test",
    125     size = "small",
    126     srcs = ["interleave_dataset_op_test.py"],
    127     additional_deps = [
    128         "//tensorflow/python:array_ops",
    129         "//tensorflow/python:client_testlib",
    130         "//tensorflow/python:dtypes",
    131         "//tensorflow/python:errors",
    132         "//tensorflow/python:session",
    133         "//tensorflow/python:sparse_ops",
    134         "//tensorflow/python:sparse_tensor",
    135         "//tensorflow/python:training",
    136         "//tensorflow/python/data/ops:dataset_ops",
    137     ],
    138 )
    139 
    140 tf_py_test(
    141     name = "map_dataset_op_test",
    142     size = "small",
    143     srcs = ["map_dataset_op_test.py"],
    144     additional_deps = [
    145         "//third_party/py/numpy",
    146         "//tensorflow/python:array_ops",
    147         "//tensorflow/python:client_testlib",
    148         "//tensorflow/python:constant_op",
    149         "//tensorflow/python:data_flow_ops",
    150         "//tensorflow/python:dtypes",
    151         "//tensorflow/python:errors",
    152         "//tensorflow/python:functional_ops",
    153         "//tensorflow/python:lookup_ops",
    154         "//tensorflow/python:math_ops",
    155         "//tensorflow/python:random_ops",
    156         "//tensorflow/python:script_ops",
    157         "//tensorflow/python:sparse_ops",
    158         "//tensorflow/python:sparse_tensor",
    159         "//tensorflow/python:string_ops",
    160         "//tensorflow/python:variable_scope",
    161         "//tensorflow/python/data/ops:dataset_ops",
    162     ],
    163 )
    164 
    165 tf_py_test(
    166     name = "prefetch_dataset_op_test",
    167     size = "small",
    168     srcs = ["prefetch_dataset_op_test.py"],
    169     additional_deps = [
    170         "//tensorflow/python:array_ops",
    171         "//tensorflow/python:client_testlib",
    172         "//tensorflow/python:dataset_ops_gen",
    173         "//tensorflow/python:dtypes",
    174         "//tensorflow/python:errors",
    175         "//tensorflow/python/data/ops:dataset_ops",
    176     ],
    177 )
    178 
    179 tf_py_test(
    180     name = "range_dataset_op_test",
    181     size = "small",
    182     srcs = ["range_dataset_op_test.py"],
    183     additional_deps = [
    184         "//tensorflow/python:array_ops",
    185         "//tensorflow/python:client_testlib",
    186         "//tensorflow/python:dataset_ops_gen",
    187         "//tensorflow/python:dtypes",
    188         "//tensorflow/python:errors",
    189         "//tensorflow/python:io_ops",
    190         "//tensorflow/python:framework_ops",
    191         "//tensorflow/python:parsing_ops",
    192         "//tensorflow/python:platform",
    193         "//tensorflow/python:tensor_shape",
    194         "//tensorflow/python:variables",
    195         "//tensorflow/python/data/ops:dataset_ops",
    196         "//tensorflow/python/data/ops:iterator_ops",
    197     ],
    198 )
    199 
    200 tf_py_test(
    201     name = "reader_dataset_ops_test",
    202     size = "small",
    203     srcs = ["reader_dataset_ops_test.py"],
    204     additional_deps = [
    205         "//tensorflow/python:array_ops",
    206         "//tensorflow/python:client_testlib",
    207         "//tensorflow/python:constant_op",
    208         "//tensorflow/python:dataset_ops_gen",
    209         "//tensorflow/python:dtypes",
    210         "//tensorflow/python:errors",
    211         "//tensorflow/python:framework_ops",
    212         "//tensorflow/python:io_ops",
    213         "//tensorflow/python:lib",
    214         "//tensorflow/python:parsing_ops",
    215         "//tensorflow/python:tensor_shape",
    216         "//tensorflow/python:util",
    217         "//tensorflow/python/data/ops:iterator_ops",
    218         "//tensorflow/python/data/ops:readers",
    219     ],
    220 )
    221 
    222 tf_py_test(
    223     name = "sequence_dataset_op_test",
    224     size = "small",
    225     srcs = ["sequence_dataset_op_test.py"],
    226     additional_deps = [
    227         "//third_party/py/numpy",
    228         "//tensorflow/python:array_ops",
    229         "//tensorflow/python:client_testlib",
    230         "//tensorflow/python:dtypes",
    231         "//tensorflow/python:errors",
    232         "//tensorflow/python/data/ops:dataset_ops",
    233     ],
    234 )
    235 
    236 tf_py_test(
    237     name = "shuffle_dataset_op_test",
    238     size = "small",
    239     srcs = ["shuffle_dataset_op_test.py"],
    240     additional_deps = [
    241         "//third_party/py/numpy",
    242         "//tensorflow/python:array_ops",
    243         "//tensorflow/python:client_testlib",
    244         "//tensorflow/python:constant_op",
    245         "//tensorflow/python:dtypes",
    246         "//tensorflow/python:errors",
    247         "//tensorflow/python/data/ops:dataset_ops",
    248         "//tensorflow/python/data/ops:iterator_ops",
    249     ],
    250 )
    251 
    252 tf_py_test(
    253     name = "shard_dataset_op_test",
    254     size = "small",
    255     srcs = ["shard_dataset_op_test.py"],
    256     additional_deps = [
    257         "//tensorflow/python:client_testlib",
    258         "//tensorflow/python:errors",
    259         "//tensorflow/python/data/ops:dataset_ops",
    260     ],
    261 )
    262 
    263 tf_py_test(
    264     name = "cache_dataset_op_test",
    265     size = "small",
    266     srcs = ["cache_dataset_op_test.py"],
    267     additional_deps = [
    268         "//third_party/py/numpy",
    269         "//tensorflow/python:array_ops",
    270         "//tensorflow/python:client_testlib",
    271         "//tensorflow/python:constant_op",
    272         "//tensorflow/python:dtypes",
    273         "//tensorflow/python:errors",
    274         "//tensorflow/python:variables",
    275         "//tensorflow/python/data/ops:dataset_ops",
    276         "//tensorflow/python/data/ops:iterator_ops",
    277     ],
    278 )
    279 
    280 tf_py_test(
    281     name = "zip_dataset_op_test",
    282     size = "small",
    283     srcs = ["zip_dataset_op_test.py"],
    284     additional_deps = [
    285         "//third_party/py/numpy",
    286         "//tensorflow/python:array_ops",
    287         "//tensorflow/python:client_testlib",
    288         "//tensorflow/python:dtypes",
    289         "//tensorflow/python:errors",
    290         "//tensorflow/python/data/ops:dataset_ops",
    291     ],
    292 )
    293 
    294 tf_py_test(
    295     name = "concatenate_dataset_op_test",
    296     size = "small",
    297     srcs = ["concatenate_dataset_op_test.py"],
    298     additional_deps = [
    299         "//third_party/py/numpy",
    300         "//tensorflow/python:client_testlib",
    301         "//tensorflow/python:errors",
    302         "//tensorflow/python:tensor_shape",
    303         "//tensorflow/python/data/ops:dataset_ops",
    304         "//tensorflow/python/data/util:nest",
    305     ],
    306 )
    307 
    308 tf_py_test(
    309     name = "iterator_ops_test",
    310     size = "small",
    311     srcs = ["iterator_ops_test.py"],
    312     additional_deps = [
    313         "//third_party/py/numpy",
    314         "//tensorflow/python/data/ops:readers",
    315         "//tensorflow/core:protos_all_py",
    316         "//tensorflow/python/data/ops:dataset_ops",
    317         "//tensorflow/python/data/ops:iterator_ops",
    318         "//tensorflow/python/data/util:sparse",
    319         "//tensorflow/python:array_ops",
    320         "//tensorflow/python:client_testlib",
    321         "//tensorflow/python:constant_op",
    322         "//tensorflow/python:dataset_ops_gen",
    323         "//tensorflow/python:dtypes",
    324         "//tensorflow/python:errors",
    325         "//tensorflow/python:framework_ops",
    326         "//tensorflow/python:framework_test_lib",
    327         "//tensorflow/python:function",
    328         "//tensorflow/python:functional_ops",
    329         "//tensorflow/python:gradients",
    330         "//tensorflow/python:io_ops",
    331         "//tensorflow/python:math_ops",
    332         "//tensorflow/python:parsing_ops",
    333         "//tensorflow/python:random_ops",
    334         "//tensorflow/python:script_ops",
    335         "//tensorflow/python:session",
    336         "//tensorflow/python:sparse_tensor",
    337         "//tensorflow/python:tensor_shape",
    338         "//tensorflow/python:training",
    339     ],
    340     grpc_enabled = True,
    341 )
    342 
    343 tf_py_test(
    344     name = "iterator_ops_cluster_test",
    345     size = "small",
    346     srcs = ["iterator_ops_cluster_test.py"],
    347     additional_deps = [
    348         "//tensorflow/core:protos_all_py",
    349         "//tensorflow/python:array_ops",
    350         "//tensorflow/python:client_testlib",
    351         "//tensorflow/python:dtypes",
    352         "//tensorflow/python:errors",
    353         "//tensorflow/python:framework_ops",
    354         "//tensorflow/python:framework_test_lib",
    355         "//tensorflow/python:function",
    356         "//tensorflow/python:functional_ops",
    357         "//tensorflow/python:session",
    358         "//tensorflow/python/data/ops:dataset_ops",
    359         "//tensorflow/python/data/ops:iterator_ops",
    360         "//tensorflow/python:constant_op",
    361         "//tensorflow/python:string_ops",
    362         "//tensorflow/python:lookup_ops",
    363     ],
    364     grpc_enabled = True,
    365     tags = [
    366         "no_oss",  # Test flaky due to port collisions.
    367         "no_windows",
    368     ],
    369 )
    370 
    371 filegroup(
    372     name = "all_files",
    373     srcs = glob(
    374         ["**/*"],
    375         exclude = [
    376             "**/METADATA",
    377             "**/OWNERS",
    378         ],
    379     ),
    380     visibility = ["//tensorflow:__subpackages__"],
    381 )
    382