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

Commit 6638b4f5 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-edd71ba9-6f93-47be-957d-774c9d43a2dc-for-git_oc-mr1-release-42...

release-request-edd71ba9-6f93-47be-957d-774c9d43a2dc-for-git_oc-mr1-release-4281935 snap-temp-L68100000094184972

Change-Id: Ia096e69191f258cb4a3c7d9102c3bfebe306c6a4
parents bd6dff40 5a9c0c31
Loading
Loading
Loading
Loading
+9 −20
Original line number Diff line number Diff line
@@ -16,29 +16,18 @@

cc_test {
    name: "VtsHalAudioV2_0TargetTest",
    defaults: ["hidl_defaults"],
    srcs: ["AudioPrimaryHidlHalTest.cpp",
           "ValidateAudioConfiguration.cpp"],
    shared_libs: [
        "libbase",
        "liblog",
        "libhidlbase",
        "libhidltransport",
        "libutils",
        "libcutils",
        "libxml2",
        "android.hardware.audio@2.0",
        "android.hardware.audio.common@2.0",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "AudioPrimaryHidlHalTest.cpp",
        "ValidateAudioConfiguration.cpp"
    ],
    static_libs: [
        "VtsHalHidlTargetTestBase",
        "android.hardware.audio.common.test.utility",
        "android.hardware.audio@2.0",
        "android.hardware.audio.common@2.0",
        "libxml2",
    ],
    cflags: [
        "-O0",
        "-g",
        "-Wall",
        "-Wextra",
        "-Werror",
    shared_libs: [
        "libicuuc",
    ],
}
+10 −20
Original line number Diff line number Diff line
@@ -16,30 +16,20 @@

cc_test {
    name: "VtsHalAudioEffectV2_0TargetTest",
    defaults: ["hidl_defaults"],
    srcs: ["VtsHalAudioEffectV2_0TargetTest.cpp",
           "ValidateAudioEffectsConfiguration.cpp"],
    shared_libs: [
        "libbase",
        "liblog",
        "libcutils",
        "libhidlbase",
        "libhidltransport",
        "libnativehelper",
        "libutils",
        "libxml2",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "VtsHalAudioEffectV2_0TargetTest.cpp",
        "ValidateAudioEffectsConfiguration.cpp"
    ],
    static_libs: [
        "android.hardware.audio.common.test.utility",
        "android.hardware.audio.common@2.0",
        "android.hardware.audio.effect@2.0",
        "android.hidl.allocator@1.0",
        "android.hidl.memory@1.0",
        "libxml2",
    ],
    static_libs: [
        "VtsHalHidlTargetTestBase",
        "android.hardware.audio.common.test.utility",
    ],
    cflags: [
        "-O0",
        "-g",
        "-Wextra",
    shared_libs: [
        "libicuuc",
    ],
}
+9 −3
Original line number Diff line number Diff line
@@ -76,10 +76,13 @@ using std::vector;
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())

static const uint8_t kClearKeyUUID[16] = {
    0x10, 0x77, 0xEF, 0xEC, 0xC0, 0xB2, 0x4D, 0x02,
static const uint8_t kCommonPsshBoxUUID[16] = {0x10, 0x77, 0xEF, 0xEC, 0xC0, 0xB2, 0x4D, 0x02,
                                               0xAC, 0xE3, 0x3C, 0x1E, 0x52, 0xE2, 0xFB, 0x4B};

// To be used in mpd to specify drm scheme for players
static const uint8_t kClearKeyUUID[16] = {0xE2, 0x71, 0x9D, 0x58, 0xA9, 0x85, 0xB3, 0xC9,
                                          0x78, 0x1A, 0xB0, 0x30, 0xAF, 0x78, 0xD3, 0x0E};

static const uint8_t kInvalidUUID[16] = {
    0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80,
    0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80};
@@ -111,6 +114,9 @@ class DrmHalClearkeyFactoryTest : public ::testing::VtsHalHidlTargetTestBase {
 * Ensure the factory supports the clearkey scheme UUID
 */
TEST_F(DrmHalClearkeyFactoryTest, ClearKeyPluginSupported) {
    EXPECT_TRUE(drmFactory->isCryptoSchemeSupported(kCommonPsshBoxUUID));
    EXPECT_TRUE(cryptoFactory->isCryptoSchemeSupported(kCommonPsshBoxUUID));

    EXPECT_TRUE(drmFactory->isCryptoSchemeSupported(kClearKeyUUID));
    EXPECT_TRUE(cryptoFactory->isCryptoSchemeSupported(kClearKeyUUID));
}
+44 −37
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ enum OperandType : uint32_t {
    UINT32                    = 7,
    TENSOR_FLOAT16            = 8,
    TENSOR_FLOAT32            = 9,
    TENSOR_SYMMETRICAL_QUANT8 = 10,
    TENSOR_QUANT8_ASYMM       = 10,
};

// The type of operations.  Unlike the operation types found in
@@ -41,39 +41,39 @@ enum OperandType : uint32_t {
// TODO: Currently they are the same.  Add a conversion when finalizing the model.
// When modifying, be sure to update HAL_NUM_OPERATION_TYPES in HalIntefaces.h.
enum OperationType : uint32_t {
    AVERAGE_POOL_FLOAT32                 = 0,
    CONCATENATION_FLOAT32                = 1,
    CONV_FLOAT32                         = 2,
    DEPTHWISE_CONV_FLOAT32               = 3,
    MAX_POOL_FLOAT32                     = 4,
    L2_POOL_FLOAT32                      = 5,
    DEPTH_TO_SPACE_FLOAT32               = 6,
    SPACE_TO_DEPTH_FLOAT32               = 7,
    LOCAL_RESPONSE_NORMALIZATION_FLOAT32 = 8,
    SOFTMAX_FLOAT32                      = 9,
    RESHAPE_FLOAT32                      = 10,
    SPLIT_FLOAT32                        = 11,
    FAKE_QUANT_FLOAT32                   = 12,
    ADD_FLOAT32                          = 13,
    FULLY_CONNECTED_FLOAT32              = 14,
    CAST_FLOAT32                         = 15,
    MUL_FLOAT32                          = 16,
    L2_NORMALIZATION_FLOAT32             = 17,
    LOGISTIC_FLOAT32                     = 18,
    RELU_FLOAT32                         = 19,
    RELU6_FLOAT32                        = 20,
    RELU1_FLOAT32                        = 21,
    TANH_FLOAT32                         = 22,
    DEQUANTIZE_FLOAT32                   = 23,
    FLOOR_FLOAT32                        = 24,
    GATHER_FLOAT32                       = 25,
    RESIZE_BILINEAR_FLOAT32              = 26,
    LSH_PROJECTION_FLOAT32               = 27,
    LSTM_FLOAT32                         = 28,
    SVDF_FLOAT32                         = 29,
    RNN_FLOAT32                          = 30,
    N_GRAM_FLOAT32                       = 31,
    LOOKUP_FLOAT32                       = 32,
    AVERAGE_POOL                 = 0,
    CONCATENATION                = 1,
    CONV                         = 2,
    DEPTHWISE_CONV               = 3,
    MAX_POOL                     = 4,
    L2_POOL                      = 5,
    DEPTH_TO_SPACE               = 6,
    SPACE_TO_DEPTH               = 7,
    LOCAL_RESPONSE_NORMALIZATION = 8,
    SOFTMAX                      = 9,
    RESHAPE                      = 10,
    SPLIT                        = 11,
    FAKE_QUANT                   = 12,
    ADD                          = 13,
    FULLY_CONNECTED              = 14,
    CAST                         = 15,
    MUL                          = 16,
    L2_NORMALIZATION             = 17,
    LOGISTIC                     = 18,
    RELU                         = 19,
    RELU6                        = 20,
    RELU1                        = 21,
    TANH                         = 22,
    DEQUANTIZE                   = 23,
    FLOOR                        = 24,
    GATHER                       = 25,
    RESIZE_BILINEAR              = 26,
    LSH_PROJECTION               = 27,
    LSTM                         = 28,
    SVDF                         = 29,
    RNN                          = 30,
    N_GRAM                       = 31,
    LOOKUP                       = 32,
};

// Two special values that can be used instead of a regular poolIndex.
@@ -102,9 +102,16 @@ struct PerformanceInfo {
    float powerUsage;  // in picoJoules
};

struct OperationTuple {
    // The type of operation.
    OperationType operationType;
    // The input data type of operation.
    OperandType operandType;
};

// The capabilities of a driver.
struct Capabilities {
    vec<OperationType> supportedOperationTypes;
    vec<OperationTuple> supportedOperationTuples;
    // TODO Do the same for baseline model IDs
    bool cachesCompilation;
    // TODO revisit the data types and scales.
@@ -142,8 +149,8 @@ struct Operand {

// Describes one operation of the graph.
struct Operation {
    // The type of operation.
    OperationType type;
    // The tuple describing the operation type and input type.
    OperationTuple opTuple;
    // Describes the table that contains the indexes of the inputs of the
    // operation. The offset is the index in the operandIndexes table.
    vec<uint32_t> inputs;
+8 −6
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@ TEST_F(NeuralnetworksHidlTest, StatusTest) {
// initialization
TEST_F(NeuralnetworksHidlTest, InitializeTest) {
    Return<void> ret = device->initialize([](const Capabilities& capabilities) {
        EXPECT_NE(nullptr, capabilities.supportedOperationTypes.data());
        EXPECT_NE(0ull, capabilities.supportedOperationTypes.size());
        EXPECT_NE(nullptr, capabilities.supportedOperationTuples.data());
        EXPECT_NE(0ull, capabilities.supportedOperationTuples.size());
        EXPECT_EQ(0u, static_cast<uint32_t>(capabilities.cachesCompilation) & ~0x1);
        EXPECT_LT(0.0f, capabilities.bootupTime);
        EXPECT_LT(0.0f, capabilities.float16Performance.execTime);
@@ -92,7 +92,7 @@ Model createTestModel() {

    const std::vector<Operand> operands = {
        {
            .type = OperandType::FLOAT32,
            .type = OperandType::TENSOR_FLOAT32,
            .dimensions = {1, 2, 2, 1},
            .numberOfConsumers = 1,
            .scale = 0.0f,
@@ -102,7 +102,7 @@ Model createTestModel() {
                         .length = 0},
        },
        {
            .type = OperandType::FLOAT32,
            .type = OperandType::TENSOR_FLOAT32,
            .dimensions = {1, 2, 2, 1},
            .numberOfConsumers = 1,
            .scale = 0.0f,
@@ -112,7 +112,7 @@ Model createTestModel() {
                         .length = size},
        },
        {
            .type = OperandType::FLOAT32,
            .type = OperandType::TENSOR_FLOAT32,
            .dimensions = {1, 2, 2, 1},
            .numberOfConsumers = 0,
            .scale = 0.0f,
@@ -124,7 +124,9 @@ Model createTestModel() {
    };

    const std::vector<Operation> operations = {{
        .type = OperationType::ADD_FLOAT32, .inputs = {operand1, operand2}, .outputs = {operand3},
        .opTuple = {OperationType::ADD, OperandType::TENSOR_FLOAT32},
        .inputs = {operand1, operand2},
        .outputs = {operand3},
    }};

    const std::vector<uint32_t> inputIndexes = {operand1};