xref: /aosp_15_r20/external/tensorflow/tensorflow/lite/delegates/gpu/metal/benchmarking/BUILD (revision b6fb3261f9314811a0f4371741dbb8839866f948)
1load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
2
3package(
4    default_visibility = ["//visibility:public"],
5    licenses = ["notice"],
6)
7
8objc_library(
9    name = "benchmark_lib",
10    srcs = ["main.mm"],
11    data = glob([
12        "models/*.tflite",
13    ]),
14    sdk_frameworks = [
15        "Metal",
16        "QuartzCore",
17    ],
18    deps = [
19        "//tensorflow/lite:framework",
20        "//tensorflow/lite:kernel_api",
21        "//tensorflow/lite/c:common",
22        "//tensorflow/lite/delegates/gpu/common:gpu_info",
23        "//tensorflow/lite/delegates/gpu/common:model",
24        "//tensorflow/lite/delegates/gpu/common:model_builder",
25        "//tensorflow/lite/delegates/gpu/common:model_transformer",
26        "//tensorflow/lite/delegates/gpu/common:precision",
27        "//tensorflow/lite/delegates/gpu/common:shape",
28        "//tensorflow/lite/delegates/gpu/common:util",
29        "//tensorflow/lite/delegates/gpu/common/transformations:model_transformations",
30        "//tensorflow/lite/delegates/gpu/metal:inference_context",
31        "//tensorflow/lite/kernels:builtin_ops",
32        "//tensorflow/lite/kernels:kernel_util",
33    ],
34)
35
36# Application for local benchmarking in XCode
37ios_application(
38    name = "iOSBenchmark",
39    testonly = 1,
40    bundle_id = "com.tensorflow.lite.delegates.gpu.metal.benchmarking",
41    families = [
42        "iphone",
43        "ipad",
44    ],
45    infoplists = ["Info.plist"],
46    minimum_os_version = "12.0",
47    provisioning_profile = "//tensorflow/lite/delegates/gpu/metal/benchmarking:provisioning_profile.mobileprovision",
48    tags = [
49        "local",
50        "notap",
51    ],
52    deps = [":benchmark_lib"],
53)
54