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
|
#
# This is a TF Lite delegate that is powered by TensorFlow's Eager.
#
package(default_visibility = [
"//visibility:public",
])
licenses(["notice"]) # Apache 2.0
load("//tensorflow:tensorflow.bzl", "tf_cc_test")
cc_library(
name = "buffer_map",
srcs = ["buffer_map.cc"],
hdrs = ["buffer_map.h"],
deps = [
":util",
"//tensorflow/c:c_api_internal",
"//tensorflow/contrib/lite:framework",
"//tensorflow/contrib/lite:kernel_api",
"//tensorflow/core:framework",
"//tensorflow/core:protos_all_cc",
],
)
tf_cc_test(
name = "buffer_map_test",
size = "small",
srcs = ["buffer_map_test.cc"],
tags = [
"tflite_not_portable",
],
deps = [
":buffer_map",
"//tensorflow/contrib/lite:framework",
"//tensorflow/contrib/lite:util",
"//tensorflow/contrib/lite/testing:util",
"@com_google_googletest//:gtest",
],
)
cc_library(
name = "delegate",
srcs = [
"delegate.cc",
],
hdrs = [
"delegate.h",
],
deps = [
":buffer_map",
":delegate_data",
":kernel",
":util",
"//tensorflow/contrib/lite:framework",
"//tensorflow/contrib/lite:kernel_api",
"//tensorflow/contrib/lite:util",
"//tensorflow/core:lib",
],
)
tf_cc_test(
name = "delegate_test",
size = "small",
srcs = ["delegate_test.cc"],
tags = [
"tflite_not_portable",
],
deps = [
":delegate",
":test_util",
"//tensorflow/contrib/lite/kernels:test_util",
"@com_google_googletest//:gtest",
],
)
cc_library(
name = "delegate_data",
srcs = ["delegate_data.cc"],
hdrs = ["delegate_data.h"],
deps = [
":buffer_map",
"//tensorflow/core:core_cpu",
"//tensorflow/core:lib",
"//tensorflow/core/common_runtime/eager:context",
],
)
tf_cc_test(
name = "delegate_data_test",
size = "small",
srcs = ["delegate_data_test.cc"],
tags = [
"tflite_not_portable",
],
deps = [
":delegate_data",
"//tensorflow/contrib/lite:framework",
"//tensorflow/contrib/lite:util",
"//tensorflow/contrib/lite/testing:util",
"@com_google_googletest//:gtest",
],
)
cc_library(
name = "kernel",
srcs = ["kernel.cc"],
hdrs = ["kernel.h"],
deps = [
":delegate_data",
":util",
"//tensorflow/contrib/lite:framework",
"//tensorflow/contrib/lite:kernel_api",
"//tensorflow/contrib/lite:string",
"//tensorflow/contrib/lite/kernels:kernel_util",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core/common_runtime/eager:context",
"//tensorflow/core/common_runtime/eager:execute",
"//tensorflow/core/common_runtime/eager:tensor_handle",
"@flatbuffers",
],
)
tf_cc_test(
name = "kernel_test",
size = "small",
srcs = ["kernel_test.cc"],
tags = [
"tflite_not_portable",
],
deps = [
":delegate_data",
":kernel",
":test_util",
"@com_google_googletest//:gtest",
],
)
cc_library(
name = "test_util",
testonly = True,
srcs = ["test_util.cc"],
hdrs = ["test_util.h"],
deps = [
"//tensorflow/c:c_api_internal",
"//tensorflow/contrib/lite:string",
"//tensorflow/contrib/lite/kernels:test_util",
"@com_google_absl//absl/memory",
"@flatbuffers",
],
)
cc_library(
name = "util",
srcs = ["util.cc"],
hdrs = ["util.h"],
deps = [
":constants",
"//tensorflow/c:c_api_internal",
"//tensorflow/contrib/lite:framework",
"//tensorflow/contrib/lite:kernel_api",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
],
)
tf_cc_test(
name = "util_test",
size = "small",
srcs = ["util_test.cc"],
tags = [
"tflite_not_portable",
],
deps = [
":util",
"//tensorflow/contrib/lite:string",
"//tensorflow/contrib/lite/testing:util",
"@com_google_googletest//:gtest",
],
)
cc_library(
name = "constants",
hdrs = ["constants.h"],
)
|