1 package(default_visibility = ["//tensorflow:internal"]) 2 3 licenses(["notice"]) # Apache 2.0 4 5 exports_files(["LICENSE"]) 6 7 load( 8 "//tensorflow:tensorflow.bzl", 9 "tf_gen_op_wrapper_py", 10 "tf_kernel_library", 11 ) 12 load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library") 13 14 py_library( 15 name = "dataset_ops", 16 srcs = [ 17 "counter.py", 18 "get_single_element.py", 19 ], 20 srcs_version = "PY2AND3", 21 deps = [ 22 ":transformation_ops", 23 "//tensorflow/python:dataset_ops_gen", 24 "//tensorflow/python:util", 25 "//tensorflow/python/data/ops:dataset_ops", 26 "//tensorflow/python/data/util:nest", 27 ], 28 ) 29 30 py_library( 31 name = "iterator_ops", 32 srcs = [ 33 "iterator_ops.py", 34 ], 35 srcs_version = "PY2AND3", 36 deps = [ 37 "//tensorflow/python:dataset_ops_gen", 38 "//tensorflow/python:framework_ops", 39 "//tensorflow/python:training", 40 ], 41 ) 42 43 py_library( 44 name = "random_ops", 45 srcs = [ 46 "random_ops.py", 47 ], 48 srcs_version = "PY2AND3", 49 deps = [ 50 "//tensorflow/python:constant_op", 51 "//tensorflow/python:dataset_ops_gen", 52 "//tensorflow/python:dtypes", 53 "//tensorflow/python:framework_ops", 54 "//tensorflow/python:random_seed", 55 "//tensorflow/python:tensor_shape", 56 "//tensorflow/python/data/ops:dataset_ops", 57 "//tensorflow/python/data/util:nest", 58 "//tensorflow/python/data/util:sparse", 59 ], 60 ) 61 62 py_library( 63 name = "readers", 64 srcs = [ 65 "readers.py", 66 ], 67 srcs_version = "PY2AND3", 68 deps = [ 69 ":dataset_ops", 70 "//tensorflow/python:dataset_ops_gen", 71 "//tensorflow/python:dtypes", 72 "//tensorflow/python:framework_ops", 73 "//tensorflow/python:parsing_ops", 74 "//tensorflow/python:platform", 75 "//tensorflow/python:sparse_tensor", 76 "//tensorflow/python:tensor_shape", 77 "//tensorflow/python:util", 78 "//tensorflow/python/data/ops:dataset_ops", 79 "//tensorflow/python/data/ops:readers", 80 "//tensorflow/python/data/util:nest", 81 ], 82 ) 83 84 py_library( 85 name = "shuffle_ops", 86 srcs = [ 87 "shuffle_ops.py", 88 ], 89 srcs_version = "PY2AND3", 90 deps = [ 91 ":random_ops", 92 ":transformation_ops", 93 "//tensorflow/python/data/ops:dataset_ops", 94 ], 95 ) 96 97 py_library( 98 name = "transformation_ops", 99 srcs = [ 100 "batching.py", 101 "enumerate_ops.py", 102 "error_ops.py", 103 "grouping.py", 104 "interleave_ops.py", 105 "resampling.py", 106 "scan_ops.py", 107 "stats_ops.py", 108 "unique.py", 109 ], 110 srcs_version = "PY2AND3", 111 deps = [ 112 ":contrib_op_loader", 113 ":gen_dataset_ops", 114 "//tensorflow/python:array_ops", 115 "//tensorflow/python:control_flow_ops", 116 "//tensorflow/python:dataset_ops_gen", 117 "//tensorflow/python:dtypes", 118 "//tensorflow/python:framework_ops", 119 "//tensorflow/python:function", 120 "//tensorflow/python:logging_ops", 121 "//tensorflow/python:math_ops", 122 "//tensorflow/python:random_ops", 123 "//tensorflow/python:tensor_shape", 124 "//tensorflow/python:tensor_util", 125 "//tensorflow/python:util", 126 "//tensorflow/python/data/ops:dataset_ops", 127 "//tensorflow/python/data/util:convert", 128 "//tensorflow/python/data/util:nest", 129 "//tensorflow/python/data/util:sparse", 130 "//third_party/py/numpy", 131 ], 132 ) 133 134 tf_gen_op_wrapper_py( 135 name = "gen_dataset_ops", 136 out = "gen_dataset_ops.py", 137 deps = ["//tensorflow/contrib/data:dataset_ops_op_lib"], 138 ) 139 140 tf_kernel_library( 141 name = "dataset_ops_kernels", 142 deps = [ 143 "//tensorflow/contrib/data/kernels:dataset_kernels", 144 "//tensorflow/core:framework", 145 ], 146 alwayslink = 1, 147 ) 148 149 tf_custom_op_py_library( 150 name = "contrib_op_loader", 151 srcs = ["contrib_op_loader.py"], 152 dso = ["//tensorflow/contrib/data:_dataset_ops.so"], 153 kernels = [ 154 ":dataset_ops_kernels", 155 "//tensorflow/contrib/data:dataset_ops_op_lib", 156 ], 157 srcs_version = "PY2AND3", 158 deps = [ 159 ":gen_dataset_ops", 160 "//tensorflow/contrib/util:util_py", 161 "//tensorflow/python:platform", 162 ], 163 ) 164 165 py_library( 166 name = "prefetching_ops", 167 srcs = ["prefetching_ops.py"], 168 deps = [ 169 ":contrib_op_loader", 170 ], 171 ) 172 173 filegroup( 174 name = "all_files", 175 srcs = glob( 176 ["**/*"], 177 exclude = [ 178 "**/METADATA", 179 "**/OWNERS", 180 ], 181 ), 182 visibility = ["//tensorflow:__subpackages__"], 183 ) 184