The Deadline test was directly loading into the field of a std::optional
instead of emplacing, which is undefined behavior. This has been
corrected to emplace.
Additionally, previously the deadline test always checked the tensor
results of the execution. This is changed to only check the results
when the driver reports that the execution completed successfully.
Finally, this CL merges similar switch case statements.
Bug: 149766387
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I1068fe70e74a12006dea3cdf4ae9da50004ad24b
Merged-In: I1068fe70e74a12006dea3cdf4ae9da50004ad24b
(cherry picked from commit c7327c57f9)
Prior to this CL, the NNAPI QoS deadline is a strict deadline: a task
with a deadline must either complete or abort by the deadline. To
avoid as much overhead as possible, it is requested for Android R to
have a relaxed deadline, where the task *may* be aborted after the
deadline has passed or when the task is estimated to take too long.
Because the deadline is now relaxed, the querying method
IDevice::supportsDeadlines can be removed.
Bug: 149766387
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: Ib9937b5bb95646c2fd82e1aa17f2b0b639e2c420
Merged-In: Ib9937b5bb95646c2fd82e1aa17f2b0b639e2c420
(cherry picked from commit 9b9a804fe4)
This CL makes the following three interface changes:
* Removes @1.3::Operand.ExtraParams, because it was the same as
@1.2::Operand.ExtraParams
* Changes int32_t token to uint32_t for IDevice::allocate and for
@1.3::Request.MemoryPool
* Renames OptionalTimePoint::nanoseconds to
OptionalTimePoint::nanosecondsSinceEpoch
This CL also makes test changes in response to the interface changes,
and fixes a minor comment issue in @1.2::types.hal and @1.3::types.hal.
Bug: 148617339
Test: mma
Test: VtsHalNeuralnetworksV1_3TargetTest
Change-Id: I95b49ab34b0b79f587dda035ede700b73dc44a38
Merged-In: I95b49ab34b0b79f587dda035ede700b73dc44a38
(cherry picked from commit 6a4172cd3d)