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

Commit 1957c684 authored by Michael Butler's avatar Michael Butler Committed by Automerger Merge Worker
Browse files

Merge "Fix NNAPI HIDL 1.3 VTS MemoryDomainExecutionTest" am: 97a7435d am:...

Merge "Fix NNAPI HIDL 1.3 VTS MemoryDomainExecutionTest" am: 97a7435d am: 3248647a am: 1a97eee5 am: e230fb1a

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

Change-Id: Ieab14397cdc4041c1c976a46c74f9f72b318d322
parents 23e81923 e230fb1a
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1158,12 +1158,15 @@ TEST_P(MemoryDomainExecutionTest, InvalidDimensions) {
    auto [buffer, token] = allocateBuffer(preparedModel, {0}, {0}, kTestOperand.dimensions);
    if (buffer == nullptr) return;

    Request::MemoryPool sharedMemory = createSharedMemoryPool(kTestOperandDataSize);
    Request::MemoryPool deviceMemory = createDeviceMemoryPool(token);
    // Use an incompatible dimension and make sure the length matches with the bad dimension.
    auto badDimensions = kTestOperand.dimensions;
    badDimensions[0] = 2;
    const uint32_t badTestOperandDataSize = kTestOperandDataSize * 2;

    Request::MemoryPool sharedMemory = createSharedMemoryPool(badTestOperandDataSize);
    Request::MemoryPool deviceMemory = createDeviceMemoryPool(token);
    RequestArgument sharedMemoryArg = {
            .location = {.poolIndex = 0, .offset = 0, .length = kTestOperandDataSize},
            .location = {.poolIndex = 0, .offset = 0, .length = badTestOperandDataSize},
            .dimensions = badDimensions};
    RequestArgument deviceMemoryArg = {.location = {.poolIndex = 1}};
    RequestArgument deviceMemoryArgWithBadDimensions = {.location = {.poolIndex = 1},