1load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") 2 3package( 4 default_visibility = ["//visibility:public"], 5 licenses = ["notice"], 6) 7 8cc_library( 9 name = "arguments", 10 srcs = ["arguments.cc"], 11 hdrs = ["arguments.h"], 12 deps = [ 13 ":buffer_desc", 14 ":gpu_object_desc", 15 ":serialization_base_cc_fbs", 16 ":tensor_desc", 17 ":util", 18 "//tensorflow/lite/delegates/gpu/common:access_type", 19 "//tensorflow/lite/delegates/gpu/common:data_type", 20 "//tensorflow/lite/delegates/gpu/common:status", 21 "//tensorflow/lite/delegates/gpu/common:types", 22 "//tensorflow/lite/delegates/gpu/common:util", 23 "@com_google_absl//absl/strings", 24 "@com_google_absl//absl/strings:str_format", 25 ], 26) 27 28cc_library( 29 name = "buffer_desc", 30 srcs = ["buffer_desc.cc"], 31 hdrs = ["buffer_desc.h"], 32 deps = [ 33 ":gpu_object_desc", 34 ":util", 35 "//tensorflow/lite/delegates/gpu/common:data_type", 36 "//tensorflow/lite/delegates/gpu/common:status", 37 "@com_google_absl//absl/strings", 38 ], 39) 40 41cc_library( 42 name = "compiler_options", 43 hdrs = ["compiler_options.h"], 44) 45 46cc_library( 47 name = "gpu_object_desc", 48 hdrs = ["gpu_object_desc.h"], 49 deps = [ 50 ":serialization_base_cc_fbs", 51 "//tensorflow/lite/delegates/gpu/common:access_type", 52 "//tensorflow/lite/delegates/gpu/common:data_type", 53 "//tensorflow/lite/delegates/gpu/common:gpu_info", 54 "//tensorflow/lite/delegates/gpu/common:status", 55 ], 56) 57 58cc_library( 59 name = "gpu_operation", 60 srcs = ["gpu_operation.cc"], 61 hdrs = ["gpu_operation.h"], 62 deps = [ 63 ":serialization_base_cc_fbs", 64 ":util", 65 "//tensorflow/lite/delegates/gpu/common:access_type", 66 "//tensorflow/lite/delegates/gpu/common:data_type", 67 "//tensorflow/lite/delegates/gpu/common:gpu_info", 68 "//tensorflow/lite/delegates/gpu/common:kernel_info", 69 "//tensorflow/lite/delegates/gpu/common:precision", 70 "//tensorflow/lite/delegates/gpu/common:status", 71 "//tensorflow/lite/delegates/gpu/common:types", 72 "//tensorflow/lite/delegates/gpu/common/task:arguments", 73 "//tensorflow/lite/delegates/gpu/common/task:buffer_desc", 74 "//tensorflow/lite/delegates/gpu/common/task:compiler_options", 75 "//tensorflow/lite/delegates/gpu/common/task:gpu_tensor", 76 "//tensorflow/lite/delegates/gpu/common/task:tensor_desc", 77 "//tensorflow/lite/delegates/gpu/common/task:texture2d_desc", 78 "//tensorflow/lite/delegates/gpu/common/task:tuning_type", 79 "//tensorflow/lite/delegates/gpu/common/task:work_group_picking", 80 "@com_google_absl//absl/strings", 81 ], 82) 83 84cc_library( 85 name = "gpu_tensor", 86 hdrs = ["gpu_tensor.h"], 87 deps = [ 88 "//tensorflow/lite/delegates/gpu/common/task:tensor_desc", 89 ], 90) 91 92cc_library( 93 name = "profiling_info", 94 srcs = ["profiling_info.cc"], 95 hdrs = ["profiling_info.h"], 96 deps = [ 97 "@com_google_absl//absl/time", 98 ], 99) 100 101cc_library( 102 name = "serialization_base", 103 srcs = ["serialization_base.cc"], 104 hdrs = ["serialization_base.h"], 105 deps = [ 106 ":arguments", 107 ":buffer_desc", 108 ":gpu_object_desc", 109 ":gpu_operation", 110 ":serialization_base_cc_fbs", 111 ":tensor_desc", 112 "//tensorflow/lite/delegates/gpu/common:precision", 113 "//tensorflow/lite/delegates/gpu/common:status", 114 "//tensorflow/lite/delegates/gpu/common:types", 115 ], 116) 117 118flatbuffer_cc_library( 119 name = "serialization_base_cc_fbs", 120 srcs = ["serialization_base.fbs"], 121 flatc_args = [ 122 "--scoped-enums", 123 ], 124) 125 126cc_library( 127 name = "tensor_desc", 128 srcs = ["tensor_desc.cc"], 129 hdrs = ["tensor_desc.h"], 130 deps = [ 131 "//tensorflow/lite/delegates/gpu/common:data_type", 132 "//tensorflow/lite/delegates/gpu/common:shape", 133 "//tensorflow/lite/delegates/gpu/common:tensor", 134 "//tensorflow/lite/delegates/gpu/common:types", 135 "//tensorflow/lite/delegates/gpu/common:util", 136 "//tensorflow/lite/delegates/gpu/common/task:gpu_object_desc", 137 "//tensorflow/lite/delegates/gpu/common/task:util", 138 "@com_google_absl//absl/strings", 139 ], 140) 141 142cc_library( 143 name = "testing_util", 144 testonly = 1, 145 srcs = ["testing_util.cc"], 146 hdrs = ["testing_util.h"], 147 deps = [ 148 ":gpu_operation", 149 ":tensor_desc", 150 "//tensorflow/lite/delegates/gpu/common:data_type", 151 "//tensorflow/lite/delegates/gpu/common:gpu_info", 152 "//tensorflow/lite/delegates/gpu/common:gpu_model", 153 "//tensorflow/lite/delegates/gpu/common:precision", 154 "//tensorflow/lite/delegates/gpu/common:shape", 155 "//tensorflow/lite/delegates/gpu/common:tensor", 156 "@com_google_absl//absl/strings", 157 ], 158) 159 160cc_library( 161 name = "texture2d_desc", 162 srcs = ["texture2d_desc.cc"], 163 hdrs = ["texture2d_desc.h"], 164 deps = [ 165 ":gpu_object_desc", 166 "//tensorflow/lite/delegates/gpu/common:data_type", 167 "//tensorflow/lite/delegates/gpu/common:status", 168 "//tensorflow/lite/delegates/gpu/common:types", 169 "@com_google_absl//absl/strings", 170 ], 171) 172 173cc_library( 174 name = "tuning_type", 175 hdrs = ["tuning_type.h"], 176) 177 178cc_library( 179 name = "util", 180 srcs = ["util.cc"], 181 hdrs = ["util.h"], 182 deps = [ 183 ":gpu_object_desc", 184 "//tensorflow/lite/delegates/gpu/common:data_type", 185 "//tensorflow/lite/delegates/gpu/common:gpu_info", 186 "//tensorflow/lite/delegates/gpu/common:precision", 187 "//tensorflow/lite/delegates/gpu/common:types", 188 "//tensorflow/lite/delegates/gpu/common:util", 189 "@com_google_absl//absl/strings", 190 ], 191) 192 193cc_library( 194 name = "weights_conversion", 195 srcs = ["weights_conversion.cc"], 196 hdrs = ["weights_conversion.h"], 197 deps = [ 198 ":weights_layout", 199 "//tensorflow/lite/delegates/gpu/common:data_type", 200 "//tensorflow/lite/delegates/gpu/common:shape", 201 "//tensorflow/lite/delegates/gpu/common:status", 202 "//tensorflow/lite/delegates/gpu/common:tensor", 203 "//tensorflow/lite/delegates/gpu/common:types", 204 "//tensorflow/lite/delegates/gpu/common:util", 205 "@com_google_absl//absl/types:span", 206 ], 207) 208 209cc_library( 210 name = "weights_layout", 211 srcs = ["weights_layout.cc"], 212 hdrs = ["weights_layout.h"], 213 deps = [ 214 "//tensorflow/lite/delegates/gpu/common:data_type", 215 ], 216) 217 218cc_library( 219 name = "work_group_picking", 220 srcs = ["work_group_picking.cc"], 221 hdrs = ["work_group_picking.h"], 222 deps = [ 223 ":tuning_type", 224 "//tensorflow/lite/delegates/gpu/common:gpu_info", 225 "//tensorflow/lite/delegates/gpu/common:kernel_info", 226 "//tensorflow/lite/delegates/gpu/common:types", 227 "//tensorflow/lite/delegates/gpu/common:util", 228 "//tensorflow/lite/delegates/gpu/common:workgroup_selection", 229 ], 230) 231