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

Commit d28d569c authored by Michael K. Sanders's avatar Michael K. Sanders Committed by android-build-merger
Browse files

Adds float16 support for RANDOM_MULTINOMIAL.

am: 41e6732a

Change-Id: I57c83709d1ea2ea9a2fd31223e62cbc043ec7126
parents e52aa140 41e6732a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -325,6 +325,7 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con
        // - ARGMIN and ARGMAX's first argument can be any of
        // TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM).
        // - CAST's argument can be any of TENSOR_(FLOAT16|FLOAT32|INT32|QUANT8_ASYMM).
        // - RANDOM_MULTINOMIAL's argument can be either TENSOR_FLOAT16 or TENSOR_FLOAT32.
        switch (operation.type) {
            case OperationType::LSH_PROJECTION: {
                if (operand == operation.inputs[1]) {
@@ -339,6 +340,11 @@ static bool mutateOperationOperandTypeSkip(size_t operand, OperandType type, con
                    return true;
                }
            } break;
            case OperationType::RANDOM_MULTINOMIAL: {
                if (type == OperandType::TENSOR_FLOAT16 || type == OperandType::TENSOR_FLOAT32) {
                    return true;
                }
            } break;
            default:
                break;
        }