From fc72a2069eb30cd463d29cb66ca5f01cc937a6d5 Mon Sep 17 00:00:00 2001 From: Thai Nguyen Date: Mon, 23 Nov 2020 22:17:04 -0800 Subject: [PATCH] Add a flag to fix Flex delegate linking error fix iOS PiperOrigin-RevId: 343990557 Change-Id: I876dba09ddb675b9e678e8fc9010f4c9a0444953 --- tensorflow/lite/g3doc/guide/ops_select.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tensorflow/lite/g3doc/guide/ops_select.md b/tensorflow/lite/g3doc/guide/ops_select.md index aeff2ccee83..968df5ad9c9 100644 --- a/tensorflow/lite/g3doc/guide/ops_select.md +++ b/tensorflow/lite/g3doc/guide/ops_select.md @@ -142,14 +142,18 @@ alongside the `TensorFlowLiteSwift` or `TensorFlowLiteObjC` CocoaPods. pod 'TensorFlowLiteSelectTfOps', '~> 0.0.1-nightly' ``` -After running `pod install`, you need to provide an additional linker flag to +After running `pod install`, you need to provide additional linker flags to force load the select TF ops framework into your project. In your Xcode project, go to `Build Settings` -> `Other Linker Flags`, and add: ```text -force_load $(SRCROOT)/Pods/TensorFlowLiteSelectTfOps/Frameworks/TensorFlowLiteSelectTfOps.framework/TensorFlowLiteSelectTfOps +-u _TF_AcquireFlexDelegate ``` +Note that the `-u` flag is only required in the current nightly versions and the +upcoming v2.4.0 release. + You should then be able to run any models converted with the `SELECT_TF_OPS` in your iOS app. For example, you can modify the [Image Classification iOS app](https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/ios) @@ -183,13 +187,13 @@ similar steps described under the [Xcode project settings](./build_ios.md#modify_xcode_project_settings_directly) section in the iOS build guide. -After adding the framework into your app project, an additional linker flag -should be specified in your app project to force load the select TF ops -framework. In your Xcode project, go to `Build Settings` -> `Other Linker -Flags`, and add: +After adding the framework into your app project, additional linker flags should +be specified in your app project to force load the select TF ops framework. In +your Xcode project, go to `Build Settings` -> `Other Linker Flags`, and add: ```text -force_load +-u _TF_AcquireFlexDelegate ``` ### C++