Get desktop application:
View/edit binary Protocol Buffers messages
An error that occurred during benchmarking. Used with event type ERROR.
Used in:
How far benchmarking got.
Process exit code.
Signal the process received.
Handled error.
Top-level benchmarking event stored on-device. All events for a model are parsed to detect the status.
Which settings were used for benchmarking.
Type of the event.
Result of benchmark, used when type is END.
Error during benchmark, used when type is ERROR.
Start timestamps. These are used for 1. Checking whether a test was started but not completed within a given deadline. 2. Optionally, telemetry timestamps.
Which stage of benchmarking the event is for. There might be multiple events with the same type, if a benchmark is run multiple times.
Used in:
Benchmark start. A start without an end can be interpreted as a test that has crashed or hung.
Benchmarking completion. A model was successfully loaded, acceleration configured and inference run without errors. There may still be an issue with correctness of results, or with performance.
Benchmark was not completed due to an error. The error may be a handled error (e.g., failure in a delegate), or a crash.
Benchmark data has been sent for logging.
A correctness metric from a benchmark, for example KL-divergence between known-good CPU output and on-device output. These are primarily used for telemetry and monitored server-side.
Used in:
Outcome of a successfully complete benchmark run. This information is intended to both be used on-device to select best compute configuration as well as sent to server for monitoring. Used with event type END.
Used in:
Time to load model and apply acceleration. Initialization may get run multiple times to get information on variance.
Time to run inference (call Invoke()). Inference may get run multiple times to get information on variance.
Maximum memory used. Measures size of application heap (does not necessarily take into account driver-side allocation.
Whether the inference produced correct results (validation graph output 'ok' for all test inputs). Used on-device to disallow configurations that produce incorrect results (e.g., due to OpenCL driver bugs).
Metrics that were used to determine the 'ok' status.
When during benchmark execution an error occurred.
Used in:
During model loading or delegation.
During inference.
Used in:
Set to -1 to let the interpreter choose. Otherwise, must be > 0.
One possible acceleration configuration.
Which preference to use this accelerator for.
How to configure TFLite
Identifiers to use for instrumentation and telemetry.
Coral Dev Board / USB accelerator delegate settings. See https://github.com/google-coral/edgetpu/blob/master/libedgetpu/edgetpu_c.h
Used in:
The Edge Tpu device to be used. See https://github.com/google-coral/libcoral/blob/982426546dfa10128376d0c24fd8a8b161daac97/coral/tflite_utils.h#L131-L137
The desired performance level. This setting adjusts the internal clock rate to achieve different performance / power balance. Higher performance values improve speed, but increase power usage.
If true, always perform device firmware update (DFU) after reset. DFU is usually only necessary after power cycle.
The maximum bulk in queue length. Larger queue length may improve USB performance on the direction from device to host. When not specified (or zero), `usb_max_bulk_in_queue_length` will default to 32 according to the current EdgeTpu Coral implementation.
Used in:
TFLite accelerator to use.
Used in:
,The EdgeTpu in Pixel devices.
The Coral EdgeTpu Dev Board / USB accelerator.
EdgeTPU device spec.
Used in:
Execution platform for the EdgeTPU device.
Number of chips to use for the EdgeTPU device.
Paths to the EdgeTPU devices;
Chip family used by the EdgeTpu device.
EdgeTPU platform types.
Used in:
Used in:
Inactive power states between inferences.
Inactive timeout in microseconds between inferences.
Generic definitions of EdgeTPU power states.
Used in:
,Undefined power state.
TPU core is off but control cluster is on.
A non-active low-power state that has much smaller transition time to active compared to off.
Minimum power active state.
Very low performance, very low power.
Low performance, low power.
The normal performance and power. This setting usually provides the optimal perf/power trade-off for the average use-case.
Maximum performance level. Potentially higher power and thermal. This setting may not be allowed in production depending on the system.
EdgeTPU Delegate settings.
Used in:
Target inference power state for running the model.
Inactive power states between inferences.
Priority for the inference request.
Device spec for creating the EdgeTpu device.
A unique identifier of the input TfLite model.
A handled error.
Used in:
Which delegate the error comes from (or NONE, if it comes from the tflite framework).
What the tflite level error is.
What the underlying error is (e.g., NNAPI or OpenGL error).
ExecutionPreference is used to match accelerators against the preferences of the current application or usecase. Some of the values here can appear both in the compatibility list and as input, some only as input. These are separate from NNAPIExecutionPreference - the compatibility list design doesn't assume a one-to-one mapping between which usecases compatibility list entries have been developed for and what settings are used for NNAPI.
Used in:
Match any selected preference. Allowlist (semantically - value is same as on input).
Match low latency preference. Both compatibility list and input.
Math low power preference. Both compatibility list and input.
Never accelerate. Can be used for input to compatibility list or for standalone Acceleration configuration.
Whether to automatically fallback to TFLite CPU path on delegation errors. Typically fallback is enabled in production use but disabled in tests and benchmarks to ensure they test the intended path.
Used in:
,Whether to allow automatically falling back to TfLite CPU path on compilation failure. Default is not allowing automatic fallback. This is useful in naive production usecases where the caller would prefer for the model to run even if it's not accelerated. More advanced users will implement fallback themselves; e.g., by using a different model on CPU. Note that compilation errors may occur either at initial ModifyGraphWithDelegate() time, or when calling AllocateTensors() after resizing.
Whether to allow automatically falling back to TfLite CPU path on execution error. Default is not allowing automatic fallback. Experimental, use with care (only when you have complete control over the client code). The caveat above for compilation error holds. Additionally, execution-time errors are harder to handle automatically as they require invalidating the TfLite interpreter which most client code has not been designed to deal with.
Which GPU backend to select. Default behaviour on Android is to try OpenCL and if it's not available fall back to OpenGL.
Used in:
Not yet supported. VULKAN = 3; METAL = 4;
GPU Delegate settings. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/gpu/delegate.h
Used in:
TODO(b/152019007): add remaining options.
Hexagon Delegate settings. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/hexagon/hexagon_delegate.h
Used in:
Used in:
Undefined.
Prefer executing in a way that minimizes battery drain.
Prefer returning a single answer as fast as possible, even if this causes more power consumption.
Prefer maximizing the throughput of successive frames, for example when processing successive frames coming from the camera.
Used in:
NNAPI delegate settings.
Used in:
Which instance (NNAPI accelerator) to use. One driver may provide several accelerators (though a driver may also hide several back-ends behind one name, at the choice of the driver vendor). Note that driver introspection is only available in Android Q and later.
NNAPI model compilation caching settings to be passed to tflite::StatefulNnApiDelegate
NNAPI execution preference to pass. See https://developer.android.com/ndk/reference/group/neural-networks.html
Number of instances to cache for the same model (for input size changes). This is mandatory for getting reasonable performance in that case.
Deprecated; use the fallback_settings in TFLiteSettings. Whether to automatically fall back to TFLite CPU path.
Whether to allow use of NNAPI CPU (nnapi-reference accelerator) on Android 10+ when an accelerator name is not specified. The NNAPI CPU typically performs less well than the TfLite built-in kernels; but allowing allows a model to be partially accelerated which may be a win.
Whether to allow dynamic dimension sizes without re-compilation. A tensor of with dynamic dimension must have a valid dims_signature defined. Only supported in NNAPI 1.1 and newer versions. WARNING: Setting this flag to true may result in model being rejected by accelerator. This should only be enabled if the target device supports dynamic dimensions of the model. By default this is set to false.
Whether to allow the NNAPI accelerator to optionally use lower-precision float16 (16-bit floating point) arithmetic when doing calculations on float32 (32-bit floating point).
Whether to use NNAPI Burst mode. Burst mode allows accelerators to efficiently manage resources, which would significantly reduce overhead especially if the same delegate instance is to be used for multiple inferences.
How to configure TFLite.
Used in:
,Which delegate to use.
How to configure the chosen delegate. (In principle we would like to use 'oneof', but flatc turns that into an nested anonymous table rather than a union. See https://github.com/google/flatbuffers/issues/4628).
How to configure CPU execution.
Shared delegation settings.
For configuring the EdgeTpuDelegate.
For configuring the Coral EdgeTpu Delegate.
Whether to automatically fall back to TFLite CPU path.
XNNPack Delegate settings. See https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.h
Used in: