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

Commit 9820845e authored by Przemyslaw Szczepaniak's avatar Przemyslaw Szczepaniak Committed by Gerrit Code Review
Browse files

Merge changes from topic "cp_bool8"

* changes:
  Add TENSOR_BOOL8 support to generated tests
  Add new operand type TENSOR_BOOL8
parents 565fe886 dc98cb0a
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -36,6 +36,7 @@ namespace neuralnetworks {
namespace generated_tests {
namespace generated_tests {
using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
using ::test_helper::bool8;
using ::test_helper::compare;
using ::test_helper::compare;
using ::test_helper::expectMultinomialDistributionWithinTolerance;
using ::test_helper::expectMultinomialDistributionWithinTolerance;
using ::test_helper::filter;
using ::test_helper::filter;
@@ -65,7 +66,8 @@ void copy_back(MixedTyped* dst, const std::vector<RequestArgument>& ra, char* sr
    copy_back_<uint8_t>(dst, ra, src);
    copy_back_<uint8_t>(dst, ra, src);
    copy_back_<int16_t>(dst, ra, src);
    copy_back_<int16_t>(dst, ra, src);
    copy_back_<_Float16>(dst, ra, src);
    copy_back_<_Float16>(dst, ra, src);
    static_assert(5 == std::tuple_size<MixedTyped>::value,
    copy_back_<bool8>(dst, ra, src);
    static_assert(6 == std::tuple_size<MixedTyped>::value,
                  "Number of types in MixedTyped changed, but copy_back function wasn't updated");
                  "Number of types in MixedTyped changed, but copy_back function wasn't updated");
}
}


+8 −1
Original line number Original line Diff line number Diff line
@@ -42,6 +42,13 @@ enum OperandType : @1.0::OperandType {
    TENSOR_QUANT16_SYMM = 7,
    TENSOR_QUANT16_SYMM = 7,
    /** A tensor of 16 bit floating point values. */
    /** A tensor of 16 bit floating point values. */
    TENSOR_FLOAT16 = 8,
    TENSOR_FLOAT16 = 8,
    /**
     * A tensor of 8 bit boolean values.
     *
     * Values of this operand type are either true or false. A zero value
     * represents false; any other value represents true.
     */
    TENSOR_BOOL8 = 9,
};
};


/**
/**
@@ -51,7 +58,7 @@ enum OperandType : @1.0::OperandType {
 */
 */
enum OperandTypeRange : uint32_t {
enum OperandTypeRange : uint32_t {
    OPERAND_FUNDAMENTAL_MIN = 0,
    OPERAND_FUNDAMENTAL_MIN = 0,
    OPERAND_FUNDAMENTAL_MAX = 8,
    OPERAND_FUNDAMENTAL_MAX = 9,
    OPERAND_OEM_MIN     = 10000,
    OPERAND_OEM_MIN     = 10000,
    OPERAND_OEM_MAX     = 10001,
    OPERAND_OEM_MAX     = 10001,
};
};