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

Commit 6eeba37f authored by Xusong Wang's avatar Xusong Wang Committed by android-build-merger
Browse files

Fix VTS ValidationTest for 1.2 ops.

am: a6b1dc7d

Change-Id: I7efa52ee109067171fe2f4401a6c2cb94ee8dd93
parents 755d4ccb a6b1dc7d
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -479,8 +479,22 @@ static void removeOperationOutputTest(const sp<IDevice>& device, const Model& mo

///////////////////////// ADD OPERATION INPUT /////////////////////////

static bool addOperationInputSkip(const Operation& operation) {
    // Skip addOperationInputTest for the following operations.
    // L2_NORMALIZATION, LOCAL_RESPONSE_NORMALIZATION, SOFTMAX can have an optional axis parameter.
    if (operation.type == OperationType::L2_NORMALIZATION ||
        operation.type == OperationType::LOCAL_RESPONSE_NORMALIZATION ||
        operation.type == OperationType::SOFTMAX) {
        return true;
    }
    return false;
}

static void addOperationInputTest(const sp<IDevice>& device, const Model& model) {
    for (size_t operation = 0; operation < model.operations.size(); ++operation) {
        if (addOperationInputSkip(model.operations[operation])) {
            continue;
        }
        const std::string message = "addOperationInputTest: operation " + std::to_string(operation);
        validate(device, message, model, [operation](Model* model) {
            uint32_t index = addOperand(model, OperandLifeTime::MODEL_INPUT);