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