aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/image/BUILD
blob: 54502cfc6eecb9d064ffde9773e97d893a24133a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# Description:
#   Contains ops for image manipulation.

licenses(["notice"])  # Apache 2.0

exports_files(["LICENSE"])

package(default_visibility = ["//visibility:public"])

load(
    "//tensorflow:tensorflow.bzl",
    "tf_cc_test",
    "tf_custom_op_library",
    "tf_gen_op_libs",
    "tf_gen_op_wrapper_py",
    "tf_kernel_library",
)
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
load("//tensorflow:tensorflow.bzl", "tf_custom_op_py_library")

tf_custom_op_library(
    name = "python/ops/_image_ops.so",
    srcs = [
        "kernels/bipartite_match_op.cc",
        "kernels/image_ops.cc",
        "kernels/image_ops.h",
        "ops/image_ops.cc",
    ],
    gpu_srcs = [
        "kernels/image_ops_gpu.cu.cc",
        "kernels/image_ops.h",
    ],
)

tf_kernel_library(
    name = "image_ops_kernels",
    srcs = [
        "kernels/bipartite_match_op.cc",
        "kernels/image_ops.cc",
        "kernels/image_ops.h",
    ],
    gpu_srcs = [
        "kernels/image_ops_gpu.cu.cc",
        "kernels/image_ops.h",
    ],
    deps = [
        "//tensorflow/core:framework",
        "//tensorflow/core:lib",
        "//third_party/eigen3",
    ],
    alwayslink = 1,
)

tf_gen_op_libs(
    op_lib_names = ["image_ops"],
)

tf_gen_op_wrapper_py(
    name = "image_ops",
    deps = [":image_ops_op_lib"],
)

tf_custom_op_py_library(
    name = "image_py",
    srcs = [
        "__init__.py",
        "python/ops/image_ops.py",
    ],
    dso = [":python/ops/_image_ops.so"],
    kernels = [
        ":image_ops_kernels",
        ":image_ops_op_lib",
    ],
    srcs_version = "PY2AND3",
    deps = [
        ":image_ops",
        "//tensorflow/contrib/util:util_py",
        "//tensorflow/python:array_ops",
        "//tensorflow/python:common_shapes",
        "//tensorflow/python:constant_op",
        "//tensorflow/python:framework_for_generated_wrappers",
        "//tensorflow/python:linalg_ops",
        "//tensorflow/python:math_ops",
        "//tensorflow/python:platform",
        "//tensorflow/python:util",
    ],
)

cuda_py_test(
    name = "image_ops_test",
    size = "medium",
    srcs = ["python/kernel_tests/image_ops_test.py"],
    additional_deps = [
        ":distort_image_py",
        ":image_py",
        ":single_image_random_dot_stereograms_py",
        "//third_party/py/numpy",
        "//tensorflow/python:array_ops",
        "//tensorflow/python:framework_for_generated_wrappers",
        "//tensorflow/python:framework_test_lib",
        "//tensorflow/python:math_ops",
        "//tensorflow/python:platform_test",
    ],
)

tf_custom_op_library(
    name = "python/ops/_distort_image_ops.so",
    srcs = [
        "kernels/adjust_hsv_in_yiq_op.cc",
        "kernels/adjust_hsv_in_yiq_op.h",
        "ops/distort_image_ops.cc",
    ],
    gpu_srcs = [
        "kernels/adjust_hsv_in_yiq_op_gpu.cu.cc",
        "kernels/adjust_hsv_in_yiq_op.h",
    ],
    deps = [
        "//tensorflow/core/kernels:gpu_util_hdrs",
    ],
)

tf_cc_test(
    name = "adjust_hsv_in_yiq_op_test",
    size = "small",
    srcs = [
        "kernels/adjust_hsv_in_yiq_op.h",
        "kernels/adjust_hsv_in_yiq_op_test.cc",
    ],
    deps = [
        "//tensorflow/core:framework",
        "//tensorflow/core:test",
        "//tensorflow/core:test_main",
        "//tensorflow/core:testlib",
        "//tensorflow/core/kernels:ops_testutil",
        "//tensorflow/core/kernels:ops_util",
        "//third_party/eigen3",
    ],
)

tf_gen_op_libs(
    op_lib_names = ["distort_image_ops"],
)

tf_gen_op_wrapper_py(
    name = "distort_image_ops",
    deps = [":distort_image_ops_op_lib"],
)

py_library(
    name = "distort_image_py",
    srcs = [
        "__init__.py",
        "python/ops/distort_image_ops.py",
    ],
    data = [":python/ops/_distort_image_ops.so"],
    srcs_version = "PY2AND3",
    deps = [
        ":distort_image_ops",
        ":single_image_random_dot_stereograms_py",
        "//tensorflow/contrib/util:util_py",
        "//tensorflow/python:framework_for_generated_wrappers",
        "//tensorflow/python:image_ops",
        "//tensorflow/python:platform",
        "//tensorflow/python:random_ops",
        "//tensorflow/python:util",
    ],
)

cuda_py_test(
    name = "distort_image_ops_test",
    size = "medium",
    srcs = ["python/kernel_tests/distort_image_ops_test.py"],
    additional_deps = [
        ":distort_image_py",
        ":image_py",
        ":single_image_random_dot_stereograms_py",
        "//third_party/py/numpy",
        "//tensorflow/python:client",
        "//tensorflow/python:client_testlib",
        "//tensorflow/python:control_flow_ops",
        "//tensorflow/python:framework_for_generated_wrappers",
        "//tensorflow/python:framework_test_lib",
        "//tensorflow/python:math_ops",
        "//tensorflow/python:platform_test",
        "//tensorflow/python:random_ops",
        "//tensorflow/python:variables",
        "//tensorflow/core:protos_all_py",
    ],
)

tf_custom_op_library(
    name = "python/ops/_single_image_random_dot_stereograms.so",
    srcs = [
        "kernels/single_image_random_dot_stereograms_ops.cc",
        "ops/single_image_random_dot_stereograms_ops.cc",
    ],
    deps = [
        "@protobuf_archive//:protobuf",
    ],
)

tf_gen_op_libs(
    op_lib_names = ["single_image_random_dot_stereograms_ops"],
)

tf_gen_op_wrapper_py(
    name = "single_image_random_dot_stereograms_ops",
    deps = [":single_image_random_dot_stereograms_ops_op_lib"],
)

cc_library(
    name = "image_ops_cc",
    srcs = ["ops/image_ops.cc"],
    deps = [
        ":image_ops_kernels",
        "//tensorflow/core:framework",
    ],
    alwayslink = 1,
)

py_library(
    name = "single_image_random_dot_stereograms_py",
    srcs = glob(["python/ops/single*.py"]) + ["__init__.py"],
    data = [":python/ops/_single_image_random_dot_stereograms.so"],
    srcs_version = "PY2AND3",
    deps = [
        ":image_py",
        ":single_image_random_dot_stereograms_ops",
        "//tensorflow/contrib/util:util_py",
        "//tensorflow/python:framework_ops",
        "//tensorflow/python:platform",
        "//tensorflow/python:util",
    ],
)

filegroup(
    name = "all_files",
    srcs = glob(
        ["**/*"],
        exclude = [
            "**/METADATA",
            "**/OWNERS",
        ],
    ),
    visibility = ["//tensorflow:__subpackages__"],
)