NNAPI Burst -- runtime utility
The NNAPI is introducing the notion of an "Execution Burst" object (or
more simply a "Burst" object), which is similar to an
ANeuralNetworksExecution, but is intended to be reused across multiple
executions and has lower IPC overheads. It achieves this low IPC
overhead by replacing HIDL HwBinder calls with FMQ messages.
The Burst utility objects are exposed in two flavors:
1) A Controller object which is able to launch an execution and later
get the result. This will be used by the NN runtime, and is currently
used in the native tests in a sibling CL.
2) An automated Server object which--when created with a reference to an
IPreparedModel--will automatically receive a request to execute, call
the model's synchronous execution method, and forward the result to
an output channel.
To incorporate these changes, the service must implement
IPreparedModel::configureExecutionBurst. SampleDriver.cpp contains a
functional reference implementation.
Bug: 119570067
Test: mma
Test: VtsHalNeuralNetworksV1_2TargetTest
Change-Id: Ic7082f94c9a20f674c863af68ef106ba60f27d7f
8 files changed