Migrate CoreML delegate directory out of experimental
PiperOrigin-RevId: 344908641 Change-Id: Idd3b06c150cc4a68b9b43960fed9fdc288657111
This commit is contained in:
parent
d73bbf5c61
commit
a93e9e643d
@ -17,7 +17,7 @@ package(default_visibility = [
|
|||||||
"//visibility:public",
|
"//visibility:public",
|
||||||
])
|
])
|
||||||
|
|
||||||
licenses(["notice"]) # Apache 2.0
|
licenses(["notice"])
|
||||||
|
|
||||||
exports_files(["coreml_delegate.h"])
|
exports_files(["coreml_delegate.h"])
|
||||||
|
|
||||||
@ -58,9 +58,9 @@ objc_library(
|
|||||||
"//tensorflow/lite:minimal_logging",
|
"//tensorflow/lite:minimal_logging",
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
"//tensorflow/lite/delegates:utils",
|
"//tensorflow/lite/delegates:utils",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml/builders:op_builder",
|
"//tensorflow/lite/delegates/coreml/builders:op_builder",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml/builders:op_validator",
|
"//tensorflow/lite/delegates/coreml/builders:op_validator",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml/builders:util",
|
"//tensorflow/lite/delegates/coreml/builders:util",
|
||||||
"//tensorflow/lite/kernels:kernel_util",
|
"//tensorflow/lite/kernels:kernel_util",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -78,7 +78,7 @@ objc_library(
|
|||||||
":mlmodel_proto_cc",
|
":mlmodel_proto_cc",
|
||||||
"//tensorflow/lite:kernel_api",
|
"//tensorflow/lite:kernel_api",
|
||||||
"//tensorflow/lite/c:common",
|
"//tensorflow/lite/c:common",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml/builders:op_builder",
|
"//tensorflow/lite/delegates/coreml/builders:op_builder",
|
||||||
"//tensorflow/lite/kernels:kernel_util",
|
"//tensorflow/lite/kernels:kernel_util",
|
||||||
"//tensorflow/lite/kernels/internal:optimized_base",
|
"//tensorflow/lite/kernels/internal:optimized_base",
|
||||||
"//tensorflow/lite/kernels/internal:types",
|
"//tensorflow/lite/kernels/internal:types",
|
@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/activation_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/activation_layer_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/threshold_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/threshold_layer_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_ACTIVATION_LAYER_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_ACTIVATION_LAYER_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/add_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/add_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/activation_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/activation_layer_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_ADD_OP_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_ADD_OP_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_ADD_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_ADD_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/concatenation_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/concatenation_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_CONCATENATION_OP_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_CONCATENATION_OP_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_CONCATENATION_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_CONCATENATION_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/convolution_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/convolution_op_builder.h"
|
||||||
|
|
||||||
#include "google/protobuf/repeated_field.h"
|
#include "google/protobuf/repeated_field.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/activation_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/activation_layer_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
#include "tensorflow/lite/kernels/internal/optimized/optimized_ops.h"
|
#include "tensorflow/lite/kernels/internal/optimized/optimized_ops.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/dummy_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/dummy_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/fully_connected_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/fully_connected_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/activation_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/activation_layer_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_FULLY_CONNECTED_OP_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_FULLY_CONNECTED_OP_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_FULLY_CONNECTED_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_FULLY_CONNECTED_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/hardswish_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/hardswish_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/add_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/add_op_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/mul_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/mul_op_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_HARDSWISH_OP_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_HARDSWISH_OP_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_HARDSWISH_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_HARDSWISH_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/mul_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/mul_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/activation_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/activation_layer_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/util.h"
|
#include "tensorflow/lite/delegates/coreml/builders/util.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/internal/types.h"
|
#include "tensorflow/lite/kernels/internal/types.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_MUL_OP_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_MUL_OP_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_MUL_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_MUL_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/pad_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/pad_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_PAD_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_PAD_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,12 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/pooling_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/pooling_layer_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_POOLING_LAYER_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_POOLING_LAYER_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,13 +12,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/reshape_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/reshape_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_RESHAPE_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_RESHAPE_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,15 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/resize_bilinear_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/resize_bilinear_op_builder.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_factory.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_factory.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
@ -16,7 +16,7 @@ limitations under the License.
|
|||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_RESIZE_BILINEAR_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_RESIZE_BILINEAR_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/softmax_op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/softmax_op_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_SOFTMAX_OP_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_SOFTMAX_OP_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_SOFTMAX_OP_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_SOFTMAX_OP_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_TEST_UTIL_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_TEST_UTIL_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_TEST_UTIL_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_TEST_UTIL_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate.h"
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate.h"
|
||||||
#include "tensorflow/lite/kernels/test_util.h"
|
#include "tensorflow/lite/kernels/test_util.h"
|
||||||
|
|
||||||
#import <XCTest/XCTest.h>
|
#import <XCTest/XCTest.h>
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/test_util.h"
|
#include "tensorflow/lite/delegates/coreml/builders/test_util.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/threshold_layer_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/threshold_layer_builder.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
|
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_THRESHOLD_LAYER_BUILDER_H_
|
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_THRESHOLD_LAYER_BUILDER_H_
|
||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_THRESHOLD_LAYER_BUILDER_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_BUILDERS_THRESHOLD_LAYER_BUILDER_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,11 +12,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/util.h"
|
#include "tensorflow/lite/delegates/coreml/builders/util.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/util.h"
|
#include "tensorflow/lite/delegates/coreml/builders/util.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate.h"
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/utsname.h>
|
#include <sys/utsname.h>
|
||||||
@ -22,10 +22,10 @@ limitations under the License.
|
|||||||
#include "tensorflow/lite/builtin_ops.h"
|
#include "tensorflow/lite/builtin_ops.h"
|
||||||
#include "tensorflow/lite/c/builtin_op_data.h"
|
#include "tensorflow/lite/c/builtin_op_data.h"
|
||||||
#include "tensorflow/lite/context_util.h"
|
#include "tensorflow/lite/context_util.h"
|
||||||
|
#include "tensorflow/lite/delegates/coreml/builders/op_validator.h"
|
||||||
|
#include "tensorflow/lite/delegates/coreml/builders/util.h"
|
||||||
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate_kernel.h"
|
||||||
#include "tensorflow/lite/delegates/utils.h"
|
#include "tensorflow/lite/delegates/utils.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_validator.h"
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/util.h"
|
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate_kernel.h"
|
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
#include "tensorflow/lite/minimal_logging.h"
|
#include "tensorflow/lite/minimal_logging.h"
|
||||||
|
|
@ -16,8 +16,8 @@ limitations under the License.
|
|||||||
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_COREML_DELEGATE_KERNEL_H_
|
#define TENSORFLOW_LITE_EXPERIMENTAL_DELEGATES_COREML_COREML_DELEGATE_KERNEL_H_
|
||||||
|
|
||||||
#include "tensorflow/lite/c/common.h"
|
#include "tensorflow/lite/c/common.h"
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/builders/op_builder.h"
|
#include "tensorflow/lite/delegates/coreml/builders/op_builder.h"
|
||||||
#import "tensorflow/lite/experimental/delegates/coreml/coreml_executor.h"
|
#import "tensorflow/lite/delegates/coreml/coreml_executor.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,14 +12,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate_kernel.h"
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate_kernel.h"
|
||||||
|
|
||||||
#include "tensorflow/lite/context_util.h"
|
#include "tensorflow/lite/context_util.h"
|
||||||
#include "tensorflow/lite/kernels/internal/optimized/optimized_ops.h"
|
#include "tensorflow/lite/kernels/internal/optimized/optimized_ops.h"
|
||||||
#include "tensorflow/lite/kernels/internal/types.h"
|
#include "tensorflow/lite/kernels/internal/types.h"
|
||||||
#include "tensorflow/lite/kernels/kernel_util.h"
|
#include "tensorflow/lite/kernels/kernel_util.h"
|
||||||
|
|
||||||
#import "tensorflow/lite/experimental/delegates/coreml/coreml_executor.h"
|
#import "tensorflow/lite/delegates/coreml/coreml_executor.h"
|
||||||
|
|
||||||
namespace tflite {
|
namespace tflite {
|
||||||
namespace delegates {
|
namespace delegates {
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#import "tensorflow/lite/experimental/delegates/coreml/coreml_executor.h"
|
#import "tensorflow/lite/delegates/coreml/coreml_executor.h"
|
||||||
|
|
||||||
#import <CoreML/CoreML.h>
|
#import <CoreML/CoreML.h>
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
@ -1,3 +0,0 @@
|
|||||||
licenses(["notice"])
|
|
||||||
|
|
||||||
exports_files(glob(["*.tflite"]))
|
|
@ -1 +0,0 @@
|
|||||||
posenet_mobilenet_v1_100_257x257_multi_kpt_stripped.tflite: downloaded from https://storage.googleapis.com/download.tensorflow.org/models/tflite/posenet_mobilenet_v1_100_257x257_multi_kpt_stripped.tflite
|
|
@ -149,7 +149,6 @@ upper_tabs:
|
|||||||
path: /lite/performance/hexagon_delegate
|
path: /lite/performance/hexagon_delegate
|
||||||
- title: "Core ML delegate"
|
- title: "Core ML delegate"
|
||||||
path: /lite/performance/coreml_delegate
|
path: /lite/performance/coreml_delegate
|
||||||
status: experimental
|
|
||||||
- title: "Implementing a delegate"
|
- title: "Implementing a delegate"
|
||||||
path: /lite/performance/implementing_delegate
|
path: /lite/performance/implementing_delegate
|
||||||
status: experimental
|
status: experimental
|
||||||
|
@ -70,7 +70,7 @@ The Core ML delegate uses C API for Objective-C codes.
|
|||||||
#### Step 1. Include `coreml_delegate.h`.
|
#### Step 1. Include `coreml_delegate.h`.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate.h"
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate.h"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Step 2. Create a delegate and initialize a TensorFlow Lite Interpreter
|
#### Step 2. Create a delegate and initialize a TensorFlow Lite Interpreter
|
||||||
@ -168,7 +168,7 @@ if (delegate == NULL) {
|
|||||||
|
|
||||||
The delegate creation logic reads device's machine id (e.g. iPhone11,1) to
|
The delegate creation logic reads device's machine id (e.g. iPhone11,1) to
|
||||||
determine its Neural Engine availability. See the
|
determine its Neural Engine availability. See the
|
||||||
[code](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/experimental/delegates/coreml/coreml_delegate.mm)
|
[code](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/coreml/coreml_delegate.mm)
|
||||||
for more detail. Alternatively, you can implement your own set of denylist
|
for more detail. Alternatively, you can implement your own set of denylist
|
||||||
devices using other libraries such as
|
devices using other libraries such as
|
||||||
[DeviceKit](https://github.com/devicekit/DeviceKit).
|
[DeviceKit](https://github.com/devicekit/DeviceKit).
|
||||||
@ -248,5 +248,5 @@ issue with all the necessary details to reproduce.
|
|||||||
## APIs
|
## APIs
|
||||||
|
|
||||||
* [Core ML delegate Swift API](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/swift/Sources/CoreMLDelegate.swift)
|
* [Core ML delegate Swift API](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/swift/Sources/CoreMLDelegate.swift)
|
||||||
* [Core ML delegate C API](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/experimental/delegates/coreml/coreml_delegate.h)
|
* [Core ML delegate C API](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/coreml/coreml_delegate.h)
|
||||||
* This can be used for Objective-C codes.
|
* This can be used for Objective-C codes.
|
||||||
|
@ -38,8 +38,8 @@ strip_common_include_path_prefix(
|
|||||||
strip_common_include_path_prefix(
|
strip_common_include_path_prefix(
|
||||||
name = "strip_common_include_path_subspecs",
|
name = "strip_common_include_path_subspecs",
|
||||||
hdr_labels = [
|
hdr_labels = [
|
||||||
|
"//tensorflow/lite/delegates/coreml:coreml_delegate.h",
|
||||||
"//tensorflow/lite/delegates/gpu:metal_delegate.h",
|
"//tensorflow/lite/delegates/gpu:metal_delegate.h",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml:coreml_delegate.h",
|
|
||||||
],
|
],
|
||||||
prefix = "TensorFlowLiteC/",
|
prefix = "TensorFlowLiteC/",
|
||||||
)
|
)
|
||||||
@ -94,7 +94,7 @@ tflite_ios_static_framework(
|
|||||||
bundle_name = "TensorFlowLiteCCoreML",
|
bundle_name = "TensorFlowLiteCCoreML",
|
||||||
minimum_os_version = TFL_MINIMUM_OS_VERSION,
|
minimum_os_version = TFL_MINIMUM_OS_VERSION,
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/experimental/delegates/coreml:coreml_delegate",
|
"//tensorflow/lite/delegates/coreml:coreml_delegate",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -64,9 +64,9 @@ objc_library(
|
|||||||
visibility = ios_visibility_whitelist(),
|
visibility = ios_visibility_whitelist(),
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/lite/c:c_api",
|
"//tensorflow/lite/c:c_api",
|
||||||
|
"//tensorflow/lite/delegates/coreml:coreml_delegate",
|
||||||
"//tensorflow/lite/delegates/gpu:metal_delegate",
|
"//tensorflow/lite/delegates/gpu:metal_delegate",
|
||||||
"//tensorflow/lite/delegates/xnnpack:xnnpack_delegate",
|
"//tensorflow/lite/delegates/xnnpack:xnnpack_delegate",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml:coreml_delegate",
|
|
||||||
],
|
],
|
||||||
alwayslink = 1,
|
alwayslink = 1,
|
||||||
)
|
)
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#ifdef COCOAPODS
|
#ifdef COCOAPODS
|
||||||
@import TensorFlowLiteCCoreML;
|
@import TensorFlowLiteCCoreML;
|
||||||
#else
|
#else
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate.h"
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@ -62,7 +62,7 @@ swift_library(
|
|||||||
"//tensorflow/lite/ios:tensorflow_lite_c",
|
"//tensorflow/lite/ios:tensorflow_lite_c",
|
||||||
] + select({
|
] + select({
|
||||||
":use_coreml_delegate": [
|
":use_coreml_delegate": [
|
||||||
"//tensorflow/lite/experimental/delegates/coreml:coreml_delegate",
|
"//tensorflow/lite/delegates/coreml:coreml_delegate",
|
||||||
],
|
],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}) + select({
|
}) + select({
|
||||||
@ -84,8 +84,8 @@ swift_library(
|
|||||||
module_name = "TensorFlowLite",
|
module_name = "TensorFlowLite",
|
||||||
tags = TFL_DEFAULT_TAGS + ["builder_default_ios_arm64"],
|
tags = TFL_DEFAULT_TAGS + ["builder_default_ios_arm64"],
|
||||||
deps = [
|
deps = [
|
||||||
|
"//tensorflow/lite/delegates/coreml:coreml_delegate",
|
||||||
"//tensorflow/lite/delegates/gpu:metal_delegate",
|
"//tensorflow/lite/delegates/gpu:metal_delegate",
|
||||||
"//tensorflow/lite/experimental/delegates/coreml:coreml_delegate",
|
|
||||||
"//tensorflow/lite/ios:tensorflow_lite_c",
|
"//tensorflow/lite/ios:tensorflow_lite_c",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -123,7 +123,7 @@ cc_library(
|
|||||||
"//tensorflow/lite/tools/evaluation:utils",
|
"//tensorflow/lite/tools/evaluation:utils",
|
||||||
] + select({
|
] + select({
|
||||||
"//tensorflow:ios": [
|
"//tensorflow:ios": [
|
||||||
"//tensorflow/lite/experimental/delegates/coreml:coreml_delegate",
|
"//tensorflow/lite/delegates/coreml:coreml_delegate",
|
||||||
],
|
],
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
}),
|
}),
|
||||||
|
@ -103,7 +103,7 @@ Only Android and iOS devices support GPU delegate.
|
|||||||
|
|
||||||
### CoreML delegate provider
|
### CoreML delegate provider
|
||||||
* `use_coreml`: `bool` (default=false) \
|
* `use_coreml`: `bool` (default=false) \
|
||||||
Whether to use the [Core ML delegate](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/experimental/delegates/coreml).
|
Whether to use the [Core ML delegate](https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/delegates/coreml).
|
||||||
This option is only available in iOS.
|
This option is only available in iOS.
|
||||||
* `coreml_version`: `int` (default=0) \
|
* `coreml_version`: `int` (default=0) \
|
||||||
Target Core ML version for model conversion. The default value is 0 and it
|
Target Core ML version for model conversion. The default value is 0 and it
|
||||||
|
@ -21,7 +21,7 @@ limitations under the License.
|
|||||||
#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
|
#if TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR
|
||||||
// Only enable metal delegate when using a real iPhone device.
|
// Only enable metal delegate when using a real iPhone device.
|
||||||
#define REAL_IPHONE_DEVICE
|
#define REAL_IPHONE_DEVICE
|
||||||
#include "tensorflow/lite/experimental/delegates/coreml/coreml_delegate.h"
|
#include "tensorflow/lite/delegates/coreml/coreml_delegate.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user