diff options
Diffstat (limited to 'neuralnetworks/1.3/vts/functional/MemoryDomainTests.cpp')
-rw-r--r-- | neuralnetworks/1.3/vts/functional/MemoryDomainTests.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/neuralnetworks/1.3/vts/functional/MemoryDomainTests.cpp b/neuralnetworks/1.3/vts/functional/MemoryDomainTests.cpp index e2fa6e4d42..af3641a2fe 100644 --- a/neuralnetworks/1.3/vts/functional/MemoryDomainTests.cpp +++ b/neuralnetworks/1.3/vts/functional/MemoryDomainTests.cpp @@ -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}, |