STT-tensorflow/tensorflow/lite/experimental/objc/TensorFlowLiteObjC-nightly.podspec
YoungSeok Yoon 772433a2a2 Add flag for using optimized TFLite CPU kernels on iOS
This adds new experimental flags to the interpreter options of TFLite Obj-C and
Swift APIs, which can be used for opting in to a set of highly optimized
floating point kernels provided via the XNNPACK delegate. The flags can be used
as follows.

Obj-C:

    TFLInterpreterOptions *options = [[TFLInterpreterOptions alloc] init];
    options.useXNNPACK = YES;
    NSError *error;
    TFLInterpreter *interpreter =
        [[TFLInterpreter alloc] initWithModelPath:@"model/path"
                                          options:options
                                            error:&error];

Swift:

    var options = InterpreterOptions()
    options.isXNNPackEnabled = true
    var interpreter = try Interpreter(modelPath: "model/path", options: options)

PiperOrigin-RevId: 317270012
Change-Id: I82aae43c3de13ab08af3c70513e2a458e807b0f1
2020-06-19 02:03:48 -07:00

48 lines
1.6 KiB
Ruby

Pod::Spec.new do |s|
s.name = 'TensorFlowLiteObjC'
s.version = '0.0.1-nightly'
s.authors = 'Google Inc.'
s.license = { :type => 'Apache' }
s.homepage = 'https://github.com/tensorflow/tensorflow'
s.source = { :git => 'https://github.com/tensorflow/tensorflow.git', :branch => 'master' }
s.summary = 'TensorFlow Lite for Objective-C'
s.description = <<-DESC
TensorFlow Lite is TensorFlow's lightweight solution for Objective-C
developers. It enables low-latency inference of on-device machine learning
models with a small binary size and fast performance supporting hardware
acceleration.
DESC
s.ios.deployment_target = '9.0'
s.module_name = 'TFLTensorFlowLite'
s.static_framework = true
tfl_dir = 'tensorflow/lite/'
objc_dir = tfl_dir + 'experimental/objc/'
s.public_header_files = objc_dir + 'apis/*.h'
s.source_files = [
objc_dir + '{apis,sources}/*.{h,m,mm}',
tfl_dir + 'c/c_api.h',
tfl_dir + 'c/common.h',
tfl_dir + 'delegates/xnnpack/xnnpack_delegate.h',
]
s.module_map = objc_dir + 'apis/framework.modulemap'
s.dependency 'TensorFlowLiteC', "~> #{s.version}"
s.pod_target_xcconfig = {
'HEADER_SEARCH_PATHS' =>
'"${PODS_TARGET_SRCROOT}" ' +
'"${PODS_TARGET_SRCROOT}/' + objc_dir + 'apis"',
'VALID_ARCHS' => 'i386 x86_64 armv7 arm64',
}
s.test_spec 'Tests' do |ts|
ts.source_files = objc_dir + 'tests/*.m'
ts.resources = [
tfl_dir + 'testdata/add.bin',
tfl_dir + 'testdata/add_quantized.bin',
]
end
end