mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "Migrate NNAPI to canonical types"
This commit is contained in:
committed by
Android (Google) Code Review
commit
5efe702d3b
@@ -644,7 +644,7 @@ void EvaluatePreparedModel(const sp<IDevice>& device, const sp<IPreparedModel>&
|
||||
int n;
|
||||
std::tie(n, outputShapes, timing, std::ignore) =
|
||||
controller->compute(request10, testConfig.measureTiming, keys);
|
||||
executionStatus = nn::convertResultCodeToErrorStatus(n);
|
||||
executionStatus = nn::convertToV1_3(nn::convertResultCodeToErrorStatus(n));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,16 @@
|
||||
*/
|
||||
|
||||
#include <android/hardware/neuralnetworks/1.3/types.h>
|
||||
#include "ControlFlow.h"
|
||||
#include "TestHarness.h"
|
||||
|
||||
namespace android::hardware::neuralnetworks::V1_3 {
|
||||
|
||||
static_assert(static_cast<uint64_t>(LoopTimeoutDurationNs::DEFAULT) ==
|
||||
nn::operation_while::kTimeoutNsDefault);
|
||||
static_assert(static_cast<uint64_t>(LoopTimeoutDurationNs::MAXIMUM) ==
|
||||
nn::operation_while::kTimeoutNsMaximum);
|
||||
|
||||
// Make sure that the HIDL enums are compatible with the values defined in
|
||||
// frameworks/ml/nn/tools/test_generator/test_harness/include/TestHarness.h.
|
||||
using namespace test_helper;
|
||||
|
||||
@@ -116,7 +116,7 @@ static void validate(const sp<IPreparedModel>& preparedModel, const std::string&
|
||||
|
||||
// execute and verify
|
||||
const auto [n, outputShapes, timing, fallback] = burst->compute(request10, measure, keys);
|
||||
const ErrorStatus status = nn::convertResultCodeToErrorStatus(n);
|
||||
const ErrorStatus status = nn::convertToV1_3(nn::convertResultCodeToErrorStatus(n));
|
||||
EXPECT_EQ(ErrorStatus::INVALID_ARGUMENT, status);
|
||||
EXPECT_EQ(outputShapes.size(), 0);
|
||||
EXPECT_TRUE(badTiming(timing));
|
||||
|
||||
Reference in New Issue
Block a user