ExecutorchManager class abstract

High-level manager for ExecuTorch inference operations

This class provides the main API for ExecuTorch integration, managing model lifecycle, inference execution, and resource management. It acts as a facade over the lower-level platform-specific implementations.

Runs on Android, iOS, macOS, Windows, and Linux through dart:ffi with native assets. There is no web implementation here — for web, use package:executorch_flutter.

Implementers

Constructors

ExecutorchManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createTensorData({required List<int> shape, required TensorType dataType, required List<num> data, String? name}) TensorData
Create tensor data with validation
disposeAllModels() Future<void>
Dispose all loaded models and free their resources
disposeModel(String modelId) Future<void>
Dispose a loaded model and free its resources
getLoadedModel(String modelId) ExecuTorchModel?
Get a loaded model by its ID
getLoadedModelIds() Future<List<String>>
Get the IDs of all loaded models
getLoadedModels() List<ExecuTorchModel>
Get all currently loaded models
getMemoryInfo() Future<Map<String, Object>>
Get detailed information about system memory usage
initialize() Future<void>
Initialize the ExecutorchManager
isAvailable() Future<bool>
Check if ExecuTorch is properly initialized and available
loadModel(String filePath) Future<ExecuTorchModel>
Load an ExecuTorch model from a file path
loadModelFromBytes(Uint8List modelBytes) Future<ExecuTorchModel>
Load an ExecuTorch model from bytes
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDebugLogging(bool enabled) Future<void>
Enable or disable ExecuTorch debug logging
shutdown() Future<void>
Cleanup resources when the manager is no longer needed
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance ExecutorchManager
Get the singleton instance of ExecutorchManager
no setter