Skip to content

Commit

Permalink
Add TensorFlow Lite API references to docs repo.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 669168510
  • Loading branch information
markmcd authored and copybara-github committed Aug 30, 2024
1 parent 3d45463 commit 82a582c
Show file tree
Hide file tree
Showing 628 changed files with 134,630 additions and 0 deletions.
70 changes: 70 additions & 0 deletions site/en/lite/api_docs/c/_doxygen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Generated by c2devsite (go/c2devsite)
toc:
- title: Modules
section:
- title: "lite/abi/tflite.h"
path: /lite/api_docs/c/group/tflite
- title: "lite/acceleration/configuration/c/delegate_plugin.h"
path: /lite/api_docs/c/group/delegate-plugin
- title: "lite/acceleration/configuration/c/gpu_plugin.h"
path: /lite/api_docs/c/group/gpu-plugin
- title: "lite/acceleration/configuration/c/xnnpack_plugin.h"
path: /lite/api_docs/c/group/xnnpack-plugin
- title: "lite/c/c_api.h"
path: /lite/api_docs/c/group/c-api
- title: "lite/c/c_api_opaque.h"
path: /lite/api_docs/c/group/c-api-opaque
- title: "lite/c/c_api_types.h"
path: /lite/api_docs/c/group/c-api-types
- title: "lite/c/common.h"
path: /lite/api_docs/c/group/common
- title: Structs
section:
- title: "TfLiteAffineQuantization"
path: /lite/api_docs/c/struct/tf-lite-affine-quantization
- title: "TfLiteComplex128"
path: /lite/api_docs/c/struct/tf-lite-complex128
- title: "TfLiteComplex64"
path: /lite/api_docs/c/struct/tf-lite-complex64
- title: "TfLiteContext"
path: /lite/api_docs/c/struct/tf-lite-context
- title: "TfLiteCustomAllocation"
path: /lite/api_docs/c/struct/tf-lite-custom-allocation
- title: "TfLiteDelegate"
path: /lite/api_docs/c/struct/tf-lite-delegate
- title: "TfLiteDelegateParams"
path: /lite/api_docs/c/struct/tf-lite-delegate-params
- title: "TfLiteDelegatePlugin"
path: /lite/api_docs/c/struct/tf-lite-delegate-plugin
- title: "TfLiteDimensionMetadata"
path: /lite/api_docs/c/struct/tf-lite-dimension-metadata
- title: "TfLiteEvalTensor"
path: /lite/api_docs/c/struct/tf-lite-eval-tensor
- title: "TfLiteExternalContext"
path: /lite/api_docs/c/struct/tf-lite-external-context
- title: "TfLiteFloat16"
path: /lite/api_docs/c/struct/tf-lite-float16
- title: "TfLiteFloatArray"
path: /lite/api_docs/c/struct/tf-lite-float-array
- title: "TfLiteIntArray"
path: /lite/api_docs/c/struct/tf-lite-int-array
- title: "TfLiteNode"
path: /lite/api_docs/c/struct/tf-lite-node
- title: "TfLiteOpaqueDelegateBuilder"
path: /lite/api_docs/c/struct/tf-lite-opaque-delegate-builder
- title: "TfLiteOpaqueDelegateParams"
path: /lite/api_docs/c/struct/tf-lite-opaque-delegate-params
- title: "TfLiteQuantization"
path: /lite/api_docs/c/struct/tf-lite-quantization
- title: "TfLiteQuantizationParams"
path: /lite/api_docs/c/struct/tf-lite-quantization-params
- title: "TfLiteRegistration"
path: /lite/api_docs/c/struct/tf-lite-registration
- title: "TfLiteSparsity"
path: /lite/api_docs/c/struct/tf-lite-sparsity
- title: "TfLiteTensor"
path: /lite/api_docs/c/struct/tf-lite-tensor
- title: Unions
section:
- title: "TfLitePtrUnion"
path: /lite/api_docs/c/union/tf-lite-ptr-union
1,426 changes: 1,426 additions & 0 deletions site/en/lite/api_docs/c/group/c-api-opaque.html

Large diffs are not rendered by default.

281 changes: 281 additions & 0 deletions site/en/lite/api_docs/c/group/c-api-types.html

Large diffs are not rendered by default.

1,321 changes: 1,321 additions & 0 deletions site/en/lite/api_docs/c/group/c-api.html

Large diffs are not rendered by default.

1,814 changes: 1,814 additions & 0 deletions site/en/lite/api_docs/c/group/common.html

Large diffs are not rendered by default.

156 changes: 156 additions & 0 deletions site/en/lite/api_docs/c/group/delegate-plugin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>lite/acceleration/configuration/c/delegate_plugin.h</title>
<meta name="page_type" value="reference" />
</head>
<body>
<div id="top"><!-- do not remove this div --></div>
<h1>lite/acceleration/configuration/c/delegate_plugin.h</h1>
<p>C API types for TF Lite delegate plugins. </p>
<h2>Summary</h2>
<p>
<aside class="note"><strong>Note:</strong> Users of TensorFlow Lite should use <pre class="prettyprint">#include "tensorflow/lite/acceleration/configuration/c/delegate_plugin.h"</pre> to access the APIs documented on this page. </aside>
</p>
<table class="properties responsive">
<tr>
<th colspan="2">
<h3>Typedefs</h3>
</th>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1ga148ca1be6a1af9540686b7b65a371a8d">TfLiteDelegatePlugin</a></code>
</td>
<td>typedef<div>
<code>struct <a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a></code>
</div><div>Struct to hold all the methods for a delegate plugin. </div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">TfLiteDelegatePluginCreateFunc</a>(const void *tflite_settings)</code>
</td>
<td>typedef<div>
<code><a href="/lite/api_docs/c/struct/tf-lite-delegate.html#struct_tf_lite_delegate">TfLiteDelegate</a> *</code>
</div><div>Type of delegate creation function used to allocate and construct a delegate. </div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">TfLiteDelegatePluginDestroyFunc</a>(TfLiteDelegate *)</code>
</td>
<td>typedef<div>
<code>void</code>
</div><div>Type of function to destroy and deallocate a delegate. </div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">TfLiteDelegatePluginGetDelegateErrnoFunc</a>(TfLiteDelegate *)</code>
</td>
<td>typedef<div>
<code>int</code>
</div><div>Type of function to return an error code for the last delegate operation. </div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1ga8f0fafe3eb5588737436726ad7049bea">TfLiteOpaqueDelegatePlugin</a></code>
</td>
<td>typedef<div>
<code><a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a></code>
</div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1gacedb45c5eb5ccc01b06e75641c03b9c2">TfLiteOpaqueDelegatePluginCreateFunc</a></code>
</td>
<td>typedef<div>
<code><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">TfLiteDelegatePluginCreateFunc</a></code>
</div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1gad3d837f94c2ecb53105d102961bc1f52">TfLiteOpaqueDelegatePluginDestroyFunc</a></code>
</td>
<td>typedef<div>
<code><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">TfLiteDelegatePluginDestroyFunc</a></code>
</div></td>
</tr>
<tr>
<td>
<code><a href="#group__delegate__plugin_1ga8005a0549e59f5dbc08cdd0d265a267b">TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc</a></code>
</td>
<td>typedef<div>
<code><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">TfLiteDelegatePluginGetDelegateErrnoFunc</a></code>
</div></td>
</tr>
</table>
<table class="constants responsive">
<tr>
<th colspan="2">
<h3>Structs</h3>
</th>
</tr>
<tr>
<td>
<a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin">TfLiteDelegatePlugin</a>
</td>
<td>
<p>Struct to hold all the methods for a delegate plugin. </p>
</td>
</tr>
</table>
<h2>Typedefs</h2>
<div id="group__delegate__plugin_1ga148ca1be6a1af9540686b7b65a371a8d">
<h3>TfLiteDelegatePlugin</h3>
<pre class="prettyprint">struct <a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a> TfLiteDelegatePlugin</pre>
<div>
<p>Struct to hold all the methods for a delegate plugin. </p>
</div>
</div>
<div id="group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">
<h3>TfLiteDelegatePluginCreateFunc</h3>
<pre class="prettyprint"><a href="/lite/api_docs/c/struct/tf-lite-delegate.html#struct_tf_lite_delegate">TfLiteDelegate</a> * TfLiteDelegatePluginCreateFunc(const void *tflite_settings)</pre>
<div>
<p>Type of delegate creation function used to allocate and construct a delegate. </p>
<p>The <code>tflite_settings</code> parameter passed to the delegate creation function should be a pointer to a FlatBuffer table object of type <code>tflite::TFLiteSettings</code>. We use <code>const void *</code> here rather than <code>const tflite::TFLiteSettings*</code> since this is a C API so we don't want to directly reference C++ types such as <code>tflite::TFLiteSettings</code>. But note that this address should point to the 'parsed' FlatBuffer object, not the raw byte buffer. (Note that 'parsing' FlatBuffers is very cheap, it's just an offset load.)</p>
<p>If you are using the FlatBuffers C API, then you can alternatively pass in a value of type <code>tflite_TFLiteSettings_table_t</code>, which is a typedef for <code>const struct tflite_TFLiteSettings_table*</code> that is the corresponding type for the 'parsed' FlatBuffer object in the FlatBuffers C API.</p>
<p>Ownership of the <code>tflite_settings</code> flatbuffer remains with the caller. The caller of a delegate creation function may end the lifetime of the <code>tflite_settings</code> FlatBuffer immediately after the call to the function. So the delegate creation function should ensure that any settings that the delegate may need to reference later, after the delegate has been constructed, are copied from the FlatBuffer into storage owned by the delegate. </p>
</div>
</div>
<div id="group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">
<h3>TfLiteDelegatePluginDestroyFunc</h3>
<pre class="prettyprint">void TfLiteDelegatePluginDestroyFunc(TfLiteDelegate *)</pre>
<div>
<p>Type of function to destroy and deallocate a delegate. </p>
<p>The delegate argument must have been created with the corresponding create function from the same delegate plugin. </p>
</div>
</div>
<div id="group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">
<h3>TfLiteDelegatePluginGetDelegateErrnoFunc</h3>
<pre class="prettyprint">int TfLiteDelegatePluginGetDelegateErrnoFunc(TfLiteDelegate *)</pre>
<div>
<p>Type of function to return an error code for the last delegate operation. </p>
<p>The delegate argument must have been created with the corresponding create function from the same delegate plugin. </p>
</div>
</div>
<div id="group__delegate__plugin_1ga8f0fafe3eb5588737436726ad7049bea">
<h3>TfLiteOpaqueDelegatePlugin</h3>
<pre class="prettyprint"><a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a> TfLiteOpaqueDelegatePlugin</pre>
<div />
</div>
<div id="group__delegate__plugin_1gacedb45c5eb5ccc01b06e75641c03b9c2">
<h3>TfLiteOpaqueDelegatePluginCreateFunc</h3>
<pre class="prettyprint"><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">TfLiteDelegatePluginCreateFunc</a> TfLiteOpaqueDelegatePluginCreateFunc</pre>
<div />
</div>
<div id="group__delegate__plugin_1gad3d837f94c2ecb53105d102961bc1f52">
<h3>TfLiteOpaqueDelegatePluginDestroyFunc</h3>
<pre class="prettyprint"><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">TfLiteDelegatePluginDestroyFunc</a> TfLiteOpaqueDelegatePluginDestroyFunc</pre>
<div />
</div>
<div id="group__delegate__plugin_1ga8005a0549e59f5dbc08cdd0d265a267b">
<h3>TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc</h3>
<pre class="prettyprint"><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">TfLiteDelegatePluginGetDelegateErrnoFunc</a> TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc</pre>
<div />
</div>
</body>
</html>
42 changes: 42 additions & 0 deletions site/en/lite/api_docs/c/group/gpu-plugin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>lite/acceleration/configuration/c/gpu_plugin.h</title>
<meta name="page_type" value="reference" />
</head>
<body>
<div id="top"><!-- do not remove this div --></div>
<h1>lite/acceleration/configuration/c/gpu_plugin.h</h1>
<p>This header file is for the delegate plugin for GPU. </p>
<h2>Summary</h2>
<p>For the C++ delegate plugin interface, the GPU delegate plugin is added to the <code>DelegatePluginRegistry</code> by the side effect of a constructor for a static object, so there's no public API needed for this plugin, other than the API of <code>tflite::delegates::DelegatePluginRegistry</code>s, which is declared in delegate_registry.h.</p>
<p>But to provide a C API to access the GPU delegate plugin, we do expose some functions, which are declared below.<aside class="note"><strong>Note:</strong> Users of TensorFlow Lite should use <pre class="prettyprint">#include "tensorflow/lite/acceleration/configuration/c/gpu_plugin.h"</pre> to access the APIs documented on this page. </aside></p>
<table class="methods responsive">
<tr>
<th colspan="2">
<h3>Functions</h3>
</th>
</tr>
<tr>
<td>
<code><a href="#group__gpu__plugin_1ga5b1e9a75e753da0244806c28a18d0df4">TfLiteGpuDelegatePluginCApi</a>()</code>
</td>
<td>
<div>
<code>const <a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a> *</code>
</div>
<div>C API for the GPU delegate plugin. </div>
</td>
</tr>
</table>
<h2>Functions</h2>
<div id="group__gpu__plugin_1ga5b1e9a75e753da0244806c28a18d0df4">
<h3>TfLiteGpuDelegatePluginCApi</h3>
<pre class="prettyprint">const <a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a> * TfLiteGpuDelegatePluginCApi()</pre>
<div>
<p>C API for the GPU delegate plugin. </p>
<p>Returns a pointer to a statically allocated table of function pointers. </p>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 82a582c

Please sign in to comment.