# litert::CompiledModel


`#include <litert_compiled_model.h>`

A high-level inference API for LiteRT.

## Summary

The `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` is created by providing a model with compilation options. Internally, it instantiates a runtime and applies delegates mapped to the compilation options. It supports querying buffer requirements to create input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s and invoking the model with them.

Example User Flow:

1. Create a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model`.
2. Query the model's input/output requirements.
3. Create input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.
4. Fill the input `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s with input data.
5. Invoke the model with the input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.
6. Evaluate the output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

<br />

### Inheritance

Inherits from: internal::BaseHandle\< LiteRtCompiledModel \>

| ### Constructors and Destructors ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af14a3c583529037b56e6da9cb69a74af()` ||

| ### Friend classes ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a049c3635734626be4490bd41f5a177ee` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a6d146dcd482de237f92b23daeb81332d` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a120ddb8474c14a04355f6f242c625fc3` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a3d0609bdab05a9e404084b91feab0cfa` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1afd8da32320de1ee6cb4d3e1bf35c93ab` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a9e4a0e5134743f60878c3dc5e94d2934` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ab6abb19173c3ad06af427c78ab41ffc9` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a9fc0fef53f64bf55310c9ca2d935a081` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a90beb1a050df0f82d35fc4b3e84cc565` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a18e84a30fa6157fd32bf491e3c7873ca` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8c8d58efc857f5f6bec17fb0bfc34e35` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a210c15ee5232487146299a2ac2dd6560` | `friend class` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ae4494c631e6765b9f7e9c708a9c091da` | `friend class` |

| ### Protected attributes ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aca43eac7fa9b43c769acd4739f4429ae` | `absl::AnyInvocable< bool()>` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ab57e314b540961269f3f62a96c6f185a` | `https://developers.google.com/edge/api/litert/c/structlitert/1-1internal-1-1-environment-holder#structlitert_1_1internal_1_1_environment_holder` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ae2ee5ef78d1e888e87b5e83b182e07d2` | `internal::BaseHandle< LiteRtModel >` |

| ### Public functions ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1abc162c83cccfdaa736d4642116de9a76() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Clears all errors from the error reporter. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a7613eeda15cb18d37f60f9589cbb905b() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Clears model-level default scheduling info. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a0117c61a61a4d608a18c25987747c1ee(absl::string_view signature_name, absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates an input tensor buffer for the given signature and input name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aa3804637883bbc4f0b3aa5b8b59ccc10(absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates an input tensor buffer for the default signature and a given input name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ac93d517eaada52c01ba399afbcd1cfbc(absl::string_view signature_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` A helper function to create input tensor buffers for a given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a31558f562bd17b48001d0b291ef0f7a4(size_t signature_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` A helper function to create input tensor buffers for a given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a488c39ae5c7e48ef6df31b51cb374574() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` A helper function to create input tensor buffers for the default signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a84e9c5f31108078d915b9f5d9171621b(absl::string_view signature_name, absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates an output tensor buffer for the given signature and output name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af9c22536351d076c54cc0f1d0cf09804(absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates an output tensor buffer for the default signature and a given output name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a33a35cb5bfffc0137d098ed4d769e1d3(absl::string_view signature_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` A helper function to create output tensor buffers for a given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8faa7bbb323f5bd66f859e39751eb07e(size_t signature_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` A helper function to create output tensor buffers for a given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a14c7a700a9cfc3364c851ec7cb5fdc18() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` A helper function to create output tensor buffers for the default signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a15e7d3754532aab2d18ea9b5006b2f19(size_t signature_index, absl::string_view key)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::optional< std::string > >` Gets a dispatch annotation from the compiled model. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a9328d2b82623e42d46e2e48c99a16ef0(absl::string_view key)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::optional< std::string > >` Overloaded version for the default signature (index 0). |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af0381a59a1fd4af97a24c9aeb0ea2844(absl::string_view signature_name, absl::string_view key)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::optional< std::string > >` Overloaded version that takes a signature name instead of an index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a01e489fed25cd89d6be8de090f51c8d4() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::string >` Gets all error messages from the error reporter as a single string. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a7585348c2a985861b00cb7583703c2d3(absl::string_view signature_name, absl::string_view input_name)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Gets input buffer requirements for the given signature and input name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a86ce83012dc872c6c5c7a05152d2d1f3(size_t signature_index, size_t input_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Returns the buffer requirements for the n-th input tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a45a2da73d86cba379462d65bcb67ff4a(size_t signature_index, absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` An overload of `GetInputBufferRequirements` that takes an input tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1abd167790ac46c76840cb5e3de164ab4f(size_t input_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Gets input buffer requirements of the default signature for the n-th input tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a4ac1aeaeabdf45729f8263b118f80d49(absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Gets input buffer requirements of the default signature for a given input name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a0be4ec8b4f4ec67e45432c98d2c85b97(size_t signature_index, size_t input_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-layout#classlitert_1_1_layout >` Returns the layout of the given input tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a4513164bd10d54e734cb25320444570e(size_t signature_index, size_t input_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Returns the tensor type for the n-th input tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a74e0dc3dbbac9a7901116f4a9b165104(size_t signature_index, absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Returns the tensor type for a given input tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aea77badbe327e84149efe8f9a4b51cab(absl::string_view signature_key, absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Returns the tensor type for a given input tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a5803092865b3f3eb1ecd3fb1b48a732f(absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Gets the input tensor type of the default signature for a given input name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a936294b9ceac748408e31873f58b0b07() const ` | `size_t` Returns the number of signatures defined in the model. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a831484808a03bca9f78cbdc1d53e54a3(absl::string_view signature_name, absl::string_view output_name)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Gets output buffer requirements for the given signature and output name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a918b5f5de3633ccf1830227015fc140d(size_t signature_index, size_t output_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Returns the buffer requirements for the given output tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a24cb8df5dbed621a8587ccf9c7d08db2(size_t signature_index, absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` An overload of `GetOutputBufferRequirements` that takes an output tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1acfb77b62d91b1073a2e4326511f2d555(size_t output_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Gets input buffer requirements of the default signature for the n-th input tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aa37b5f2f31c66b5b62d49709a73d78ac(absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements >` Gets input buffer requirements of the default signature for a given input name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a2bca5692c3c9b0546bf619bad418ffec(size_t signature_index, bool update_allocation) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-layout#classlitert_1_1_layout > >` Returns the layouts of all output tensors for a given signature index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ae1114bddfd758041e275eda155dcf98c(size_t signature_index, size_t output_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Returns the tensor type for the n-th output tensor. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ad2028b5c6224c29e886f130fcf7a6779(size_t signature_index, absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Returns the tensor type for a given output tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8a0732bf7c0ca10fac8600cd31a3b215(absl::string_view signature_key, absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Returns the tensor type for a given output tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a2b057a090da0ff775724e9a511c81793(absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< RankedTensorType >` Gets the output tensor type of the default signature for a given output name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8164b53c992ebe53aac9bca4f81fc48d(size_t signature_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< SimpleSignature >` Returns the signature at the given index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ab701f8ec3d492bd981d665dd24233e24(absl::string_view signature_key) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< size_t >` Returns the signature index for a given signature key. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a7cc574d50dffc74873bd8a84717ed91b(size_t signature_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of input names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af126d6db1719d1722c83e80296c21f16() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of input names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a95b7cdf0448c5469eb155c36be20dd58(absl::string_view signature_key) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of input names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a602166bf094b09da732dec77a36ff8b7() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of signature key names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a723aa5fed20f027dd1b1d72efedef8f0(size_t signature_index) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of output names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af2b9d77660788ca037002d01ec206548() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of output names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a4f0b20558ddf417e445a5d1020701b26(absl::string_view signature_key) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< absl::string_view > >` Returns the list of output names defined in the signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aaf776676f111a999c34f157f61c46816() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< SimpleSignature > >` Returns the list of signatures defined in the model. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a28f8b255f35859e1a00a3d801df51fc0()` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< bool >` Returns `true` if the compiled model is fully accelerated with the given hardware accelerators. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ae4d65d0515da1ad9a9914167e96225ef(size_t signature_index, absl::string_view key)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Removes a dispatch annotation from the compiled model. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a1a52fbb09011a756b1143e408766bc12(absl::string_view key)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Overloaded version for the default signature (index 0). |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a4f9e84a28f91d34b68bb7aa9af2b5ba5(absl::string_view signature_name, absl::string_view key)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Overloaded version that takes a signature name instead of an index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a13ec0d95aaf48e339421d12081cd8fad(const char *format, Args &&... args) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Reports an error to the compiled model's error reporter. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a9634a8295e0be3b06e13da6246ef8751(size_t signature_index, size_t input_index, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor to support dynamic shapes. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a7a27d59f94bc25602d8de1a2da3682f0(size_t signature_index, absl::string_view input_name, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor by name for the given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a68a06b19ec2a7f29f92db73aba8ee894(absl::string_view signature_name, absl::string_view input_name, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor by name for the given signature name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a42b939a6c4ab6cea797c078b87cf61b6(size_t input_index, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor of the default signature by index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a36716e61747a01689f651df4fe4e47f1(absl::string_view input_name, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor of the default signature by name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a6ab4fc629c9c57bdf3e970b9cba7efef(size_t signature_index, size_t input_index, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Non-strict variants mirror TFLite's `ResizeInputTensor` behavior, allowing arbitrary shape updates when backends support them. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a058d9e56bb488cb6de9961791af802c7(size_t signature_index, absl::string_view input_name, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor by name for the given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a2895678c998ca9dee8e2a084947646eb(absl::string_view signature_name, absl::string_view input_name, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor by name for the given signature name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a0a09c7df28e6099953986f9720e9dbcb(size_t input_index, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor of the default signature by index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a170e2cd32955a7faf750f2e08eef3bbd(absl::string_view input_name, absl::Span< const int > dims)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Resizes the specified input tensor of the default signature by name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a20a68e09a420d151efee8f79487991fc(size_t signature_index, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for a given signature index synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a14e229182509009b8407c73c2731ca85(absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for the default signature synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a4bb2dcef5558c789ef8ad817e508024a(size_t signature_index, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs with per-run options for a given signature index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a430ec453d82148b2e170eedfa572bfc7(size_t signature_index, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs with per-request scheduling info for a given signature index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a7b6e152885255a034aee94608725b279(absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs default signature with per-run options. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1acb6dc59ace43c456a11057a1817a9c61(absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs default signature with per-request scheduling info. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ab3af3fd667bd5f294224a4c1b5e4f667(absl::string_view signature_key, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for a given signature key synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a79c613847b3da94e445263d33a2b9993(absl::string_view signature_key, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key with per-run options. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aab2fa168e34be3e43f796e0dcbd40b7e(absl::string_view signature_key, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key with per-request scheduling info. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a20038d590ce53bdcd2d8624d3cd8a668(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for a given signature key synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` map. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a77d6de145baa607c87b32e980531c0eb(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key with per-run options using named maps. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aa44fd1bd4364d45e4d7098ac726dfb2a(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key with per-request scheduling info using named maps. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8a9d7348020b92cb18b8abfc08308873(const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for the default signature synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` map. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8238a6882843f554db50980825c4d151(const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs default signature with per-run options using named maps. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a3951a2f946957ff323a4f4750b0e7f92(const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs default signature with per-request scheduling info using named maps. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a834fac59748e90569a2f2521e09b3d4d(size_t signature_index, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for a given signature index asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ac13342d1cbce37d965cd623b5ed3e926(const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for the default signature asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8858d14ed161445c2d474de2023ee88a(size_t signature_index, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs asynchronously with per-run options for a given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a0ba3984a1b74bfa4e23fc16a6a02a8a1(size_t signature_index, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs asynchronously with per-request scheduling info for a given signature. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a020fd5f9935332640553a2aee2d0c9dd(const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs default signature asynchronously with per-run options. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a61e2178937b8a1ca7fdeef277c7a8ff4(const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs default signature asynchronously with per-request scheduling info. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a18d6bb4ecb4946ee9a0e3d0476782b81(absl::string_view signature_key, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for a given signature key asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af1991b4fe01c2f4fb68c51b5356299d9(absl::string_view signature_key, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key asynchronously with per-run options. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a04067aceea912a664ad0d756c838386b(absl::string_view signature_key, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_buffers, const std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_buffers, bool & async, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key asynchronously with per-request scheduling info. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aeeba332a99db4ad2b2b5ddd99e536e4c(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs the model for a given signature key asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` map. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a6ab2661c3f573aa7e1260b8bf03be45e(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options *run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key asynchronously with per-run options using named maps. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a2f9bb9eb278c5079675e8595c885042b(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async, const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Runs by signature key asynchronously with per-request scheduling info using named maps. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ad05f4efc11845a7dbc6c597d5de8859b(void *data, bool(*)(void *) check_cancelled_func)` | `void` Sets a callback function that will be called after every node/op during model execution to check if the execution should be cancelled. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a82dcd785085e490b511b97f071d37e8a(absl::AnyInvocable< bool()> check_cancelled_func)` | `void` Sets a callback function for checking cancellation during execution. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a6aa1bbc3cef367421b9308666f2e1dc0(size_t signature_index, absl::string_view key, absl::string_view value)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Sets a dispatch annotation on the compiled model. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a0da1c934526da440ad8e021e855507c2(absl::string_view key, absl::string_view value)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Overloaded version for the default signature (index 0). |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a1ad50574feffa2ece3c8831ad7507b4d(absl::string_view signature_name, absl::string_view key, absl::string_view value)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Overloaded version that takes a signature name instead of an index. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a3e86cd9a9d772e06d12030a3088e93a1(const LiteRtSchedulingInfo & scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` Sets model-level default scheduling info. |

| ### Public static functions ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a665380414424ca8b48d45e46eed25772(https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, const std::string & model_filename, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options & compilation_options)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model >` Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` from a TFLite file. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a306a436b908d3e086226850397ecac0d(https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, https://developers.google.com/edge/api/litert/c/classlitert/1-1-buffer-ref#classlitert_1_1_buffer_ref< uint8_t > model_buffer, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options & compilation_options)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model >` An overload of `Create` that takes a buffer reference to the model instead of a filename. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ab313795e6929ec967570e70903319b98(https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, const std::string & model_filename, litert::HwAccelerators hardware_accelerators)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model >` A simplified version of `Create` that uses default compilation options. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a45ee615d602486132259f0034b8e9678(https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, https://developers.google.com/edge/api/litert/c/classlitert/1-1-buffer-ref#classlitert_1_1_buffer_ref< uint8_t > model_buffer, litert::HwAccelerators hardware_accelerators)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model >` An overload of `Create` that takes a buffer reference to the model instead of a filename. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a8400bf0ecaac96b262dd85e8d060aaae()` | `absl::string_view` Returns the default signature key of the model. |

| ### Protected static functions ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1abe5188fa1accb7c7e0b8dc183ec9a223(void *data)` | `bool` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a72b0ba6ddf4803fa960f74b43b762bee(https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, const LiteRtModel litert_model, https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options & compilation_options)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1abde36996236234cd873be137dfd2eef1(https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, const LiteRtModel litert_model, litert::HwAccelerators hardware_accelerators)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1afac8b1ef95f285ab11ce2a094dbfb765(const https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment & env, const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements & buffer_requirements, const RankedTensorType & tensor_type)` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` with the given buffer requirements and tensor type. |

| ### Protected functions ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af0bfbf95259c8a75a168be6e1fa499b4(https://developers.google.com/edge/api/litert/c/structlitert/1-1internal-1-1-environment-holder#structlitert_1_1internal_1_1_environment_holder & env, LiteRtModel litert_model, OwnHandle model_owned, LiteRtCompiledModel compiled_model, OwnHandle owned)` | Constructs a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` instance. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a381f568ab4a255a23582afa1ea2ca1dd(size_t signature_index, absl::string_view tensor_name, bool is_input) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` for a given signature index and tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ab02dbc2ef780b8a055ac1a72952dd0f7(absl::string_view signature_name, absl::string_view tensor_name, bool is_input) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer >` Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` for a given signature and tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ac36106752f14098cac97f9eef499b8d3(size_t signature_index, bool is_input) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< std::vector< https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > >` Creates a vector of `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s for a given signature subgraph. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a1e9a713144595acbdaa89b0218756774(size_t signature_index, absl::string_view input_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< size_t >` Returns the signature input index for a given input tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a39ceb9a1ca8d8a3dc01d83ecc97314e8(size_t signature_index, absl::string_view output_name) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< size_t >` Returns the signature output index for a given output tensor name. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1adce196ac3fd533899e2a68ee174dd391(absl::string_view signature_key) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< SimpleSignature >` Returns the `SimpleSignature` object for the given signature key. |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ae8587cb6e94e83bed2ddaad6479f6f61() const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< https://developers.google.com/edge/api/litert/c/classlitert/1-1-environment#classlitert_1_1_environment >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aef77b63fb9b4161828122c09d0fa77fc(LiteRtParamIndex signature_index, size_t num_input_buffers, LiteRtTensorBuffer *input_buffers, size_t num_output_buffers, LiteRtTensorBuffer *output_buffers, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af39ae81770d5d56429dd9723ef4fa389(LiteRtParamIndex signature_index, size_t num_input_buffers, LiteRtTensorBuffer *input_buffers, size_t num_output_buffers, LiteRtTensorBuffer *output_buffers, bool & async, LiteRtOptions run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a817f32c01dde2c190dededfb986f4668(LiteRtParamIndex signature_index, size_t num_input_buffers, LiteRtTensorBuffer *input_buffers, size_t num_output_buffers, LiteRtTensorBuffer *output_buffers, bool & async, LiteRtOptions run_options, const LiteRtSchedulingInfo *scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a47b1e0f3286a7e3a48c7ac6dbd87116b(size_t signature_index, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a2c0ae5d423007f2a1649c582e7ff86f0(size_t signature_index, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, bool & async, LiteRtOptions run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a6cd9809e6e03ace610ff1ea9c3d98e8b(size_t signature_index, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > input_buffers, absl::Span< const https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > output_buffers, bool & async, LiteRtOptions run_options, const LiteRtSchedulingInfo *scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af48c7d67ab8a35335835d22160888742(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1a4eb75525b3585726f36570157d7f3361(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async, LiteRtOptions run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1abe07b8647bfc80654e11bd4c036c7905(absl::string_view signature_key, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async, LiteRtOptions run_options, const LiteRtSchedulingInfo *scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1af23118ced5bdad9143cedb8a32049562(size_t signature_index, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1aafd5e67b391f079fae62b8730c10b3f2(size_t signature_index, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async, LiteRtOptions run_options) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |
| `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model_1ac26da219fcb8a5bf033c1610e4b8f3a3(size_t signature_index, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & input_map, const absl::flat_hash_map< absl::string_view, https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer > & output_map, bool & async, LiteRtOptions run_options, const LiteRtSchedulingInfo *scheduling_info) const ` | `https://developers.google.com/edge/api/litert/c/classlitert/1-1-expected#classlitert_1_1_expected< void >` |

## Friend classes

### ::mediapipe::InferenceRunnerLiteRt

```
friend class ::mediapipe::InferenceRunnerLiteRt
```

### benchmark::BenchmarkLiteRtModel

```
friend class benchmark::BenchmarkLiteRtModel
```

### compiled_model_wrapper::CompiledModelWrapper

```
friend class compiled_model_wrapper::CompiledModelWrapper
```

### lm::AudioLiteRtCompiledModelExecutor

```
friend class lm::AudioLiteRtCompiledModelExecutor
```

### lm::EmbeddingLookupText

```
friend class lm::EmbeddingLookupText
```

### lm::EndOfMultiModalEmbedding

```
friend class lm::EndOfMultiModalEmbedding
```

### lm::FrontendModelWrapper

```
friend class lm::FrontendModelWrapper
```

### lm::LlmLiteRtCompiledModelExecutorBase

```
friend class lm::LlmLiteRtCompiledModelExecutorBase
```

### lm::LlmLiteRtCompiledModelExecutorDynamic

```
friend class lm::LlmLiteRtCompiledModelExecutorDynamic
```

### lm::LlmLiteRtCompiledModelExecutorStatic

```
friend class lm::LlmLiteRtCompiledModelExecutorStatic
```

### lm::LlmLiteRtMtpDrafter

```
friend class lm::LlmLiteRtMtpDrafter
```

### lm::LlmLiteRtNpuCompiledModelExecutor

```
friend class lm::LlmLiteRtNpuCompiledModelExecutor
```

### lm::VisionLiteRtCompiledModelExecutor

```
friend class lm::VisionLiteRtCompiledModelExecutor
```

## Protected attributes

### check_cancelled_func_

```
absl::AnyInvocable< bool()> check_cancelled_func_
```

### env_

```
internal::EnvironmentHolder env_
```

### model_

```
internal::BaseHandle< LiteRtModel > model_
```

## Public functions

### ClearErrors

```
Expected< void > ClearErrors() const 
```
Clears all errors from the error reporter.


> [!NOTE]
> **Note:** This only works if the compiled model uses `BufferErrorReporter`, not `StderrReporter`.

<br />

### ClearSchedulingInfo

```
Expected< void > ClearSchedulingInfo() const 
```
Clears model-level default scheduling info.

### CompiledModel

```
 CompiledModel()=default
```

### CreateInputBuffer

```
Expected< TensorBuffer > CreateInputBuffer(
  absl::string_view signature_name,
  absl::string_view input_name
) const 
```
Creates an input tensor buffer for the given signature and input name.

### CreateInputBuffer

```
Expected< TensorBuffer > CreateInputBuffer(
  absl::string_view input_name
) const 
```
Creates an input tensor buffer for the default signature and a given input name.

### CreateInputBuffers

```
Expected< std::vector< TensorBuffer > > CreateInputBuffers(
  absl::string_view signature_name
) const 
```
A helper function to create input tensor buffers for a given signature.

It uses `BufferRequirements` and `RankedTensorType` to create the input tensor buffers.

### CreateInputBuffers

```
Expected< std::vector< TensorBuffer > > CreateInputBuffers(
  size_t signature_index
) const 
```
A helper function to create input tensor buffers for a given signature.

It uses `BufferRequirements` and `RankedTensorType` to create the input tensor buffers.

### CreateInputBuffers

```
Expected< std::vector< TensorBuffer > > CreateInputBuffers() const 
```
A helper function to create input tensor buffers for the default signature.

It uses `BufferRequirements` and `RankedTensorType` to create the input tensor buffers.

### CreateOutputBuffer

```
Expected< TensorBuffer > CreateOutputBuffer(
  absl::string_view signature_name,
  absl::string_view output_name
) const 
```
Creates an output tensor buffer for the given signature and output name.

### CreateOutputBuffer

```
Expected< TensorBuffer > CreateOutputBuffer(
  absl::string_view output_name
) const 
```
Creates an output tensor buffer for the default signature and a given output name.

### CreateOutputBuffers

```
Expected< std::vector< TensorBuffer > > CreateOutputBuffers(
  absl::string_view signature_name
) const 
```
A helper function to create output tensor buffers for a given signature.

It uses `BufferRequirements` and `RankedTensorType` to create the output tensor buffers.

### CreateOutputBuffers

```
Expected< std::vector< TensorBuffer > > CreateOutputBuffers(
  size_t signature_index
) const 
```
A helper function to create output tensor buffers for a given signature.

It uses `BufferRequirements` and `RankedTensorType` to create the output tensor buffers.

### CreateOutputBuffers

```
Expected< std::vector< TensorBuffer > > CreateOutputBuffers() const 
```
A helper function to create output tensor buffers for the default signature.

It uses `BufferRequirements` and `RankedTensorType` to create the output tensor buffers.

### GetDispatchAnnotation

```
Expected< std::optional< std::string > > GetDispatchAnnotation(
  size_t signature_index,
  absl::string_view key
)
```
Gets a dispatch annotation from the compiled model.

Returns `std::nullopt` if the key does not exist.

### GetDispatchAnnotation

```
Expected< std::optional< std::string > > GetDispatchAnnotation(
  absl::string_view key
)
```
Overloaded version for the default signature (index 0).

### GetDispatchAnnotation

```
Expected< std::optional< std::string > > GetDispatchAnnotation(
  absl::string_view signature_name,
  absl::string_view key
)
```
Overloaded version that takes a signature name instead of an index.

### GetErrorMessages

```
Expected< std::string > GetErrorMessages() const 
```
Gets all error messages from the error reporter as a single string.


> [!NOTE]
> **Note:** This only works if the compiled model uses `BufferErrorReporter`, not `StderrReporter`. The C++ wrapper automatically manages memory using RAII.

<br />

### GetInputBufferRequirements

```
Expected< TensorBufferRequirements > GetInputBufferRequirements(
  absl::string_view signature_name,
  absl::string_view input_name
)
```
Gets input buffer requirements for the given signature and input name.

### GetInputBufferRequirements

```
Expected< TensorBufferRequirements > GetInputBufferRequirements(
  size_t signature_index,
  size_t input_index
) const 
```
Returns the buffer requirements for the n-th input tensor.

The returned `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements` is used to create the input tensor buffer.

### GetInputBufferRequirements

```
Expected< TensorBufferRequirements > GetInputBufferRequirements(
  size_t signature_index,
  absl::string_view input_name
) const 
```
An overload of `GetInputBufferRequirements` that takes an input tensor name.

### GetInputBufferRequirements

```
Expected< TensorBufferRequirements > GetInputBufferRequirements(
  size_t input_index
) const 
```
Gets input buffer requirements of the default signature for the n-th input tensor.

### GetInputBufferRequirements

```
Expected< TensorBufferRequirements > GetInputBufferRequirements(
  absl::string_view input_name
) const 
```
Gets input buffer requirements of the default signature for a given input name.

### GetInputTensorLayout

```
Expected< Layout > GetInputTensorLayout(
  size_t signature_index,
  size_t input_index
) const 
```
Returns the layout of the given input tensor.

This reflects the most recent shape requested via `ResizeInputTensor` or automatic resize during execution.

### GetInputTensorType

```
Expected< RankedTensorType > GetInputTensorType(
  size_t signature_index,
  size_t input_index
) const 
```
Returns the tensor type for the n-th input tensor.

### GetInputTensorType

```
Expected< RankedTensorType > GetInputTensorType(
  size_t signature_index,
  absl::string_view input_name
) const 
```
Returns the tensor type for a given input tensor name.

### GetInputTensorType

```
Expected< RankedTensorType > GetInputTensorType(
  absl::string_view signature_key,
  absl::string_view input_name
) const 
```
Returns the tensor type for a given input tensor name.

### GetInputTensorType

```
Expected< RankedTensorType > GetInputTensorType(
  absl::string_view input_name
) const 
```
Gets the input tensor type of the default signature for a given input name.

### GetNumSignatures

```
size_t GetNumSignatures() const 
```
Returns the number of signatures defined in the model.

### GetOutputBufferRequirements

```
Expected< TensorBufferRequirements > GetOutputBufferRequirements(
  absl::string_view signature_name,
  absl::string_view output_name
)
```
Gets output buffer requirements for the given signature and output name.

### GetOutputBufferRequirements

```
Expected< TensorBufferRequirements > GetOutputBufferRequirements(
  size_t signature_index,
  size_t output_index
) const 
```
Returns the buffer requirements for the given output tensor.

The returned `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer-requirements#classlitert_1_1_tensor_buffer_requirements` is used to create the output tensor buffer.

### GetOutputBufferRequirements

```
Expected< TensorBufferRequirements > GetOutputBufferRequirements(
  size_t signature_index,
  absl::string_view output_name
) const 
```
An overload of `GetOutputBufferRequirements` that takes an output tensor name.

### GetOutputBufferRequirements

```
Expected< TensorBufferRequirements > GetOutputBufferRequirements(
  size_t output_index
) const 
```
Gets input buffer requirements of the default signature for the n-th input tensor.

### GetOutputBufferRequirements

```
Expected< TensorBufferRequirements > GetOutputBufferRequirements(
  absl::string_view output_name
) const 
```
Gets input buffer requirements of the default signature for a given input name.

### GetOutputTensorLayouts

```
Expected< std::vector< Layout > > GetOutputTensorLayouts(
  size_t signature_index,
  bool update_allocation
) const 
```
Returns the layouts of all output tensors for a given signature index.

If `update_allocation` is `true`, the tensor allocations will be updated to the current state of the compiled model.

### GetOutputTensorType

```
Expected< RankedTensorType > GetOutputTensorType(
  size_t signature_index,
  size_t output_index
) const 
```
Returns the tensor type for the n-th output tensor.

### GetOutputTensorType

```
Expected< RankedTensorType > GetOutputTensorType(
  size_t signature_index,
  absl::string_view output_name
) const 
```
Returns the tensor type for a given output tensor name.

### GetOutputTensorType

```
Expected< RankedTensorType > GetOutputTensorType(
  absl::string_view signature_key,
  absl::string_view output_name
) const 
```
Returns the tensor type for a given output tensor name.

### GetOutputTensorType

```
Expected< RankedTensorType > GetOutputTensorType(
  absl::string_view output_name
) const 
```
Gets the output tensor type of the default signature for a given output name.

### GetSignature

```
Expected< SimpleSignature > GetSignature(
  size_t signature_index
) const 
```
Returns the signature at the given index.

### GetSignatureIndex

```
Expected< size_t > GetSignatureIndex(
  absl::string_view signature_key
) const 
```
Returns the signature index for a given signature key.

Returns 0 if the signature key is empty.

### GetSignatureInputNames

```
Expected< std::vector< absl::string_view > > GetSignatureInputNames(
  size_t signature_index
) const 
```
Returns the list of input names defined in the signature.

### GetSignatureInputNames

```
Expected< std::vector< absl::string_view > > GetSignatureInputNames() const 
```
Returns the list of input names defined in the signature.

### GetSignatureInputNames

```
Expected< std::vector< absl::string_view > > GetSignatureInputNames(
  absl::string_view signature_key
) const 
```
Returns the list of input names defined in the signature.

### GetSignatureKeys

```
Expected< std::vector< absl::string_view > > GetSignatureKeys() const 
```
Returns the list of signature key names defined in the signature.

### GetSignatureOutputNames

```
Expected< std::vector< absl::string_view > > GetSignatureOutputNames(
  size_t signature_index
) const 
```
Returns the list of output names defined in the signature.

### GetSignatureOutputNames

```
Expected< std::vector< absl::string_view > > GetSignatureOutputNames() const 
```
Returns the list of output names defined in the signature.

### GetSignatureOutputNames

```
Expected< std::vector< absl::string_view > > GetSignatureOutputNames(
  absl::string_view signature_key
) const 
```
Returns the list of output names defined in the signature.

### GetSignatures

```
Expected< std::vector< SimpleSignature > > GetSignatures() const 
```
Returns the list of signatures defined in the model.

### IsFullyAccelerated

```
Expected< bool > IsFullyAccelerated()
```
Returns `true` if the compiled model is fully accelerated with the given hardware accelerators.

### RemoveDispatchAnnotation

```
Expected< void > RemoveDispatchAnnotation(
  size_t signature_index,
  absl::string_view key
)
```
Removes a dispatch annotation from the compiled model.

This succeeds even if the key does not exist.

### RemoveDispatchAnnotation

```
Expected< void > RemoveDispatchAnnotation(
  absl::string_view key
)
```
Overloaded version for the default signature (index 0).

### RemoveDispatchAnnotation

```
Expected< void > RemoveDispatchAnnotation(
  absl::string_view signature_name,
  absl::string_view key
)
```
Overloaded version that takes a signature name instead of an index.

### ReportError

```
Expected< void > ReportError(
  const char *format,
  Args &&... args
) const 
```
Reports an error to the compiled model's error reporter.

Supports printf-style formatting for error messages.

### ResizeInputTensor

```
Expected< void > ResizeInputTensor(
  size_t signature_index,
  size_t input_index,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor to support dynamic shapes.

This function mirrors TFLite's `ResizeInputTensorStrict` API and requires the tensor signature to include dynamic dimensions. After calling this function, the compiled model will reallocate internal buffers as needed to accommodate the new tensor shape. For models that need relaxed validation, use `ResizeInputTensorNonStrict`.


> [!NOTE]
> **Note:** After resizing, previously obtained buffer requirements may be invalidated. Callers should re-query buffer requirements if needed.

<br />

Details Parameters `signature_index` The index of the signature in the model. `input_index` The index of the input tensor in the signature. `dims` The new dimensions for the input tensor. **Returns** Success if the resize operation completes successfully, or an error with an appropriate status code on failure.

### ResizeInputTensor

```
Expected< void > ResizeInputTensor(
  size_t signature_index,
  absl::string_view input_name,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor by name for the given signature.

### ResizeInputTensor

```
Expected< void > ResizeInputTensor(
  absl::string_view signature_name,
  absl::string_view input_name,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor by name for the given signature name.

### ResizeInputTensor

```
Expected< void > ResizeInputTensor(
  size_t input_index,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor of the default signature by index.

### ResizeInputTensor

```
Expected< void > ResizeInputTensor(
  absl::string_view input_name,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor of the default signature by name.

### ResizeInputTensorNonStrict

```
Expected< void > ResizeInputTensorNonStrict(
  size_t signature_index,
  size_t input_index,
  absl::Span< const int > dims
)
```
Non-strict variants mirror TFLite's `ResizeInputTensor` behavior, allowing arbitrary shape updates when backends support them.

### ResizeInputTensorNonStrict

```
Expected< void > ResizeInputTensorNonStrict(
  size_t signature_index,
  absl::string_view input_name,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor by name for the given signature.

### ResizeInputTensorNonStrict

```
Expected< void > ResizeInputTensorNonStrict(
  absl::string_view signature_name,
  absl::string_view input_name,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor by name for the given signature name.

### ResizeInputTensorNonStrict

```
Expected< void > ResizeInputTensorNonStrict(
  size_t input_index,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor of the default signature by index.

### ResizeInputTensorNonStrict

```
Expected< void > ResizeInputTensorNonStrict(
  absl::string_view input_name,
  absl::Span< const int > dims
)
```
Resizes the specified input tensor of the default signature by name.

### Run

```
Expected< void > Run(
  size_t signature_index,
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers
) const 
```
Runs the model for a given signature index synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

### Run

```
Expected< void > Run(
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers
) const 
```
Runs the model for the default signature synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

### Run

```
Expected< void > Run(
  size_t signature_index,
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  Options *run_options
) const 
```
Runs with per-run options for a given signature index.

### Run

```
Expected< void > Run(
  size_t signature_index,
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs with per-request scheduling info for a given signature index.

### Run

```
Expected< void > Run(
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  Options *run_options
) const 
```
Runs default signature with per-run options.

### Run

```
Expected< void > Run(
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs default signature with per-request scheduling info.

### Run

```
Expected< void > Run(
  absl::string_view signature_key,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers
) const 
```
Runs the model for a given signature key synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

### Run

```
Expected< void > Run(
  absl::string_view signature_key,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  Options *run_options
) const 
```
Runs by signature key with per-run options.

### Run

```
Expected< void > Run(
  absl::string_view signature_key,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs by signature key with per-request scheduling info.

### Run

```
Expected< void > Run(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map
) const 
```
Runs the model for a given signature key synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` map.

If you have bound the input with external buffers through `https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options`, you can skip providing those input buffers in the map.

### Run

```
Expected< void > Run(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  Options *run_options
) const 
```
Runs by signature key with per-run options using named maps.

### Run

```
Expected< void > Run(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs by signature key with per-request scheduling info using named maps.

### Run

```
Expected< void > Run(
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map
) const 
```
Runs the model for the default signature synchronously with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` map.

If you have bound the input with external buffers through `https://developers.google.com/edge/api/litert/c/classlitert/1-1-options#classlitert_1_1_options`, you can skip providing those input buffers in the map.

### Run

```
Expected< void > Run(
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  Options *run_options
) const 
```
Runs default signature with per-run options using named maps.

### Run

```
Expected< void > Run(
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs default signature with per-request scheduling info using named maps.

### RunAsync

```
Expected< void > RunAsync(
  size_t signature_index,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async
) const 
```
Runs the model for a given signature index asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

If asynchronous execution is possible, `async` will be set to `true`; otherwise, the function runs the model synchronously.

### RunAsync

```
Expected< void > RunAsync(
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async
) const 
```
Runs the model for the default signature asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

If asynchronous execution is possible, `async` will be set to `true`; otherwise, the function runs the model synchronously.

### RunAsync

```
Expected< void > RunAsync(
  size_t signature_index,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async,
  Options *run_options
) const 
```
Runs asynchronously with per-run options for a given signature.

### RunAsync

```
Expected< void > RunAsync(
  size_t signature_index,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs asynchronously with per-request scheduling info for a given signature.

### RunAsync

```
Expected< void > RunAsync(
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async,
  Options *run_options
) const 
```
Runs default signature asynchronously with per-run options.

### RunAsync

```
Expected< void > RunAsync(
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs default signature asynchronously with per-request scheduling info.

### RunAsync

```
Expected< void > RunAsync(
  absl::string_view signature_key,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async
) const 
```
Runs the model for a given signature key asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s.

If asynchronous execution is possible, `async` will be set to `true`; otherwise, the function runs the model synchronously.

### RunAsync

```
Expected< void > RunAsync(
  absl::string_view signature_key,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async,
  Options *run_options
) const 
```
Runs by signature key asynchronously with per-run options.

### RunAsync

```
Expected< void > RunAsync(
  absl::string_view signature_key,
  const std::vector< TensorBuffer > & input_buffers,
  const std::vector< TensorBuffer > & output_buffers,
  bool & async,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs by signature key asynchronously with per-request scheduling info.

### RunAsync

```
Expected< void > RunAsync(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async
) const 
```
Runs the model for a given signature key asynchronously, if possible, with the provided input/output `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` map.

If asynchronous execution is possible, `async` will be set to `true`; otherwise, the function runs the model synchronously.

### RunAsync

```
Expected< void > RunAsync(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async,
  Options *run_options
) const 
```
Runs by signature key asynchronously with per-run options using named maps.

### RunAsync

```
Expected< void > RunAsync(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async,
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Runs by signature key asynchronously with per-request scheduling info using named maps.

### SetCancellationFunction

```
void SetCancellationFunction(
  void *data,
  bool(*)(void *) check_cancelled_func
)
```
Sets a callback function that will be called after every node/op during model execution to check if the execution should be cancelled.

This behavior is defined here: tflite/core/subgraph.cc;l=1746-1750?q=tflite%20subgraph The callback should return `true` if execution should be cancelled.

> [!NOTE]
> **Note:** Use either this callback-based mechanism or the non-callback version (see below) with `EnableCancellation`/`Cancel`, but not both.

<br />

### SetCancellationFunction

```
void SetCancellationFunction(
  absl::AnyInvocable< bool()> check_cancelled_func
)
```
Sets a callback function for checking cancellation during execution.

The callback will be called periodically during model execution. This is a C++-friendly version of `SetCancellationFunction`.

### SetDispatchAnnotation

```
Expected< void > SetDispatchAnnotation(
  size_t signature_index,
  absl::string_view key,
  absl::string_view value
)
```
Sets a dispatch annotation on the compiled model.

These annotations are propagated to dispatch graphs during model execution and provide runtime hints and metadata for hardware accelerator optimization.

### SetDispatchAnnotation

```
Expected< void > SetDispatchAnnotation(
  absl::string_view key,
  absl::string_view value
)
```
Overloaded version for the default signature (index 0).

### SetDispatchAnnotation

```
Expected< void > SetDispatchAnnotation(
  absl::string_view signature_name,
  absl::string_view key,
  absl::string_view value
)
```
Overloaded version that takes a signature name instead of an index.

### SetSchedulingInfo

```
Expected< void > SetSchedulingInfo(
  const LiteRtSchedulingInfo & scheduling_info
) const 
```
Sets model-level default scheduling info.

## Public static functions

### Create

```
Expected< CompiledModel > Create(
  litert::Environment & env,
  const std::string & model_filename,
  Options & compilation_options
)
```
Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` from a TFLite file.

The model is loaded into memory, and the caller takes ownership of the returned `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` object. The caller should keep the model alive until the `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` is destroyed. The provided `compilation_options` are used for model compilation, and `hardware_accelerators` is used to select the accelerator, regardless of whether the model is AOT or JIT compiled.


> [!NOTE]
> **Note:** The provided environment must outlive the compiled model and any executions running on it.

> [!NOTE]
> **Note:** Even if the model is fully AOT-compiled for an NPU, you must specify the NPU accelerator in `hardware_accelerators` to use it properly.

<br />

### Create

```
Expected< CompiledModel > Create(
  litert::Environment & env,
  BufferRef< uint8_t > model_buffer,
  Options & compilation_options
)
```
An overload of `Create` that takes a buffer reference to the model instead of a filename.

### Create

```
Expected< CompiledModel > Create(
  litert::Environment & env,
  const std::string & model_filename,
  litert::HwAccelerators hardware_accelerators
)
```
A simplified version of `Create` that uses default compilation options.

The provided hardware accelerator is used to select the target accelerator.

> [!NOTE]
> **Note:** This should be specified for both JIT and AOT compiled models.

<br />

### Create

```
Expected< CompiledModel > Create(
  litert::Environment & env,
  BufferRef< uint8_t > model_buffer,
  litert::HwAccelerators hardware_accelerators
)
```
An overload of `Create` that takes a buffer reference to the model instead of a filename.

### DefaultSignatureKey

```
absl::string_view DefaultSignatureKey()
```
Returns the default signature key of the model.

## Protected static functions

### CheckCancelledWrapper

```
bool CheckCancelledWrapper(
  void *data
)
```

### Create

```
Expected< CompiledModel > Create(
  litert::Environment & env,
  const LiteRtModel litert_model,
  Options & compilation_options
)
```

### Create

```
Expected< CompiledModel > Create(
  litert::Environment & env,
  const LiteRtModel litert_model,
  litert::HwAccelerators hardware_accelerators
)
```

### CreateBufferImpl

```
Expected< TensorBuffer > CreateBufferImpl(
  const Environment & env,
  const TensorBufferRequirements & buffer_requirements,
  const RankedTensorType & tensor_type
)
```
Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` with the given buffer requirements and tensor type.

## Protected functions

### CompiledModel

```
 CompiledModel(
  internal::EnvironmentHolder & env,
  LiteRtModel litert_model,
  OwnHandle model_owned,
  LiteRtCompiledModel compiled_model,
  OwnHandle owned
)
```
Constructs a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model` instance.

<br />

Details Parameters `model_owned` Indicates whether the provided `litert_model` handle is owned by the `https://developers.google.com/edge/api/litert/c/classlitert/1-1-compiled-model#classlitert_1_1_compiled_model`. `owned` If `true`, the created object takes ownership of the `compiled_model` handle.

### CreateInputOutputBuffer

```
Expected< TensorBuffer > CreateInputOutputBuffer(
  size_t signature_index,
  absl::string_view tensor_name,
  bool is_input
) const 
```
Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` for a given signature index and tensor name.

### CreateInputOutputBuffer

```
Expected< TensorBuffer > CreateInputOutputBuffer(
  absl::string_view signature_name,
  absl::string_view tensor_name,
  bool is_input
) const 
```
Creates a `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer` for a given signature and tensor name.

### CreateInputOutputBuffers

```
Expected< std::vector< TensorBuffer > > CreateInputOutputBuffers(
  size_t signature_index,
  bool is_input
) const 
```
Creates a vector of `https://developers.google.com/edge/api/litert/c/classlitert/1-1-tensor-buffer#classlitert_1_1_tensor_buffer`s for a given signature subgraph.

### FindInputIndex

```
Expected< size_t > FindInputIndex(
  size_t signature_index,
  absl::string_view input_name
) const 
```
Returns the signature input index for a given input tensor name.

### FindOutputIndex

```
Expected< size_t > FindOutputIndex(
  size_t signature_index,
  absl::string_view output_name
) const 
```
Returns the signature output index for a given output tensor name.

### FindSignature

```
Expected< SimpleSignature > FindSignature(
  absl::string_view signature_key
) const 
```
Returns the `SimpleSignature` object for the given signature key.

Returns the default signature if the signature key is empty.

### GetEnvironment

```
Expected< Environment > GetEnvironment() const 
```

### RunCApiHelper

```
Expected< void > RunCApiHelper(
  LiteRtParamIndex signature_index,
  size_t num_input_buffers,
  LiteRtTensorBuffer *input_buffers,
  size_t num_output_buffers,
  LiteRtTensorBuffer *output_buffers,
  bool & async
) const 
```

### RunCApiHelper

```
Expected< void > RunCApiHelper(
  LiteRtParamIndex signature_index,
  size_t num_input_buffers,
  LiteRtTensorBuffer *input_buffers,
  size_t num_output_buffers,
  LiteRtTensorBuffer *output_buffers,
  bool & async,
  LiteRtOptions run_options
) const 
```

### RunCApiHelper

```
Expected< void > RunCApiHelper(
  LiteRtParamIndex signature_index,
  size_t num_input_buffers,
  LiteRtTensorBuffer *input_buffers,
  size_t num_output_buffers,
  LiteRtTensorBuffer *output_buffers,
  bool & async,
  LiteRtOptions run_options,
  const LiteRtSchedulingInfo *scheduling_info
) const 
```

### RunHelper

```
Expected< void > RunHelper(
  size_t signature_index,
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  bool & async
) const 
```

### RunHelper

```
Expected< void > RunHelper(
  size_t signature_index,
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  bool & async,
  LiteRtOptions run_options
) const 
```

### RunHelper

```
Expected< void > RunHelper(
  size_t signature_index,
  absl::Span< const TensorBuffer > input_buffers,
  absl::Span< const TensorBuffer > output_buffers,
  bool & async,
  LiteRtOptions run_options,
  const LiteRtSchedulingInfo *scheduling_info
) const 
```

### RunMapHelper

```
Expected< void > RunMapHelper(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async
) const 
```

### RunMapHelper

```
Expected< void > RunMapHelper(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async,
  LiteRtOptions run_options
) const 
```

### RunMapHelper

```
Expected< void > RunMapHelper(
  absl::string_view signature_key,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async,
  LiteRtOptions run_options,
  const LiteRtSchedulingInfo *scheduling_info
) const 
```

### RunMapWithIndexHelper

```
Expected< void > RunMapWithIndexHelper(
  size_t signature_index,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async
) const 
```

### RunMapWithIndexHelper

```
Expected< void > RunMapWithIndexHelper(
  size_t signature_index,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async,
  LiteRtOptions run_options
) const 
```

### RunMapWithIndexHelper

```
Expected< void > RunMapWithIndexHelper(
  size_t signature_index,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & input_map,
  const absl::flat_hash_map< absl::string_view, TensorBuffer > & output_map,
  bool & async,
  LiteRtOptions run_options,
  const LiteRtSchedulingInfo *scheduling_info
) const 
```