| // Generated from sub_quantized_different_scales.mod.py |
| // DO NOT EDIT |
| // clang-format off |
| #include "GeneratedTests.h" |
| |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| 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(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_2() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_2(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_2() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_2(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_2() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_2(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_2() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_2(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_3() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_3(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_3() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_3(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_3() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_3(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_3() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_3(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_4() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_4(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_4() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_4(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_4() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_4(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_4() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_4(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_5() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_5(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_5() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_5(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_5() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_5(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_5() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_5(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_6() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_6(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_6() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_6(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_6() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_6(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_6() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_6(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_7() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_7(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_7() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_7(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_7() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_7(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_7() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_7(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_8() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_8(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_8() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_8(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_8() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_8(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_8() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_8(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_9() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_9(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_9() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_9(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_9() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_9(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_9() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_9(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_10() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_10(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_10() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_10(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_10() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_10(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_10() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_10(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_11() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_11(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_11() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_11(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_11() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_11(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_11() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_11(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_12() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_12(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_12() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_12(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_12() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_12(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_12() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_12(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_13() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_13(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_13() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_13(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_13() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_13(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_13() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_13(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_14() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_14(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_14() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_14(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_14() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_14(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_14() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_14(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_15() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_15(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_15() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_15(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_15() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_15(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_15() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_15(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_16() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_16(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_16() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_16(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_16() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_16(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_16() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_16(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_17() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_17(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_17() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_17(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_17() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_17(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_17() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_17(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_18() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_18(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_18() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_18(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_18() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_18(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_18() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_18(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_19() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_19(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_19() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_19(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_19() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_19(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_19() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_19(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_20() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_20(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_20() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_20(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_20() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_20(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_20() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_20(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_21() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_21(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_21() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_21(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_21() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_21(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_21() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_21(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_22() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_22(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_22() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_22(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_22() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_22(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_22() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_22(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_23() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_23(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_23() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_23(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_23() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_23(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_23() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_23(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_24() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_24(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_24() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_24(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_24() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_24(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_24() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_24(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_25() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_25(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_25() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_25(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_25() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_25(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_25() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_25(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_26() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_26(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_26() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_26(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_26() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_26(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_26() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_26(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_27() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_27(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_27() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_27(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_27() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_27(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_27() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_27(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_28() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_28(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_28() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_28(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_28() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_28(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_28() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_28(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_29() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_29(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_29() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_29(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_29() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_29(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_29() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_29(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_30() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_30(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_30() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_30(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_30() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_30(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_30() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_30(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_31() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_31(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_31() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_31(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_31() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_31(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_31() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_31(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_32() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_32(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_32() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_32(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_32() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_32(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_32() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 1, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_32(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_33() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_33(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_33() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_33(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_33() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_33(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_33() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_33(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_34() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_34(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_34() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_34(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_34() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_34(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_34() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_34(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_35() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_35(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_35() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_35(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_35() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_35(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_35() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_35(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_36() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_36(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_36() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_36(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_36() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_36(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_36() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_36(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_37() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_37(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_37() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_37(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_37() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_37(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_37() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_37(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_38() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_38(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_38() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_38(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_38() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_38(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_38() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_38(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_39() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_39(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_39() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_39(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_39() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_39(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_39() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_39(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_40() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_40(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_40() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_40(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_40() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_40(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_40() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_40(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_41() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_41(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_41() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_41(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_41() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_41(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_41() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_41(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_42() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_42(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_42() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_42(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_42() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_42(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_42() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_42(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_43() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_43(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_43() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_43(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_43() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_43(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_43() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_43(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_44() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_44(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_44() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_44(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_44() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_44(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_44() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_44(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_45() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_45(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_45() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_45(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_45() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_45(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_45() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_45(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_46() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_46(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_46() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_46(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_46() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_46(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_46() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_46(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_47() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_47(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_47() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_47(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_47() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_47(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_47() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_47(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_48() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_48(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_48() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_48(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_48() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_48(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_48() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_48(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_49() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_49(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_49() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_49(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_49() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_49(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_49() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_49(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_50() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_50(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_50() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_50(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_50() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_50(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_50() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_50(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_51() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_51(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_51() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_51(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_51() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_51(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_51() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_51(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_52() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_52(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_52() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_52(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_52() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_52(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_52() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_52(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_53() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_53(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_53() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_53(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_53() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_53(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_53() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_53(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_54() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_54(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_54() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_54(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_54() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_54(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_54() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_54(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_55() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_55(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_55() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_55(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_55() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_55(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_55() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_55(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_56() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_56(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_56() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_56(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_56() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_56(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_56() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 1, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_56(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_57() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_57(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_57() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_57(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_57() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_57(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_57() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_57(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_58() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_58(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_58() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_58(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_58() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_58(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_58() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_58(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_59() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_59(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_59() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_59(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_59() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_59(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_59() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_59(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_60() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_60(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_60() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_60(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_60() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_60(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_60() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_60(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_61() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_61(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_61() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_61(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_61() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_61(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_61() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_61(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_62() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_62(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_62() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_62(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_62() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_62(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_62() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .zeroPoint = 1, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_62(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_63() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_63(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_63() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_63(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_63() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_63(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_63() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 0.01f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_63(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_64() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_64(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_dynamic_output_shape_64() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {0, 1}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_dynamic_output_shape_64(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_64() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_64(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |
| namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales { |
| |
| Model createTestModel_all_inputs_as_internal_dynamic_output_shape_64() { |
| const std::vector<Operand> operands = { |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::TEMPORARY_VARIABLE, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 0, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {0}, |
| .numberOfConsumers = 0, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_OUTPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 4, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 5, .length = 4}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {144}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::MODEL_INPUT, |
| .location = {.poolIndex = 0, .offset = 0, .length = 0}, |
| }, |
| { |
| .type = OperandType::TENSOR_QUANT8_ASYMM, |
| .dimensions = {1}, |
| .numberOfConsumers = 1, |
| .scale = 10.0f, |
| .zeroPoint = 120, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 9, .length = 1}, |
| }, |
| { |
| .type = OperandType::INT32, |
| .dimensions = {}, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .zeroPoint = 0, |
| .lifetime = OperandLifeTime::CONSTANT_COPY, |
| .location = {.poolIndex = 0, .offset = 10, .length = 4}, |
| } |
| }; |
| |
| const std::vector<Operation> operations = { |
| { |
| .type = OperationType::ADD, |
| .inputs = {4, 5, 6}, |
| .outputs = {0}, |
| }, |
| { |
| .type = OperationType::ADD, |
| .inputs = {7, 8, 9}, |
| .outputs = {1}, |
| }, |
| { |
| .type = OperationType::SUB, |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| } |
| }; |
| |
| const std::vector<uint32_t> inputIndexes = {4, 7}; |
| const std::vector<uint32_t> outputIndexes = {3}; |
| std::vector<uint8_t> operandValues = { |
| 0, 0, 0, 0, 120, 0, 0, 0, 0, 120, 0, 0, 0, 0 |
| }; |
| const std::vector<hidl_memory> pools = {}; |
| |
| return { |
| .operands = operands, |
| .operations = operations, |
| .inputIndexes = inputIndexes, |
| .outputIndexes = outputIndexes, |
| .operandValues = operandValues, |
| .pools = pools, |
| }; |
| } |
| |
| bool is_ignored_all_inputs_as_internal_dynamic_output_shape_64(int i) { |
| static std::set<int> ignore = {}; |
| return ignore.find(i) != ignore.end(); |
| } |
| |
| } // namespace android::hardware::neuralnetworks::V1_2::generated_tests::sub_quantized_different_scales |