Export GPU allowlist database and flatbuffer java library BUILD targets.

PiperOrigin-RevId: 326493266
Change-Id: Ib87006ee2ee3e3723f422ef7bf20a382a4de34ef
This commit is contained in:
A. Unique TensorFlower 2020-08-13 11:56:05 -07:00 committed by TensorFlower Gardener
parent 81c7839e8e
commit 019cd527de
2 changed files with 14 additions and 6 deletions

View File

@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
# ============================================================================== # ==============================================================================
load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") load("@flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_java_library")
load("//tensorflow/lite:special_rules.bzl", "tflite_extra_gles_deps", "tflite_portable_test_suite") load("//tensorflow/lite:special_rules.bzl", "tflite_extra_gles_deps", "tflite_portable_test_suite")
package( package(
@ -30,6 +30,12 @@ flatbuffer_cc_library(
exports_files(srcs = ["database.fbs"]) exports_files(srcs = ["database.fbs"])
flatbuffer_java_library(
name = "database_fbs_java",
srcs = ["database.fbs"],
package_prefix = "org.tensorflow",
)
cc_library( cc_library(
name = "devicedb", name = "devicedb",
srcs = [ srcs = [
@ -118,6 +124,8 @@ cc_test(
], ],
) )
exports_files(["gpu_compatibility.bin"])
genrule( genrule(
name = "gpu_compatibility_binary", name = "gpu_compatibility_binary",
srcs = ["gpu_compatibility.bin"], srcs = ["gpu_compatibility.bin"],

View File

@ -28,15 +28,15 @@ enum Comparison : byte {
// The structure describes a decision tree, with multiple matching branches. // The structure describes a decision tree, with multiple matching branches.
// The branches are applied depth-first. // The branches are applied depth-first.
table DeviceDatabase { table DeviceDatabase {
root:[tflite.acceleration.DeviceDecisionTreeNode]; root:[DeviceDecisionTreeNode];
} }
table DeviceDecisionTreeNode { table DeviceDecisionTreeNode {
// The variables are strings, as we have multiple clients that want to // The variables are strings, as we have multiple clients that want to
// introduce their own fields. Known variables are listed in variables.h. // introduce their own fields. Known variables are listed in variables.h.
variable:string (shared); variable:string (shared);
comparison:tflite.acceleration.Comparison; comparison:Comparison;
items:[tflite.acceleration.DeviceDecisionTreeEdge]; items:[DeviceDecisionTreeEdge];
} }
table DeviceDecisionTreeEdge { table DeviceDecisionTreeEdge {
@ -44,9 +44,9 @@ table DeviceDecisionTreeEdge {
value:string (key, shared); value:string (key, shared);
// Which child branches should also be consulted and used to override this // Which child branches should also be consulted and used to override this
// node. // node.
children:[tflite.acceleration.DeviceDecisionTreeNode]; children:[DeviceDecisionTreeNode];
// What information can be derived about this device. // What information can be derived about this device.
derived_properties:[tflite.acceleration.DerivedProperty]; derived_properties:[DerivedProperty];
} }
// Derived variable value to combine with detected variables. // Derived variable value to combine with detected variables.