Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f99bffd0 authored by Michael Butler's avatar Michael Butler
Browse files

Specify NNAPI Burst FMQ read/write requirements

This CL additionally adds missing documentation for timing
information when returning results on the resultChannel.

Bug: 133773876
Test: mma
Change-Id: I1eb1affbb4a912d5fdeab012e2be7e7005deb04d
parent 3bb5f650
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -576,6 +576,6 @@ cfa81f229b69f9011c58f48264fcb552447430fe68610eac514e811e65bc306a android.hardwar
b69a7615c508acf5c5201efd1bfa3262167874fc3594e2db5a3ff93addd8ac75 android.hardware.keymaster@4.0::IKeymasterDevice
b69a7615c508acf5c5201efd1bfa3262167874fc3594e2db5a3ff93addd8ac75 android.hardware.keymaster@4.0::IKeymasterDevice
eb2fa0c883c2185d514be0b84c179b283753ef0c1b77b45b4f359bd23bba8b75 android.hardware.neuralnetworks@1.0::IPreparedModel
eb2fa0c883c2185d514be0b84c179b283753ef0c1b77b45b4f359bd23bba8b75 android.hardware.neuralnetworks@1.0::IPreparedModel
fb382e986c10b8fbb797a8546e8f9ea6d1107bfe6f3fb7e57f6bbbf1f807a906 android.hardware.neuralnetworks@1.2::IDevice
fb382e986c10b8fbb797a8546e8f9ea6d1107bfe6f3fb7e57f6bbbf1f807a906 android.hardware.neuralnetworks@1.2::IDevice
6c5081dd131eeb7eb02efece2187cd4d7d554197800bb520c92ff874cc238fa6 android.hardware.neuralnetworks@1.2::IPreparedModel
40e71cd693de5b832325c5d8f081f2ff20a7ba2b89d401cee5b4b3eb0e241681 android.hardware.neuralnetworks@1.2::IPreparedModel
1a6e2bd289f22931c526b21916910f1d4c436b7acb9556e4243de4ce8e6cc2e4 android.hardware.soundtrigger@2.0::ISoundTriggerHwCallback
1a6e2bd289f22931c526b21916910f1d4c436b7acb9556e4243de4ce8e6cc2e4 android.hardware.soundtrigger@2.0::ISoundTriggerHwCallback
fd65298e1e09e0e3c781ab18305920d757dbe55a3b459ce17814ec5cf6dfee99 android.hardware.wifi@1.0::IWifiP2pIface
fd65298e1e09e0e3c781ab18305920d757dbe55a3b459ce17814ec5cf6dfee99 android.hardware.wifi@1.0::IWifiP2pIface
+37 −15
Original line number Original line Diff line number Diff line
@@ -157,22 +157,44 @@ interface IPreparedModel extends @1.0::IPreparedModel {
     * unless the device itself is in a bad state.
     * unless the device itself is in a bad state.
     *
     *
     * @param callback A callback object used to retrieve memory resources
     * @param callback A callback object used to retrieve memory resources
     *                 corresponding to a unique identifiers ("slots").
     *                 corresponding to unique identifiers ("slots").
     * @param requestChannel Used by the client to send a serialized Request to
     * @param requestChannel FMQ used by the client to send a serialized Request
     *                       the Burst for execution. The client must not change
     *                       to the Burst for execution. The client must not
     *                       the content of any data object referenced by the
     *                       change the content of any data object referenced by
     *                       Request (described by the {@link @1.0::DataLocation}
     *                       the Request (described by the
     *                       of an {@link OperandInformation}) until a result
     *                       {@link @1.0::DataLocation} of an
     *                       has been received from resultChannel. Execution
     *                       {@link OperandInformation}) until a result has been
     *                       must not change the content of any of the data
     *                       received from resultChannel. Execution must not
     *                       objects corresponding to Request inputs. requestChannel
     *                       change the content of any of the data objects
     *                       corresponding to Request inputs. requestChannel
     *                       must not be used to pass a second Request object
     *                       must not be used to pass a second Request object
     *                       until a result has been received from resultChannel.
     *                       until a result has been received from
     * @param resultChannel Used by the service to return the results of an
     *                       resultChannel. The client must send the request
     *                      execution to the client: the status of the execution
     *                       messages to the consumer atomically by using
     *                      and OutputShape of all output tensors. resultChannel
     *                       MessageQueue::writeBlocking if the queue is
     *                      must be used to return the results if a Request was
     *                       blocking, or by using MessageQueue::write if the
     *                      sent through the requestChannel.
     *                       queue is non-blocking. When the service receives a
     *                       packet, it must dequeue the entire packet from the
     *                       requestChannel. The client must not send a request
     *                       packet that exceeds the length of the FMQ.
     * @param resultChannel FMQ used by the service to return the results of an
     *                      execution to the client: the status of the
     *                      execution, OutputShape of all output tensors, and
     *                      timing information. resultChannel must be used to
     *                      return the results if a Request was sent through the
     *                      requestChannel. The service must send the result
     *                      messages to the consumer atomically by using
     *                      MessageQueue::writeBlocking if the queue is
     *                      blocking, or by using MessageQueue::write if the
     *                      queue is non-blocking. When the client receives a
     *                      packet, it must dequeue the entire packet from the
     *                      resultChannel. If the packet's length exceeds the
     *                      size of the FMQ, the service must not send this
     *                      result packet; instead, the service must send a
     *                      packet consisting of the error code
     *                      ErrorStatus::GENERAL_FAILURE, no information for the
     *                      outputShapes, and an indication that timing
     *                      information is unavailable.
     * @return status Error status of configuring the execution burst, must be:
     * @return status Error status of configuring the execution burst, must be:
     *                - NONE if the burst is successfully configured
     *                - NONE if the burst is successfully configured
     *                - DEVICE_UNAVAILABLE if driver is offline or busy
     *                - DEVICE_UNAVAILABLE if driver is offline or busy