STT-tensorflow/tensorflow/lite/c
Renjie Liu 957aacafa5 Promote cumsum as a builtin op.
PiperOrigin-RevId: 337978855
Change-Id: Ia909e529df40ae64776fbff7e3ff22ab9b33bf67
2020-10-19 19:04:06 -07:00
..
BUILD Add TfLiteInterpreterOptionsSetOpResolver function to c_api_experimental.h. 2020-09-22 14:09:41 -07:00
builtin_op_data_test.cc Missing UnPack Op added 2019-12-20 09:52:17 +05:30
builtin_op_data.h Promote cumsum as a builtin op. 2020-10-19 19:04:06 -07:00
c_api_experimental_test.cc Add TfLiteInterpreterOptionsSetOpResolver function to c_api_experimental.h. 2020-09-22 14:09:41 -07:00
c_api_experimental.cc Add TfLiteInterpreterOptionsSetOpResolver function to c_api_experimental.h. 2020-09-22 14:09:41 -07:00
c_api_experimental.h Add explicit documentation for each of the API functions in 2020-09-29 10:31:48 -07:00
c_api_internal.h Add TfLiteInterpreterOptionsSetOpResolver function to c_api_experimental.h. 2020-09-22 14:09:41 -07:00
c_api_test.cc Moved to experimental api 2020-03-17 09:55:26 +02:00
c_api.cc Add TfLiteInterpreterOptionsSetOpResolver function to c_api_experimental.h. 2020-09-22 14:09:41 -07:00
c_api.h (lite) Fix cut-and-paste error in comment. 2020-08-28 16:29:14 -07:00
c_test.c Add a test to verify that the TF Lite C API headers can build, link, 2020-07-20 04:16:10 -07:00
common_test.cc Add complex<double> tensor support in TFLite 2020-07-13 18:19:24 -07:00
common.c Rollback of BroadcastTo op additions (part 3) 2020-07-23 16:38:48 -07:00
common.h 1. Return a TfLiteApplicationError instead of TfLiteError when trying to apply a delegate that doesn't allow dynamic tensors on a graph with dynamic tensors. 2020-10-19 00:35:55 -07:00
exported_symbols.lds Migrate the TFLite C API out of lite/experimental 2019-11-27 13:46:35 -08:00
README.md Update build commands 2020-02-14 16:14:14 -08:00
version_script.lds Migrate the TFLite C API out of lite/experimental 2019-11-27 13:46:35 -08:00

TensorFlow Lite C API

This directory contains C APIs for TensorFlow Lite. This includes C APIs for common types, like kernels and delegates, as well as an explicit C API for inference.

Header summary

Each public C header contains types and methods for specific uses:

  • common.h - Contains common C enums, types and methods used throughout TensorFlow Lite. This includes everything from error codes, to the kernel and delegate APIs.
  • builtin_op_data.h - Contains op-specific data that is used for builtin kernels. This should only be used when (re)implementing a builtin operator.
  • c_api.h - Contains the TensorFlow Lite C API for inference. The functionality here is largely equivalent (though a strict subset of) the functionality provided by the C++ Interpreter API.
  • c_api_experimental.h - Contains experimental C API methods for inference. These methods are useful and usable, but aren't yet part of the stable API.

Using the C API

See the c_api.h header for API usage details.

Building the C API

A native shared library target that contains the C API for inference has been provided. Assuming a working bazel configuration, this can be built as follows:

bazel build -c opt //tensorflow/lite/c:tensorflowlite_c

and for Android (replace android_arm with android_arm64 for 64-bit), assuming you've configured your project for Android builds:

bazel build -c opt --cxxopt=--std=c++11 --config=android_arm \
  //tensorflow/lite/c:tensorflowlite_c

The generated shared library will be available in your bazel-bin/tensorflow/lite/c directory. A target which packages the shared library together with the necessary headers (c_api.h, c_api_experimental.h and common.h) will be available soon, and will also be released as a prebuilt archive (together with existing prebuilt packages for Android/iOS).