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
|
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"])
load(
"//tensorflow:tensorflow.bzl",
"py_test",
"tf_gen_op_libs",
"tf_custom_op_library",
"tf_custom_op_py_library",
"tf_gen_op_wrapper_py",
)
cc_library(
name = "all_ops",
srcs = [":custom_op_sources"],
hdrs = [":custom_op_headers"],
deps = [
"//tensorflow/core:framework_headers_lib",
"//third_party/eigen3",
"@protobuf_archive//:protobuf_headers",
],
alwayslink = 1,
)
tf_custom_op_library(
name = "python/ops/_periodic_resample_op.so",
srcs = [
":custom_op_headers",
":custom_op_sources",
],
)
tf_gen_op_libs(
op_lib_names = ["array_ops"],
)
tf_gen_op_wrapper_py(
name = "gen_periodic_resample_op_py",
out = "python/ops/gen_periodic_resample_op.py",
deps = [":array_ops_op_lib"],
)
tf_custom_op_py_library(
name = "periodic_resample_op_py",
srcs = ["python/ops/periodic_resample_op.py"],
dso = ["python/ops/_periodic_resample_op.so"],
kernels = [
":array_ops_op_lib",
],
srcs_version = "PY2AND3",
deps = [
":gen_periodic_resample_op_py",
"//tensorflow/core:protos_all_py",
"//tensorflow/python:framework_for_generated_wrappers",
],
)
py_library(
name = "init_py",
srcs = [
"__init__.py",
"python/__init__.py",
],
srcs_version = "PY2AND3",
tags = [
"notap",
],
deps = [
":periodic_resample_op_py",
],
)
py_test(
name = "periodic_resample_op_test",
srcs = ["python/kernel_tests/periodic_resample_op_test.py"],
srcs_version = "PY2AND3",
tags = [
"notap",
],
deps = [
":init_py",
"//tensorflow/contrib/util:util_py",
"//tensorflow/python:framework_test_lib",
],
)
# py_library(
# name = "periodic_resample_op_py",
# srcs = ["python/ops/periodic_resample_op.py"],
# data = ["python/ops/_periodic_resample_op.so"],
# srcs_version = "PY2AND3",
# )
filegroup(
name = "all_files",
srcs = glob(
["**/*"],
exclude = [
"**/METADATA",
"**/OWNERS",
],
),
visibility = ["//tensorflow:__subpackages__"],
)
filegroup(
name = "custom_op_sources",
srcs = glob(
[
"ops/*.cc",
"kernels/*.cc",
],
exclude = [
"ops/*_test.cc",
"kernels/*_test.cc",
],
),
)
filegroup(
name = "custom_op_headers",
srcs = glob(
[
"kernels/*.h",
"ops/*.h",
],
),
)
|