| // Generated from if_simple_dynamic.mod.py |
| // DO NOT EDIT |
| // clang-format off |
| #include "TestHarness.h" |
| using namespace test_helper; |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true = TestModelManager::get().add("if_simple_dynamic_true", get_test_model_true()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // y_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param12 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_all_inputs_as_internal", get_test_model_true_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param13 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_all_outputs_as_internal", get_test_model_true_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_relaxed() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = true, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::UNKNOWN, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_relaxed = TestModelManager::get().add("if_simple_dynamic_true_relaxed", get_test_model_true_relaxed()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_relaxed_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = true, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // y_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param17 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::UNKNOWN, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_relaxed_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_relaxed_all_inputs_as_internal", get_test_model_true_relaxed_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_relaxed_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = true, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param18 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::UNKNOWN, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_relaxed_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_relaxed_all_outputs_as_internal", get_test_model_true_relaxed_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_float16() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_float16 = TestModelManager::get().add("if_simple_dynamic_true_float16", get_test_model_true_float16()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_float16_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // y_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // dummy10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param22 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_float16_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_float16_all_inputs_as_internal", get_test_model_true_float16_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_float16_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // dummy11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param23 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_float16_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_float16_all_outputs_as_internal", get_test_model_true_float16_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_int32() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({10}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({10}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_int32 = TestModelManager::get().add("if_simple_dynamic_true_int32", get_test_model_true_int32()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_quant8() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_quant8 = TestModelManager::get().add("if_simple_dynamic_true_quant8", get_test_model_true_quant8()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_quant8_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // y_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // dummy15 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param27 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_quant8_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_quant8_all_inputs_as_internal", get_test_model_true_quant8_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_quant8_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // dummy16 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param28 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_quant8_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_quant8_all_outputs_as_internal", get_test_model_true_quant8_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_quant8_signed() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_quant8_signed = TestModelManager::get().add("if_simple_dynamic_true_quant8_signed", get_test_model_true_quant8_signed()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_quant8_signed_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // y_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // dummy20 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param32 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_quant8_signed_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_quant8_signed_all_inputs_as_internal", get_test_model_true_quant8_signed_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_true_quant8_signed_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({true}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // z |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // dummy21 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param33 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z2 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_true_quant8_signed_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_true_quant8_signed_all_outputs_as_internal", get_test_model_true_quant8_signed_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false = TestModelManager::get().add("if_simple_dynamic_false", get_test_model_false()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // y3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy25 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param37 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_all_inputs_as_internal", get_test_model_false_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy26 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param38 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_all_outputs_as_internal", get_test_model_false_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_relaxed() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = true, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::UNKNOWN, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_relaxed = TestModelManager::get().add("if_simple_dynamic_false_relaxed", get_test_model_false_relaxed()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_relaxed_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = true, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // y3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy30 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param42 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::UNKNOWN, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_relaxed_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_relaxed_all_inputs_as_internal", get_test_model_false_relaxed_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_relaxed_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = true, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // dummy31 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param43 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::UNKNOWN, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<float>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_relaxed_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_relaxed_all_outputs_as_internal", get_test_model_false_relaxed_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_float16() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_float16 = TestModelManager::get().add("if_simple_dynamic_false_float16", get_test_model_false_float16()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_float16_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // y3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // dummy35 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param47 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_float16_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_float16_all_inputs_as_internal", get_test_model_false_float16_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_float16_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // dummy36 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({0.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param48 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({-9.0f, -8.0f, -7.0f, -6.0f, -5.0f, -4.0f, -3.0f, -2.0f, -1.0f, 0.0f, 1.0f, 2.0f}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({10.0f}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<_Float16>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_FLOAT16, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_float16_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_float16_all_outputs_as_internal", get_test_model_false_float16_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_int32() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({10}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({10}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_int32 = TestModelManager::get().add("if_simple_dynamic_false_int32", get_test_model_false_int32()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_quant8() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_quant8 = TestModelManager::get().add("if_simple_dynamic_false_quant8", get_test_model_false_quant8()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_quant8_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // y3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // dummy40 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param52 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_quant8_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_quant8_all_inputs_as_internal", get_test_model_false_quant8_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_quant8_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // dummy41 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param53 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_quant8_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_quant8_all_outputs_as_internal", get_test_model_false_quant8_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_quant8_signed() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_quant8_signed = TestModelManager::get().add("if_simple_dynamic_false_quant8_signed", get_test_model_false_quant8_signed()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_quant8_signed_all_inputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 5}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // y3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // dummy45 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param57 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }}, |
| .operations = {{ |
| .inputs = {5, 6, 7}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }, { |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }}, |
| .outputIndexes = {4} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_quant8_signed_all_inputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_quant8_signed_all_inputs_as_internal", get_test_model_false_quant8_signed_all_inputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |
| namespace generated_tests::if_simple_dynamic { |
| |
| const TestModel& get_test_model_false_quant8_signed_all_outputs_as_internal() { |
| static TestModel model = { |
| .expectFailure = false, |
| .expectedMultinomialDistributionTolerance = 0, |
| .isRelaxed = false, |
| .main = { |
| .inputIndexes = {0, 3}, |
| .operands = {{ // x1 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<bool8>({false}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::TENSOR_BOOL8, |
| .zeroPoint = 0 |
| }, { // param10 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // param11 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<uint32_t>({1}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::SUBGRAPH, |
| .zeroPoint = 0 |
| }, { // y3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // z3 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // dummy46 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({100}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param58 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z3_new |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102}), |
| .dimensions = {3, 4}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2, 3}, |
| .outputs = {4}, |
| .type = TestOperationType::IF |
| }, { |
| .inputs = {4, 5, 6}, |
| .outputs = {7}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {7} |
| }, |
| .minSupportedVersion = TestHalVersion::V1_3, |
| .referenced = {{ // param |
| .inputIndexes = {0}, |
| .operands = {{ // y4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param6 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param7 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z4 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::ADD |
| }}, |
| .outputIndexes = {3} |
| }, { // param |
| .inputIndexes = {0}, |
| .operands = {{ // y5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param8 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({110}), |
| .dimensions = {1}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }, { // param9 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int32_t>({0}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::CONSTANT_COPY, |
| .numberOfConsumers = 1, |
| .scale = 0.0f, |
| .type = TestOperandType::INT32, |
| .zeroPoint = 0 |
| }, { // z5 |
| .channelQuant = {}, |
| .data = TestBuffer::createFromVector<int8_t>({}), |
| .dimensions = {}, |
| .isIgnored = false, |
| .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, |
| .numberOfConsumers = 0, |
| .scale = 1.0f, |
| .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED, |
| .zeroPoint = 100 |
| }}, |
| .operations = {{ |
| .inputs = {0, 1, 2}, |
| .outputs = {3}, |
| .type = TestOperationType::SUB |
| }}, |
| .outputIndexes = {3} |
| }} |
| }; |
| return model; |
| } |
| |
| const auto dummy_test_model_false_quant8_signed_all_outputs_as_internal = TestModelManager::get().add("if_simple_dynamic_false_quant8_signed_all_outputs_as_internal", get_test_model_false_quant8_signed_all_outputs_as_internal()); |
| |
| } // namespace generated_tests::if_simple_dynamic |
| |