diff options
Diffstat (limited to 'tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_vts_internal/stdout.txt.expect')
-rw-r--r-- | tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_vts_internal/stdout.txt.expect | 312 |
1 files changed, 312 insertions, 0 deletions
diff --git a/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_vts_internal/stdout.txt.expect b/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_vts_internal/stdout.txt.expect new file mode 100644 index 000000000..c656504a1 --- /dev/null +++ b/tests/nnapi/nnapi_test_generator/android-q-beta/tests/P_vts_internal/stdout.txt.expect @@ -0,0 +1,312 @@ +// clang-format off +// Generated file (from: add_internal.mod.py). Do not edit +// clang-format off +// Generated file (from: add_internal.mod.py). Do not edit +// Generated from: add_internal.mod.py. +namespace add_internal { +// Generated add_internal test +#include "-" +// Generated model constructor +#include "-" +} // namespace add_internal + +// Create the model +Model createTestModel() { + const std::vector<Operand> operands = { + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_OUTPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_OUTPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::INT32, + .dimensions = {}, + .numberOfConsumers = 10, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::CONSTANT_COPY, + .location = {.poolIndex = 0, .offset = 0, .length = 4}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 0, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_OUTPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 2, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::CONSTANT_COPY, + .location = {.poolIndex = 0, .offset = 4, .length = 8}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + }, + { + .type = OperandType::TENSOR_FLOAT32, + .dimensions = {2}, + .numberOfConsumers = 1, + .scale = 0.0f, + .zeroPoint = 0, + .lifetime = OperandLifeTime::MODEL_INPUT, + .location = {.poolIndex = 0, .offset = 0, .length = 0}, + } + }; + + const std::vector<Operation> operations = { + { + .type = OperationType::ADD, + .inputs = {10, 4, 2}, + .outputs = {5}, + }, + { + .type = OperationType::ADD, + .inputs = {4, 5, 2}, + .outputs = {6}, + }, + { + .type = OperationType::ADD, + .inputs = {11, 12, 2}, + .outputs = {8}, + }, + { + .type = OperationType::ADD, + .inputs = {7, 8, 2}, + .outputs = {9}, + }, + { + .type = OperationType::ADD, + .inputs = {17, 18, 2}, + .outputs = {15}, + }, + { + .type = OperationType::ADD, + .inputs = {15, 16, 2}, + .outputs = {13}, + }, + { + .type = OperationType::ADD, + .inputs = {9, 13, 2}, + .outputs = {14}, + }, + { + .type = OperationType::ADD, + .inputs = {14, 6, 2}, + .outputs = {0}, + }, + { + .type = OperationType::ADD, + .inputs = {19, 20, 2}, + .outputs = {1}, + }, + { + .type = OperationType::ADD, + .inputs = {0, 1, 2}, + .outputs = {3}, + } + }; + + const std::vector<uint32_t> inputIndexes = {7, 10, 11, 12, 16, 17, 18, 19, 20}; + const std::vector<uint32_t> outputIndexes = {0, 1, 3}; + std::vector<uint8_t> operandValues = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63 + }; + const std::vector<hidl_memory> pools = {}; + + return { + .operands = operands, + .operations = operations, + .inputIndexes = inputIndexes, + .outputIndexes = outputIndexes, + .operandValues = operandValues, + .pools = pools, + }; +} + +bool is_ignored(int i) { + static std::set<int> ignore = {}; + return ignore.find(i) != ignore.end(); +} + +std::vector<MixedTypedExample> examples = { +// Begin of an example +{ +//Input(s) +{ // See tools/test_generator/include/TestHarness.h:MixedTyped + // int -> FLOAT32 map + {{0, {0.0f, 0.0f}}, {1, {0.0f, 0.0f}}, {2, {0.0f, 0.0f}}, {3, {0.0f, 0.0f}}, {4, {0.0f, 0.0f}}, {5, {0.0f, 0.0f}}, {6, {0.0f, 0.0f}}, {7, {0.0f, 0.0f}}, {8, {0.0f, 0.0f}}}, + // int -> INT32 map + {}, + // int -> QUANT8_ASYMM map + {} +}, +//Output(s) +{ // See tools/test_generator/include/TestHarness.h:MixedTyped + // int -> FLOAT32 map + {{0, {0.0f, 2.0f}}, {1, {0.0f, 0.0f}}, {2, {0.0f, 2.0f}}}, + // int -> INT32 map + {}, + // int -> QUANT8_ASYMM map + {} +} +}, // End of an example +}; + +TEST_F(NeuralnetworksHidlTest, add_internal) { + generated_tests::Execute(device, + add_internal::createTestModel, + add_internal::is_ignored, + add_internal::examples); +} + |