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