NNAPI Burst -- HAL VTS tests
FastMessageQueue is a Treble-compliant data structure that enables fast communication between two processes. The FMQ object itself is an atomic circular buffer that is optionally synchronized with a futex. However, FMQ has no notion of ownership or lifetime across processes, so it must be paired with higher-level constructs to manage the lifetime and ownership. 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. Specifically, it replaces IPreparedModel::executeSynchronously's call from the client into the service with fmq_sync<FmqRequestDatum> (an FMQ channel used to pass a serialized Request object) and it replaces the return from the service into the client with fmq_sync<FmqResultDatum> (an FMQ channel used to return serialized result status and OutputShapes information). Each channel is a unidirectional flow of information with exactly one producer and exactly one consumer. The channels are created by the NN runtime and passed to the service via IPreparedModel::configureExecutionBurst. This CL tests the Burst in both the execution path and validation path in the Vendor Test Suite (VTS) in neuralnetworks/1.*/vts/functional/. The VTS binary--VtsHalNeuralnetworksV1_2TargetTest--can be built and run as any previous version could. Bug: 119570067 Test: mma Test: VtsHalNeuralnetworksV1_2TargetTest Change-Id: I3a36484eff9565c2d028c07c099804a0289f294a
Loading
Please register or sign in to comment