com.google.ai.edge.litert

Interfaces

ModelProvider

A model provider that provides a model file and relevant information.

NpuAcceleratorProvider

An interface to provide the NPU libraries.

NpuCompatibilityChecker

An interface to checks if the device is compatible with NPU.

Classes

BuiltinNpuAcceleratorProvider

An implementation of NpuAcceleratorProvider, which provides the NPU libraries without dynamic downloading.

CompiledModel

Class that represents a compiled LiteRT model.

CompiledModel.CpuOptions

Options to specify CPU acceleration for compiling a model.

CompiledModel.GpuOptions

Options to specify GPU acceleration for compiling a model.

CompiledModel.Options

Options to specify hardware acceleration for compiling a model.

CompiledModel.QualcommOptions

Options to specify Qualcomm options for compiling a model.

Environment

Environment to hold configuration options for LiteRT runtime.

JniHandle

A base class for all Kotlin types that wrap a JNI handle.

ModelSelector

ModelSelector allows to dynamically select a ModelProvider from a given set of providers.

TensorBuffer

TensorBuffer represents the raw memory where tensor data is stored.

TensorBufferRequirements

Requirements for allocating a TensorBuffer.

TensorType

The type of a tensor, including its element type and layout.

TensorType.Layout

Layout of a tensor.

Exceptions

LiteRtException

Exception for various LiteRT API errors.

Enums

Accelerator

Hardware accelerators supported by LiteRT.

CompiledModel.GpuOptions.Backend

Backend for GPU options.

CompiledModel.GpuOptions.BufferStorageType

Buffer storage type for GPU options.

CompiledModel.GpuOptions.Precision

Precision for GPU options.

CompiledModel.GpuOptions.Priority

Priority for GPU options.

CompiledModel.QualcommOptions.HtpPerformanceMode

HTP performance mode for Qualcomm options.

CompiledModel.QualcommOptions.LogLevel

Log level for Qualcomm options.

CompiledModel.QualcommOptions.OptimizationLevel

Optimization level for Qualcomm options.

CompiledModel.QualcommOptions.Profiling

Profiling for Qualcomm options.

Environment.Option

Options configurable in LiteRT environment.

ModelProvider.Type

Model files could be either an asset or a file.

Status

Status codes for LiteRtException.

TensorBufferType

The type of the tensor buffer.

TensorType.ElementType

Data type of tensor elements.