Home | History | Annotate | Download | only in framework
      1 # Description:
      2 #   contains parts of TensorFlow that are experimental or unstable and which are not supported.
      3 
      4 package(default_visibility = [
      5     "//learning/brain:__subpackages__",
      6     "//tensorflow:__subpackages__",
      7     "//tensorflow_model_optimization:__subpackages__",
      8 ])
      9 
     10 licenses(["notice"])  # Apache 2.0
     11 
     12 exports_files(["LICENSE"])
     13 
     14 load("//tensorflow:tensorflow.bzl", "py_test")
     15 load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
     16 load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py")
     17 load("//tensorflow:tensorflow.bzl", "tf_gen_op_libs")
     18 load("//tensorflow:tensorflow.bzl", "tf_kernel_library")
     19 load("//tensorflow:tensorflow.bzl", "cuda_py_test")
     20 load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library")
     21 
     22 tf_custom_op_py_library(
     23     name = "framework_py",
     24     srcs = [
     25         "__init__.py",
     26         "python/framework/__init__.py",
     27         "python/framework/checkpoint_utils.py",
     28         "python/framework/experimental.py",
     29         "python/framework/graph_util.py",
     30         "python/framework/tensor_util.py",
     31         "python/ops/__init__.py",
     32         "python/ops/arg_scope.py",
     33         "python/ops/audio_ops.py",
     34         "python/ops/checkpoint_ops.py",
     35         "python/ops/ops.py",
     36         "python/ops/prettyprint_ops.py",
     37         "python/ops/script_ops.py",
     38         "python/ops/sort_ops.py",
     39         "python/ops/variables.py",
     40     ],
     41     dso = [
     42         ":python/ops/_variable_ops.so",
     43     ],
     44     kernels = [
     45         ":variable_kernels",
     46         ":variable_ops_op_lib",
     47     ],
     48     srcs_version = "PY2AND3",
     49     visibility = [
     50         "//learning/brain:__subpackages__",
     51         "//tensorflow:__subpackages__",
     52         "//tensorflow_estimator:__subpackages__",
     53         "//tensorflow_model_optimization:__subpackages__",
     54         "//video/youtube/personalization:__subpackages__",
     55     ],
     56     deps = [
     57         ":gen_variable_ops",
     58         "//tensorflow/contrib/util:util_py",
     59         "//tensorflow/python:array_ops",
     60         "//tensorflow/python:audio_ops_gen",
     61         "//tensorflow/python:check_ops",
     62         "//tensorflow/python:checkpoint_ops_gen",
     63         "//tensorflow/python:control_flow_ops",
     64         "//tensorflow/python:framework",
     65         "//tensorflow/python:framework_for_generated_wrappers",
     66         "//tensorflow/python:init_ops",
     67         "//tensorflow/python:io_ops",
     68         "//tensorflow/python:logging_ops",
     69         "//tensorflow/python:math_ops",
     70         "//tensorflow/python:platform",
     71         "//tensorflow/python:pywrap_tensorflow",
     72         "//tensorflow/python:resource_variable_ops",
     73         "//tensorflow/python:script_ops",
     74         "//tensorflow/python:smart_cond",
     75         "//tensorflow/python:sort_ops",
     76         "//tensorflow/python:sparse_tensor",
     77         "//tensorflow/python:state_ops",
     78         "//tensorflow/python:state_ops_gen",
     79         "//tensorflow/python:tensor_array_ops",
     80         "//tensorflow/python:tensor_util",
     81         "//tensorflow/python:training",
     82         "//tensorflow/python:util",
     83         "//tensorflow/python:variable_scope",
     84         "//tensorflow/python:variables",
     85         "//tensorflow/python/eager:context",
     86         "//tensorflow/python/eager:function",
     87         "//third_party/py/numpy",
     88         "@six_archive//:six",
     89     ],
     90 )
     91 
     92 tf_kernel_library(
     93     name = "variable_kernels",
     94     srcs = [
     95         "kernels/zero_initializer_op.cc",
     96         "kernels/zero_initializer_op.h",
     97     ],
     98     gpu_srcs = [
     99         "kernels/zero_initializer_op_gpu.cu.cc",
    100         "kernels/zero_initializer_op.h",
    101     ],
    102     deps = [
    103         "//tensorflow/core:framework",
    104         "//tensorflow/core:framework_headers_lib",
    105         "//third_party/eigen3",
    106     ],
    107     alwayslink = 1,
    108 )
    109 
    110 tf_custom_op_library(
    111     name = "python/ops/_variable_ops.so",
    112     srcs = [
    113         "kernels/zero_initializer_op.cc",
    114         "kernels/zero_initializer_op.h",
    115         "ops/variable_ops.cc",
    116     ],
    117     gpu_srcs = [
    118         "kernels/zero_initializer_op_gpu.cu.cc",
    119         "kernels/zero_initializer_op.h",
    120     ],
    121 )
    122 
    123 tf_gen_op_libs(
    124     op_lib_names = [
    125         "variable_ops",
    126     ],
    127 )
    128 
    129 cc_library(
    130     name = "all_ops",
    131     deps = [
    132         ":variable_ops_op_lib",
    133     ],
    134 )
    135 
    136 tf_gen_op_wrapper_py(
    137     name = "gen_variable_ops",
    138     out = "python/ops/gen_variable_ops.py",
    139     deps = [
    140         ":variable_ops_op_lib",
    141     ],
    142 )
    143 
    144 py_test(
    145     name = "arg_scope_test",
    146     size = "small",
    147     srcs = ["python/ops/arg_scope_test.py"],
    148     srcs_version = "PY2AND3",
    149     deps = [
    150         ":framework_py",
    151         "//tensorflow/python:client_testlib",
    152     ],
    153 )
    154 
    155 py_test(
    156     name = "checkpoint_utils_test",
    157     size = "small",
    158     srcs = ["python/framework/checkpoint_utils_test.py"],
    159     srcs_version = "PY2AND3",
    160     tags = ["manual"],  # http://b/30468735
    161     deps = [
    162         ":framework_py",
    163         "//tensorflow/python:client_testlib",
    164         "//tensorflow/python:errors",
    165         "//tensorflow/python:framework_for_generated_wrappers",
    166         "//tensorflow/python:init_ops",
    167         "//tensorflow/python:partitioned_variables",
    168         "//tensorflow/python:training",
    169         "//tensorflow/python:variable_scope",
    170         "//tensorflow/python:variables",
    171     ],
    172 )
    173 
    174 py_test(
    175     name = "ops_test",
    176     size = "small",
    177     srcs = ["python/ops/ops_test.py"],
    178     srcs_version = "PY2AND3",
    179     deps = [
    180         ":framework_py",
    181         "//tensorflow/python:client_testlib",
    182         "//tensorflow/python:framework_for_generated_wrappers",
    183     ],
    184 )
    185 
    186 py_test(
    187     name = "prettyprint_ops_test",
    188     size = "small",
    189     srcs = ["python/ops/prettyprint_ops_test.py"],
    190     srcs_version = "PY2AND3",
    191     deps = [
    192         ":framework_py",
    193         "//tensorflow/python:client_testlib",
    194         "//tensorflow/python:framework_for_generated_wrappers",
    195         "//tensorflow/python:sparse_ops",
    196         "//tensorflow/python:sparse_tensor",
    197         "//tensorflow/python:tensor_array_ops",
    198         "//tensorflow/python:variables",
    199         "//third_party/py/numpy",
    200     ],
    201 )
    202 
    203 py_test(
    204     name = "experimental_test",
    205     srcs = ["python/framework/experimental_test.py"],
    206     srcs_version = "PY2AND3",
    207     deps = [
    208         ":framework_py",
    209         "//tensorflow/python:client_testlib",
    210         "//tensorflow/python:platform",
    211     ],
    212 )
    213 
    214 py_test(
    215     name = "graph_util_test",
    216     srcs = ["python/framework/graph_util_test.py"],
    217     srcs_version = "PY2AND3",
    218     deps = [
    219         ":framework_py",
    220         "//tensorflow/python:client_testlib",
    221         "//tensorflow/python:platform",
    222     ],
    223 )
    224 
    225 py_test(
    226     name = "tensor_util_test",
    227     srcs = ["python/framework/tensor_util_test.py"],
    228     srcs_version = "PY2AND3",
    229     deps = [
    230         ":framework_py",
    231         "//tensorflow/python:array_ops",
    232         "//tensorflow/python:client_testlib",
    233         "//tensorflow/python:errors",
    234         "//tensorflow/python:framework_for_generated_wrappers",
    235         "//tensorflow/python:sparse_tensor",
    236         "//tensorflow/python:variables",
    237         "//third_party/py/numpy",
    238     ],
    239 )
    240 
    241 py_test(
    242     name = "variables_test",
    243     size = "small",
    244     srcs = ["python/ops/variables_test.py"],
    245     srcs_version = "PY2AND3",
    246     tags = ["manual"],
    247     deps = [
    248         ":framework_py",
    249         "//tensorflow/python:array_ops",
    250         "//tensorflow/python:client_testlib",
    251         "//tensorflow/python:errors",
    252         "//tensorflow/python:framework_for_generated_wrappers",
    253         "//tensorflow/python:init_ops",
    254         "//tensorflow/python:nn_ops",
    255         "//tensorflow/python:partitioned_variables",
    256         "//tensorflow/python:platform",
    257         "//tensorflow/python:resource_variable_ops",
    258         "//tensorflow/python:session",
    259         "//tensorflow/python:training",
    260         "//tensorflow/python:variable_scope",
    261         "//tensorflow/python:variables",
    262         "//third_party/py/numpy",
    263     ],
    264 )
    265 
    266 filegroup(
    267     name = "checkpoint_ops_testdata",
    268     srcs = [
    269         "testdata/bundle_checkpoint.data-00000-of-00001",
    270         "testdata/bundle_checkpoint.index",
    271         "testdata/bundle_checkpoint_vocab.txt",
    272         "testdata/bundle_checkpoint_vocab_with_oov.txt",
    273         "testdata/keyword.txt",
    274         "testdata/keyword_new.txt",
    275     ],
    276 )
    277 
    278 py_test(
    279     name = "checkpoint_ops_test",
    280     size = "medium",
    281     srcs = ["python/ops/checkpoint_ops_test.py"],
    282     data = [":checkpoint_ops_testdata"],
    283     srcs_version = "PY2AND3",
    284     tags = ["no_pip"],
    285     deps = [
    286         ":framework_py",
    287         "//tensorflow/python:array_ops",
    288         "//tensorflow/python:client_testlib",
    289         "//tensorflow/python:constant_op",
    290         "//tensorflow/python:dtypes",
    291         "//tensorflow/python:framework_ops",
    292         "//tensorflow/python:math_ops",
    293         "//tensorflow/python:partitioned_variables",
    294         "//tensorflow/python:platform",
    295         "//tensorflow/python:training",
    296         "//tensorflow/python:variable_scope",
    297         "//tensorflow/python:variables",
    298         "//third_party/py/numpy",
    299     ],
    300 )
    301