• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load(
2    "//tensorflow:tensorflow.bzl",
3    "tf_cc_test",
4)
5
6package(
7    # To suppress build cleaner error about inclusion of schema_generate.h.
8    features = ["-layering_check"],
9    licenses = ["notice"],
10)
11
12cc_library(
13    name = "operator",
14    srcs = [
15        "operator.cc",
16    ],
17    hdrs = [
18        "builtin_operator.h",
19        "custom_operator.h",
20        "operator.h",
21        "simple_operator.h",
22    ],
23    visibility = [
24        "//tensorflow/lite/toco:__subpackages__",
25    ],
26    deps = [
27        ":types",
28        "//tensorflow/core:framework",
29        "//tensorflow/core:protos_all_cc",
30        "//tensorflow/core:ptr_util",
31        "//tensorflow/lite/delegates/flex:allowlisted_flex_ops_lib",
32        "//tensorflow/lite/schema:schema_fbs",
33        "//tensorflow/lite/toco:graph_transformations",
34        "//tensorflow/lite/toco:model",
35        "//tensorflow/lite/tools/versioning",
36        "@com_google_absl//absl/memory",
37        "@flatbuffers",
38    ],
39)
40
41tf_cc_test(
42    name = "operator_test",
43    srcs = [
44        "operator_test.cc",
45    ],
46    deps = [
47        ":operator",
48        "//tensorflow/core:ops",
49        "//tensorflow/core:protos_all_cc",
50        "//tensorflow/lite/toco:tooling_util",
51        "@com_google_googletest//:gtest_main",
52        "@flatbuffers",
53    ],
54)
55
56cc_library(
57    name = "types",
58    srcs = [
59        "types.cc",
60    ],
61    hdrs = [
62        "types.h",
63    ],
64    deps = [
65        "//tensorflow/lite:string_util",
66        "//tensorflow/lite/schema:schema_fbs",
67        "//tensorflow/lite/toco:model",
68    ],
69)
70
71tf_cc_test(
72    name = "types_test",
73    srcs = [
74        "types_test.cc",
75    ],
76    deps = [
77        ":types",
78        "//tensorflow/core:ops",
79        "@com_google_googletest//:gtest_main",
80    ],
81)
82
83cc_library(
84    name = "export",
85    srcs = [
86        "export.cc",
87    ],
88    hdrs = [
89        "export.h",
90    ],
91    visibility = ["//visibility:public"],
92    deps = [
93        ":operator",
94        ":types",
95        "//tensorflow/lite:schema_fbs_version",
96        "//tensorflow/lite/schema:schema_conversion_utils",
97        "//tensorflow/lite/schema:schema_fbs",
98        "//tensorflow/lite/toco:model",
99        "//tensorflow/lite/toco:tooling_util",
100        "//tensorflow/lite/tools/optimize:quantize_weights",
101        "//tensorflow/lite/tools/versioning",
102        "@com_google_absl//absl/strings",
103        "@flatbuffers",
104    ],
105)
106
107tf_cc_test(
108    name = "export_test",
109    srcs = [
110        "export_test.cc",
111    ],
112    deps = [
113        ":export",
114        ":operator",
115        "//tensorflow/core:ops",
116        "//tensorflow/lite/schema:schema_fbs",
117        "//tensorflow/lite/schema:schema_utils",
118        "@com_google_googletest//:gtest_main",
119        "@flatbuffers",
120    ],
121)
122
123cc_library(
124    name = "import",
125    srcs = [
126        "import.cc",
127    ],
128    hdrs = [
129        "import.h",
130    ],
131    visibility = ["//visibility:public"],
132    deps = [
133        ":operator",
134        ":types",
135        "//tensorflow/lite:framework",
136        "//tensorflow/lite/schema:schema_fbs",
137        "//tensorflow/lite/schema:schema_utils",
138        "//tensorflow/lite/toco:model",
139        "//tensorflow/lite/toco:tooling_util",
140        "//tensorflow/lite/tools:verifier",
141        "@flatbuffers",
142    ],
143)
144
145tf_cc_test(
146    name = "import_test",
147    srcs = [
148        "import_test.cc",
149    ],
150    deps = [
151        ":import",
152        "//tensorflow/core:ops",
153        "//tensorflow/lite:schema_fbs_version",
154        "//tensorflow/lite/schema:schema_conversion_utils",
155        "//tensorflow/lite/schema:schema_fbs",
156        "@com_google_googletest//:gtest_main",
157        "@flatbuffers",
158    ],
159)
160