diff --git a/tensorflow/lite/g3doc/guide/ios.md b/tensorflow/lite/g3doc/guide/ios.md index 4e43fee47e4..8f15069201b 100644 --- a/tensorflow/lite/g3doc/guide/ios.md +++ b/tensorflow/lite/g3doc/guide/ios.md @@ -68,7 +68,17 @@ pod is used in your app. Alternatively, if you want to depend on the nightly builds, you can write: ```ruby -pod 'TensorFlowLiteSwift', '0.0.1-nightly' +pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly' +``` + +For nightly version, by default +[GPU](https://www.tensorflow.org/lite/performance/gpu) and +[Core ML delegates](https://www.tensorflow.org/lite/performance/coreml_delegate) +are excluded from the pod to reduce the binary size. You can include them by +specifying subspec: + +```ruby +pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly', :subspecs => ['CoreML', 'Metal'] ``` This will allow you to use the latest features added to TensorFlow Lite. Note diff --git a/tensorflow/lite/g3doc/performance/coreml_delegate.md b/tensorflow/lite/g3doc/performance/coreml_delegate.md index 06b981e2f0c..36781a18de1 100644 --- a/tensorflow/lite/g3doc/performance/coreml_delegate.md +++ b/tensorflow/lite/g3doc/performance/coreml_delegate.md @@ -25,13 +25,21 @@ The Core ML delegate currently supports float32 models. The Core ML delegate is already included in nightly release of TensorFlow lite CocoaPods. To use Core ML delegate, change your TensorFlow lite pod -(`TensorflowLiteC` for C++ API, and `TensorFlowLiteSwift` for Swift) version to -`0.0.1-nightly` in your `Podfile`. +(`TensorflowLiteC` for C API, and `TensorFlowLiteSwift` for Swift) version to +`0.0.1-nightly` in your `Podfile`, and include subspec `CoreML` ``` target 'YourProjectName' # pod 'TensorFlowLiteSwift' - pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly' + pod 'TensorFlowLiteSwift/CoreML', '~> 0.0.1-nightly' +``` + +OR + +``` +target 'YourProjectName' + # pod 'TensorFlowLiteSwift' + pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly', :subspecs => ['CoreML'] ``` Note: After updating `Podfile`, you should run `pod update` to reflect changes. diff --git a/tensorflow/lite/g3doc/performance/gpu.md b/tensorflow/lite/g3doc/performance/gpu.md index dd24f63e21a..0a0826b24b3 100644 --- a/tensorflow/lite/g3doc/performance/gpu.md +++ b/tensorflow/lite/g3doc/performance/gpu.md @@ -76,6 +76,10 @@ on your phone. #### Step 2. Modify the Podfile to use the TensorFlow Lite GPU CocoaPod +<section class="zippy"> + +Until TensorFlow Lite 2.0.0 + We have built a binary CocoaPod that includes the GPU delegate. To switch the project to use it, modify the `tensorflow/tensorflow/lite/examples/ios/camera/Podfile` file to use @@ -87,6 +91,30 @@ target 'YourProjectName' pod 'TensorFlowLiteGpuExperimental' ``` +</section> + +From TensorFlow Lite 2.1.0, GPU delegate is inlcuded in the `TensorFlowLiteC` +pod. You can choose between `TensorFlowLiteC` and `TensorFlowLiteSwift` +depending on the language. + +Note: This behavior will be changed in 2.3.0 and latest nightly releases + +For nightly version and upcoming 2.3.0 release, by default GPU delegate is +excluded from the pod to reduce the binary size. You can include them by +specifying subspec. For `TensorFlowLiteSwift` pod: + +```ruby +pod 'TensorFlowLiteSwift/Metal', '~> 0.0.1-nightly', +``` + +OR + +```ruby +pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly', :subspecs => ['Metal'] +``` + +You can do similiarly for `TensorFlowLiteC` if you want to use the C API. + #### Step 3. Enable the GPU delegate To enable the code that will use the GPU delegate, you will need to change