// Generated from tanh.mod.py // DO NOT EDIT // clang-format off #include "TestHarness.h" using namespace test_helper; namespace generated_tests::tanh { const TestModel& get_test_model() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // op1 .channelQuant = {}, .data = TestBuffer::createFromVector({-1.0f, 0.0f, 1.0f, 10.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({-0.761594156f, 0.0f, 0.761594156f, 0.999999996f}), .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}, .outputs = {1}, .type = TestOperationType::TANH }}, .outputIndexes = {1} }, .minSupportedVersion = TestHalVersion::V1_0, .referenced = {} }; return model; } const auto dummy_test_model = TestModelManager::get().add("tanh", get_test_model()); } // namespace generated_tests::tanh namespace generated_tests::tanh { const TestModel& get_test_model_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {2}, .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({-0.761594156f, 0.0f, 0.761594156f, 0.999999996f}), .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({-1.0f, 0.0f, 1.0f, 10.0f}), .dimensions = {1, 2, 2, 1}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder .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 }}, .operations = {{ .inputs = {2, 3, 4}, .outputs = {0}, .type = TestOperationType::ADD }, { .inputs = {0}, .outputs = {1}, .type = TestOperationType::TANH }}, .outputIndexes = {1} }, .minSupportedVersion = TestHalVersion::V1_0, .referenced = {} }; return model; } const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("tanh_all_inputs_as_internal", get_test_model_all_inputs_as_internal()); } // namespace generated_tests::tanh