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