NNAPIConfiguration
Options & Configuration · AiDotNet.Deployment.Mobile.Android
Configuration for NNAPI backend.
Constructors
| Constructor |
Summary |
NNAPIConfiguration() |
|
Properties
| Property |
Summary |
NNAPIDevice PreferredDevice { get; set; } |
Gets or sets the preferred acceleration device. |
NNAPIExecutionPreference ExecutionPreference { get; set; } |
Gets or sets the execution preference. |
bool AllowCpuFallback { get; set; } |
Gets or sets whether to allow fallback to CPU (default: true). |
bool AllowFp16 { get; set; } |
Gets or sets whether to allow FP16 precision for faster inference (default: true). |
bool EnableModelCaching { get; set; } |
Gets or sets whether to cache compiled models (default: true). |
bool UseRelaxedFloat32 { get; set; } |
Gets or sets whether to use relaxed float32 precision (default: true). |
int MaxConcurrentExecutions { get; set; } |
Gets or sets the maximum number of concurrent executions (default: 1). |
string ModelCacheDirectory { get; set; } |
Gets or sets the model cache directory. |
Methods
| Method |
Summary |
NNAPIConfiguration ForLowPower() |
Creates a configuration for low power consumption. |
NNAPIConfiguration ForMaxPerformance() |
Creates a configuration for maximum performance. |