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

Commit 0092aefa authored by Michael Butler's avatar Michael Butler Committed by Automerger Merge Worker
Browse files

Merge "Rename Version::ANDROID_* to kVersionFeatureLevel* -- hal" am:...

Merge "Rename Version::ANDROID_* to kVersionFeatureLevel* -- hal" am: 8f6b82c7 am: 58b61dbc am: b79dc03c

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1896056

Change-Id: Ic56fc1a581f47382fb1829c1f9158d08731a4423
parents 22c93364 b79dc03c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ nn::GeneralResult<std::vector<bool>> supportedOperationsCallback(

// Converts the results of IDevice::prepareModel* to the NN canonical format. On success, this
// function returns with a non-null nn::SharedPreparedModel with a feature level of
// nn::Version::ANDROID_OC_MR1. On failure, this function returns with the appropriate
// nn::kVersionFeatureLevel1. On failure, this function returns with the appropriate
// nn::GeneralError.
nn::GeneralResult<nn::SharedPreparedModel> prepareModelCallback(
        ErrorStatus status, const sp<IPreparedModel>& preparedModel);
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@

namespace android::hardware::neuralnetworks::V1_0::utils {

const auto kVersion = nn::Version::ANDROID_OC_MR1;
constexpr auto kVersion = nn::kVersionFeatureLevel1;

template <typename Type>
nn::Result<void> validate(const Type& halObject) {
+1 −1
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ const std::string& Device::getVersionString() const {
}

nn::Version Device::getFeatureLevel() const {
    return nn::Version::ANDROID_OC_MR1;
    return kVersion;
}

nn::DeviceType Device::getType() const {
+1 −1
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ TEST(DeviceTest, getFeatureLevel) {
    const auto featureLevel = device->getFeatureLevel();

    // verify result
    EXPECT_EQ(featureLevel, nn::Version::ANDROID_OC_MR1);
    EXPECT_EQ(featureLevel, nn::kVersionFeatureLevel1);
}

TEST(DeviceTest, getCachedData) {
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
namespace android::hardware::neuralnetworks::V1_1::utils {

constexpr auto kDefaultExecutionPreference = ExecutionPreference::FAST_SINGLE_ANSWER;
const auto kVersion = nn::Version::ANDROID_P;
constexpr auto kVersion = nn::kVersionFeatureLevel2;

template <typename Type>
nn::Result<void> validate(const Type& halObject) {
Loading