Internal change

PiperOrigin-RevId: 521834742
This commit is contained in:
MediaPipe Team 2023-04-04 12:28:25 -07:00 committed by Copybara-Service
parent a98f6bf231
commit 55bcfcb4f5
4 changed files with 26 additions and 33 deletions

View File

@ -467,10 +467,6 @@ cc_library(
"-x objective-c++",
"-fobjc-arc", # enable reference-counting
],
linkopts = [
"-framework CoreVideo",
"-framework MetalKit",
],
tags = ["ios"],
deps = [
"inference_calculator_interface",
@ -486,7 +482,13 @@ cc_library(
"@org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate_internal",
"@org_tensorflow//tensorflow/lite/delegates/gpu/common:shape",
"@org_tensorflow//tensorflow/lite/delegates/gpu/metal:buffer_convert",
],
] + select({
"//mediapipe:apple": [
"//third_party/apple_frameworks:CoreVideo",
"//third_party/apple_frameworks:MetalKit",
],
"//conditions:default": [],
}),
alwayslink = 1,
)
@ -721,13 +723,6 @@ cc_library(
"//conditions:default": [],
}),
features = ["-layering_check"], # allow depending on tensors_to_detections_calculator_gpu_deps
linkopts = select({
"//mediapipe:apple": [
"-framework CoreVideo",
"-framework MetalKit",
],
"//conditions:default": [],
}),
deps = [
":tensors_to_detections_calculator_cc_proto",
"//mediapipe/framework:calculator_framework",
@ -744,6 +739,12 @@ cc_library(
] + selects.with_or({
":compute_shader_unavailable": [],
"//conditions:default": [":tensors_to_detections_calculator_gpu_deps"],
}) + select({
"//mediapipe:apple": [
"//third_party/apple_frameworks:CoreVideo",
"//third_party/apple_frameworks:MetalKit",
],
"//conditions:default": [],
}),
alwayslink = 1,
)
@ -1333,6 +1334,7 @@ cc_library(
"//mediapipe:ios": [
"//mediapipe/gpu:MPPMetalUtil",
"//mediapipe/gpu:MPPMetalHelper",
"//third_party/apple_frameworks:MetalKit",
],
"//conditions:default": [
"@org_tensorflow//tensorflow/lite/delegates/gpu:gl_delegate",

View File

@ -193,13 +193,6 @@ cc_library(
":edge_tpu_pci": ["MEDIAPIPE_EDGE_TPU=pci"],
":edge_tpu_all": ["MEDIAPIPE_EDGE_TPU=all"],
}),
linkopts = select({
"//mediapipe:ios": [
"-framework CoreVideo",
"-framework MetalKit",
],
"//conditions:default": [],
}),
deps = [
":tflite_inference_calculator_cc_proto",
"//mediapipe/framework:calculator_framework",
@ -222,6 +215,8 @@ cc_library(
"@org_tensorflow//tensorflow/lite/delegates/gpu/metal:buffer_convert",
"@org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate",
"@org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate_internal",
"//third_party/apple_frameworks:MetalKit",
"//third_party/apple_frameworks:CoreVideo",
],
"//conditions:default": [
"//mediapipe/util/tflite:tflite_gpu_runner",
@ -271,13 +266,6 @@ cc_library(
],
"//conditions:default": [],
}),
linkopts = select({
"//mediapipe:ios": [
"-framework CoreVideo",
"-framework MetalKit",
],
"//conditions:default": [],
}),
deps = [
":tflite_converter_calculator_cc_proto",
"//mediapipe/framework:calculator_framework",
@ -296,6 +284,8 @@ cc_library(
"//mediapipe/gpu:MPPMetalHelper",
"//mediapipe/objc:mediapipe_framework_ios",
"@org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate",
"//third_party/apple_frameworks:MetalKit",
"//third_party/apple_frameworks:CoreVideo",
],
"//conditions:default": [
"//mediapipe/gpu:gl_calculator_helper",
@ -393,13 +383,6 @@ cc_library(
],
"//conditions:default": [],
}),
linkopts = select({
"//mediapipe:ios": [
"-framework CoreVideo",
"-framework MetalKit",
],
"//conditions:default": [],
}),
deps = [
":tflite_tensors_to_detections_calculator_cc_proto",
"//mediapipe/framework:calculator_framework",
@ -420,6 +403,8 @@ cc_library(
"//mediapipe/gpu:MPPMetalHelper",
"//mediapipe/objc:mediapipe_framework_ios",
"@org_tensorflow//tensorflow/lite/delegates/gpu:metal_delegate",
"//third_party/apple_frameworks:MetalKit",
"//third_party/apple_frameworks:CoreVideo",
],
"//conditions:default": [
"//mediapipe/gpu:gl_calculator_helper",

View File

@ -89,6 +89,7 @@ objc_library(
"//mediapipe/gpu:metal_shared_resources",
"//mediapipe/gpu:pixel_buffer_pool_util",
"//mediapipe/util:cpu_util",
"//third_party/apple_frameworks:AVFoundation",
"//third_party/apple_frameworks:Accelerate",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/memory",

View File

@ -32,6 +32,11 @@ cc_library(
linkopts = ["-framework Metal"],
)
cc_library(
name = "MetalKit",
linkopts = ["-framework MetalKit"],
)
cc_library(
name = "MetalPerformanceShaders",
linkopts = ["-framework MetalPerformanceShaders"],