Skip to content

Commit 82a582c

Browse files
markmcdcopybara-github
authored andcommitted
Add TensorFlow Lite API references to docs repo.
PiperOrigin-RevId: 669168510
1 parent 3d45463 commit 82a582c

File tree

628 files changed

+134630
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

628 files changed

+134630
-0
lines changed

site/en/lite/api_docs/c/_doxygen.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Generated by c2devsite (go/c2devsite)
2+
toc:
3+
- title: Modules
4+
section:
5+
- title: "lite/abi/tflite.h"
6+
path: /lite/api_docs/c/group/tflite
7+
- title: "lite/acceleration/configuration/c/delegate_plugin.h"
8+
path: /lite/api_docs/c/group/delegate-plugin
9+
- title: "lite/acceleration/configuration/c/gpu_plugin.h"
10+
path: /lite/api_docs/c/group/gpu-plugin
11+
- title: "lite/acceleration/configuration/c/xnnpack_plugin.h"
12+
path: /lite/api_docs/c/group/xnnpack-plugin
13+
- title: "lite/c/c_api.h"
14+
path: /lite/api_docs/c/group/c-api
15+
- title: "lite/c/c_api_opaque.h"
16+
path: /lite/api_docs/c/group/c-api-opaque
17+
- title: "lite/c/c_api_types.h"
18+
path: /lite/api_docs/c/group/c-api-types
19+
- title: "lite/c/common.h"
20+
path: /lite/api_docs/c/group/common
21+
- title: Structs
22+
section:
23+
- title: "TfLiteAffineQuantization"
24+
path: /lite/api_docs/c/struct/tf-lite-affine-quantization
25+
- title: "TfLiteComplex128"
26+
path: /lite/api_docs/c/struct/tf-lite-complex128
27+
- title: "TfLiteComplex64"
28+
path: /lite/api_docs/c/struct/tf-lite-complex64
29+
- title: "TfLiteContext"
30+
path: /lite/api_docs/c/struct/tf-lite-context
31+
- title: "TfLiteCustomAllocation"
32+
path: /lite/api_docs/c/struct/tf-lite-custom-allocation
33+
- title: "TfLiteDelegate"
34+
path: /lite/api_docs/c/struct/tf-lite-delegate
35+
- title: "TfLiteDelegateParams"
36+
path: /lite/api_docs/c/struct/tf-lite-delegate-params
37+
- title: "TfLiteDelegatePlugin"
38+
path: /lite/api_docs/c/struct/tf-lite-delegate-plugin
39+
- title: "TfLiteDimensionMetadata"
40+
path: /lite/api_docs/c/struct/tf-lite-dimension-metadata
41+
- title: "TfLiteEvalTensor"
42+
path: /lite/api_docs/c/struct/tf-lite-eval-tensor
43+
- title: "TfLiteExternalContext"
44+
path: /lite/api_docs/c/struct/tf-lite-external-context
45+
- title: "TfLiteFloat16"
46+
path: /lite/api_docs/c/struct/tf-lite-float16
47+
- title: "TfLiteFloatArray"
48+
path: /lite/api_docs/c/struct/tf-lite-float-array
49+
- title: "TfLiteIntArray"
50+
path: /lite/api_docs/c/struct/tf-lite-int-array
51+
- title: "TfLiteNode"
52+
path: /lite/api_docs/c/struct/tf-lite-node
53+
- title: "TfLiteOpaqueDelegateBuilder"
54+
path: /lite/api_docs/c/struct/tf-lite-opaque-delegate-builder
55+
- title: "TfLiteOpaqueDelegateParams"
56+
path: /lite/api_docs/c/struct/tf-lite-opaque-delegate-params
57+
- title: "TfLiteQuantization"
58+
path: /lite/api_docs/c/struct/tf-lite-quantization
59+
- title: "TfLiteQuantizationParams"
60+
path: /lite/api_docs/c/struct/tf-lite-quantization-params
61+
- title: "TfLiteRegistration"
62+
path: /lite/api_docs/c/struct/tf-lite-registration
63+
- title: "TfLiteSparsity"
64+
path: /lite/api_docs/c/struct/tf-lite-sparsity
65+
- title: "TfLiteTensor"
66+
path: /lite/api_docs/c/struct/tf-lite-tensor
67+
- title: Unions
68+
section:
69+
- title: "TfLitePtrUnion"
70+
path: /lite/api_docs/c/union/tf-lite-ptr-union

site/en/lite/api_docs/c/group/c-api-opaque.html

Lines changed: 1426 additions & 0 deletions
Large diffs are not rendered by default.

site/en/lite/api_docs/c/group/c-api-types.html

Lines changed: 281 additions & 0 deletions
Large diffs are not rendered by default.

site/en/lite/api_docs/c/group/c-api.html

Lines changed: 1321 additions & 0 deletions
Large diffs are not rendered by default.

site/en/lite/api_docs/c/group/common.html

Lines changed: 1814 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
<!DOCTYPE html>
2+
<html devsite>
3+
<head>
4+
<title>lite/acceleration/configuration/c/delegate_plugin.h</title>
5+
<meta name="page_type" value="reference" />
6+
</head>
7+
<body>
8+
<div id="top"><!-- do not remove this div --></div>
9+
<h1>lite/acceleration/configuration/c/delegate_plugin.h</h1>
10+
<p>C API types for TF Lite delegate plugins. </p>
11+
<h2>Summary</h2>
12+
<p>
13+
<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>
14+
</p>
15+
<table class="properties responsive">
16+
<tr>
17+
<th colspan="2">
18+
<h3>Typedefs</h3>
19+
</th>
20+
</tr>
21+
<tr>
22+
<td>
23+
<code><a href="#group__delegate__plugin_1ga148ca1be6a1af9540686b7b65a371a8d">TfLiteDelegatePlugin</a></code>
24+
</td>
25+
<td>typedef<div>
26+
<code>struct <a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a></code>
27+
</div><div>Struct to hold all the methods for a delegate plugin. </div></td>
28+
</tr>
29+
<tr>
30+
<td>
31+
<code><a href="#group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">TfLiteDelegatePluginCreateFunc</a>(const void *tflite_settings)</code>
32+
</td>
33+
<td>typedef<div>
34+
<code><a href="/lite/api_docs/c/struct/tf-lite-delegate.html#struct_tf_lite_delegate">TfLiteDelegate</a> *</code>
35+
</div><div>Type of delegate creation function used to allocate and construct a delegate. </div></td>
36+
</tr>
37+
<tr>
38+
<td>
39+
<code><a href="#group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">TfLiteDelegatePluginDestroyFunc</a>(TfLiteDelegate *)</code>
40+
</td>
41+
<td>typedef<div>
42+
<code>void</code>
43+
</div><div>Type of function to destroy and deallocate a delegate. </div></td>
44+
</tr>
45+
<tr>
46+
<td>
47+
<code><a href="#group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">TfLiteDelegatePluginGetDelegateErrnoFunc</a>(TfLiteDelegate *)</code>
48+
</td>
49+
<td>typedef<div>
50+
<code>int</code>
51+
</div><div>Type of function to return an error code for the last delegate operation. </div></td>
52+
</tr>
53+
<tr>
54+
<td>
55+
<code><a href="#group__delegate__plugin_1ga8f0fafe3eb5588737436726ad7049bea">TfLiteOpaqueDelegatePlugin</a></code>
56+
</td>
57+
<td>typedef<div>
58+
<code><a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a></code>
59+
</div></td>
60+
</tr>
61+
<tr>
62+
<td>
63+
<code><a href="#group__delegate__plugin_1gacedb45c5eb5ccc01b06e75641c03b9c2">TfLiteOpaqueDelegatePluginCreateFunc</a></code>
64+
</td>
65+
<td>typedef<div>
66+
<code><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">TfLiteDelegatePluginCreateFunc</a></code>
67+
</div></td>
68+
</tr>
69+
<tr>
70+
<td>
71+
<code><a href="#group__delegate__plugin_1gad3d837f94c2ecb53105d102961bc1f52">TfLiteOpaqueDelegatePluginDestroyFunc</a></code>
72+
</td>
73+
<td>typedef<div>
74+
<code><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">TfLiteDelegatePluginDestroyFunc</a></code>
75+
</div></td>
76+
</tr>
77+
<tr>
78+
<td>
79+
<code><a href="#group__delegate__plugin_1ga8005a0549e59f5dbc08cdd0d265a267b">TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc</a></code>
80+
</td>
81+
<td>typedef<div>
82+
<code><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">TfLiteDelegatePluginGetDelegateErrnoFunc</a></code>
83+
</div></td>
84+
</tr>
85+
</table>
86+
<table class="constants responsive">
87+
<tr>
88+
<th colspan="2">
89+
<h3>Structs</h3>
90+
</th>
91+
</tr>
92+
<tr>
93+
<td>
94+
<a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin">TfLiteDelegatePlugin</a>
95+
</td>
96+
<td>
97+
<p>Struct to hold all the methods for a delegate plugin. </p>
98+
</td>
99+
</tr>
100+
</table>
101+
<h2>Typedefs</h2>
102+
<div id="group__delegate__plugin_1ga148ca1be6a1af9540686b7b65a371a8d">
103+
<h3>TfLiteDelegatePlugin</h3>
104+
<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>
105+
<div>
106+
<p>Struct to hold all the methods for a delegate plugin. </p>
107+
</div>
108+
</div>
109+
<div id="group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">
110+
<h3>TfLiteDelegatePluginCreateFunc</h3>
111+
<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>
112+
<div>
113+
<p>Type of delegate creation function used to allocate and construct a delegate. </p>
114+
<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>
115+
<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>
116+
<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>
117+
</div>
118+
</div>
119+
<div id="group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">
120+
<h3>TfLiteDelegatePluginDestroyFunc</h3>
121+
<pre class="prettyprint">void TfLiteDelegatePluginDestroyFunc(TfLiteDelegate *)</pre>
122+
<div>
123+
<p>Type of function to destroy and deallocate a delegate. </p>
124+
<p>The delegate argument must have been created with the corresponding create function from the same delegate plugin. </p>
125+
</div>
126+
</div>
127+
<div id="group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">
128+
<h3>TfLiteDelegatePluginGetDelegateErrnoFunc</h3>
129+
<pre class="prettyprint">int TfLiteDelegatePluginGetDelegateErrnoFunc(TfLiteDelegate *)</pre>
130+
<div>
131+
<p>Type of function to return an error code for the last delegate operation. </p>
132+
<p>The delegate argument must have been created with the corresponding create function from the same delegate plugin. </p>
133+
</div>
134+
</div>
135+
<div id="group__delegate__plugin_1ga8f0fafe3eb5588737436726ad7049bea">
136+
<h3>TfLiteOpaqueDelegatePlugin</h3>
137+
<pre class="prettyprint"><a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a> TfLiteOpaqueDelegatePlugin</pre>
138+
<div />
139+
</div>
140+
<div id="group__delegate__plugin_1gacedb45c5eb5ccc01b06e75641c03b9c2">
141+
<h3>TfLiteOpaqueDelegatePluginCreateFunc</h3>
142+
<pre class="prettyprint"><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga3688949cd80282bac66e3e8e1c118ca1">TfLiteDelegatePluginCreateFunc</a> TfLiteOpaqueDelegatePluginCreateFunc</pre>
143+
<div />
144+
</div>
145+
<div id="group__delegate__plugin_1gad3d837f94c2ecb53105d102961bc1f52">
146+
<h3>TfLiteOpaqueDelegatePluginDestroyFunc</h3>
147+
<pre class="prettyprint"><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga56c8ce15c6841dc756d4295f19c92c7f">TfLiteDelegatePluginDestroyFunc</a> TfLiteOpaqueDelegatePluginDestroyFunc</pre>
148+
<div />
149+
</div>
150+
<div id="group__delegate__plugin_1ga8005a0549e59f5dbc08cdd0d265a267b">
151+
<h3>TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc</h3>
152+
<pre class="prettyprint"><a href="/lite/api_docs/c/group/delegate-plugin.html#group__delegate__plugin_1ga843989c081ce4f553578baea93858b1e">TfLiteDelegatePluginGetDelegateErrnoFunc</a> TfLiteOpaqueDelegatePluginGetDelegateErrnoFunc</pre>
153+
<div />
154+
</div>
155+
</body>
156+
</html>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html devsite>
3+
<head>
4+
<title>lite/acceleration/configuration/c/gpu_plugin.h</title>
5+
<meta name="page_type" value="reference" />
6+
</head>
7+
<body>
8+
<div id="top"><!-- do not remove this div --></div>
9+
<h1>lite/acceleration/configuration/c/gpu_plugin.h</h1>
10+
<p>This header file is for the delegate plugin for GPU. </p>
11+
<h2>Summary</h2>
12+
<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>
13+
<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>
14+
<table class="methods responsive">
15+
<tr>
16+
<th colspan="2">
17+
<h3>Functions</h3>
18+
</th>
19+
</tr>
20+
<tr>
21+
<td>
22+
<code><a href="#group__gpu__plugin_1ga5b1e9a75e753da0244806c28a18d0df4">TfLiteGpuDelegatePluginCApi</a>()</code>
23+
</td>
24+
<td>
25+
<div>
26+
<code>const <a href="/lite/api_docs/c/struct/tf-lite-delegate-plugin.html#struct_tf_lite_delegate_plugin">TfLiteDelegatePlugin</a> *</code>
27+
</div>
28+
<div>C API for the GPU delegate plugin. </div>
29+
</td>
30+
</tr>
31+
</table>
32+
<h2>Functions</h2>
33+
<div id="group__gpu__plugin_1ga5b1e9a75e753da0244806c28a18d0df4">
34+
<h3>TfLiteGpuDelegatePluginCApi</h3>
35+
<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>
36+
<div>
37+
<p>C API for the GPU delegate plugin. </p>
38+
<p>Returns a pointer to a statically allocated table of function pointers. </p>
39+
</div>
40+
</div>
41+
</body>
42+
</html>

0 commit comments

Comments
 (0)