// Generated from sub.mod.py // DO NOT EDIT // clang-format off #include "TestHarness.h" using namespace test_helper; namespace generated_tests::sub { const TestModel& get_test_model() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0, 1}, .operands = {{ // op1 .channelQuant = {}, .data = TestBuffer::createFromVector({2.0f, -4.0f, 8.0f, -16.0f}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // op2 .channelQuant = {}, .data = TestBuffer::createFromVector({2.0f, -2.0f, -4.0f, 4.0f}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // act .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // op3 .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, -2.0f, 12.0f, -20.0f}), .dimensions = {1, 2, 2, 1}, .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} }, .minSupportedVersion = TestHalVersion::V1_1, .referenced = {} }; return model; } const auto dummy_test_model = TestModelManager::get().add("sub", get_test_model()); } // namespace generated_tests::sub namespace generated_tests::sub { const TestModel& get_test_model_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {4, 7}, .operands = {{ // op1 .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // op2 .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // act .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // op3 .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, -2.0f, 12.0f, -20.0f}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // op1_new .channelQuant = {}, .data = TestBuffer::createFromVector({2.0f, -4.0f, 8.0f, -16.0f}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // dummy .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // param .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // op2_new .channelQuant = {}, .data = TestBuffer::createFromVector({2.0f, -2.0f, -4.0f, 4.0f}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // dummy1 .channelQuant = {}, .data = TestBuffer::createFromVector({0.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({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }}, .operations = {{ .inputs = {4, 5, 6}, .outputs = {0}, .type = TestOperationType::ADD }, { .inputs = {7, 8, 9}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1, 2}, .outputs = {3}, .type = TestOperationType::SUB }}, .outputIndexes = {3} }, .minSupportedVersion = TestHalVersion::V1_1, .referenced = {} }; return model; } const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("sub_all_inputs_as_internal", get_test_model_all_inputs_as_internal()); } // namespace generated_tests::sub