Created new ios.bzl with TFL constants
This commit is contained in:
parent
03105c2a62
commit
37d81082fe
15
mediapipe/tasks/ios/ios.bzl
Normal file
15
mediapipe/tasks/ios/ios.bzl
Normal file
|
@ -0,0 +1,15 @@
|
|||
"""Mediapipe Task Library Helper Rules for iOS"""
|
||||
|
||||
MPP_TASK_MINIMUM_OS_VERSION = "11.0"
|
||||
|
||||
# Default tags for filtering iOS targets. Targets are restricted to Apple platforms.
|
||||
MPP_TASK_DEFAULT_TAGS = [
|
||||
"apple",
|
||||
]
|
||||
|
||||
# Following sanitizer tests are not supported by iOS test targets.
|
||||
MPP_TASK_DISABLED_SANITIZER_TAGS = [
|
||||
"noasan",
|
||||
"nomsan",
|
||||
"notsan",
|
||||
]
|
|
@ -1,31 +1,22 @@
|
|||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
|
||||
load("@org_tensorflow//tensorflow/lite:special_rules.bzl", "tflite_ios_lab_runner")
|
||||
load(
|
||||
"//mediapipe/tasks:ios/ios.bzl",
|
||||
"MPP_TASK_MINIMUM_OS_VERSION",
|
||||
"MPP_TASK_DEFAULT_TAGS",
|
||||
"MPP_TASK_DISABLED_SANITIZER_TAGS",
|
||||
)
|
||||
load(
|
||||
"@build_bazel_rules_apple//apple:ios.bzl",
|
||||
"ios_unit_test",
|
||||
)
|
||||
load(
|
||||
"@org_tensorflow//tensorflow/lite:special_rules.bzl",
|
||||
"tflite_ios_lab_runner"
|
||||
)
|
||||
|
||||
package(default_visibility = ["//mediapipe/tasks:internal"])
|
||||
|
||||
licenses(["notice"])
|
||||
|
||||
TFL_MINIMUM_OS_VERSION = "11.0"
|
||||
# LINT.ThenChange(
|
||||
# TensorFlowLiteC.podspec.template,
|
||||
# TensorFlowLiteSelectTfOps.podspec.template,
|
||||
# ../objc/TensorFlowLiteObjC.podspec.template,
|
||||
# ../swift/TensorFlowLiteSwift.podspec.template
|
||||
# )
|
||||
|
||||
# Default tags for filtering iOS targets. Targets are restricted to Apple platforms.
|
||||
TFL_DEFAULT_TAGS = [
|
||||
"apple",
|
||||
]
|
||||
|
||||
# Following sanitizer tests are not supported by iOS test targets.
|
||||
TFL_DISABLED_SANITIZER_TAGS = [
|
||||
"noasan",
|
||||
"nomsan",
|
||||
"notsan",
|
||||
]
|
||||
|
||||
|
||||
objc_library(
|
||||
name = "MPPTextClassifierObjcTestLibrary",
|
||||
testonly = 1,
|
||||
|
@ -34,7 +25,7 @@ objc_library(
|
|||
"//mediapipe/tasks/testdata/text:bert_text_classifier_models",
|
||||
"//mediapipe/tasks/testdata/text:text_classifier_models",
|
||||
],
|
||||
tags = TFL_DEFAULT_TAGS,
|
||||
tags = MPP_TASK_DEFAULT_TAGS,
|
||||
copts = [
|
||||
"-ObjC++",
|
||||
"-std=c++17",
|
||||
|
@ -47,9 +38,9 @@ objc_library(
|
|||
|
||||
ios_unit_test(
|
||||
name = "MPPTextClassifierObjcTest",
|
||||
minimum_os_version = TFL_MINIMUM_OS_VERSION,
|
||||
minimum_os_version = MPP_TASK_MINIMUM_OS_VERSION,
|
||||
runner = tflite_ios_lab_runner("IOS_LATEST"),
|
||||
tags = TFL_DEFAULT_TAGS + TFL_DISABLED_SANITIZER_TAGS,
|
||||
tags = MPP_TASK_DEFAULT_TAGS + MPP_TASK_DISABLED_SANITIZER_TAGS,
|
||||
deps = [
|
||||
":MPPTextClassifierObjcTestLibrary",
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue
Block a user