1 // Generated from tanh.mod.py
2 // DO NOT EDIT
3 // clang-format off
4 #include "TestHarness.h"
5 using namespace test_helper;  // NOLINT(google-build-using-namespace)
6 
7 namespace generated_tests::tanh {
8 
get_test_model()9 const TestModel& get_test_model() {
10     static TestModel model = {
11         .main = {
12                 .operands = {{ // op1
13                             .type = TestOperandType::TENSOR_FLOAT32,
14                             .dimensions = {1, 2, 2, 1},
15                             .numberOfConsumers = 1,
16                             .scale = 0.0f,
17                             .zeroPoint = 0,
18                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
19                             .channelQuant = {},
20                             .isIgnored = false,
21                             .data = TestBuffer::createFromVector<float>({-1.0f, 0.0f, 1.0f, 10.0f})
22                         }, { // op2
23                             .type = TestOperandType::TENSOR_FLOAT32,
24                             .dimensions = {1, 2, 2, 1},
25                             .numberOfConsumers = 0,
26                             .scale = 0.0f,
27                             .zeroPoint = 0,
28                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
29                             .channelQuant = {},
30                             .isIgnored = false,
31                             .data = TestBuffer::createFromVector<float>({-0.761594156f, 0.0f, 0.761594156f, 0.999999996f})
32                         }},
33                 .operations = {{
34                             .type = TestOperationType::TANH,
35                             .inputs = {0},
36                             .outputs = {1}
37                         }},
38                 .inputIndexes = {0},
39                 .outputIndexes = {1}
40             },
41         .referenced = {},
42         .isRelaxed = false,
43         .expectedMultinomialDistributionTolerance = 0,
44         .expectFailure = false,
45         .minSupportedVersion = TestHalVersion::V1_0
46     };
47     return model;
48 }
49 
50 const auto dummy_test_model = TestModelManager::get().add("tanh", get_test_model());
51 
52 }  // namespace generated_tests::tanh
53 
54 namespace generated_tests::tanh {
55 
get_test_model_all_inputs_as_internal()56 const TestModel& get_test_model_all_inputs_as_internal() {
57     static TestModel model = {
58         .main = {
59                 .operands = {{ // op1
60                             .type = TestOperandType::TENSOR_FLOAT32,
61                             .dimensions = {1, 2, 2, 1},
62                             .numberOfConsumers = 1,
63                             .scale = 0.0f,
64                             .zeroPoint = 0,
65                             .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
66                             .channelQuant = {},
67                             .isIgnored = false,
68                             .data = TestBuffer::createFromVector<float>({})
69                         }, { // op2
70                             .type = TestOperandType::TENSOR_FLOAT32,
71                             .dimensions = {1, 2, 2, 1},
72                             .numberOfConsumers = 0,
73                             .scale = 0.0f,
74                             .zeroPoint = 0,
75                             .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
76                             .channelQuant = {},
77                             .isIgnored = false,
78                             .data = TestBuffer::createFromVector<float>({-0.761594156f, 0.0f, 0.761594156f, 0.999999996f})
79                         }, { // op1_new
80                             .type = TestOperandType::TENSOR_FLOAT32,
81                             .dimensions = {1, 2, 2, 1},
82                             .numberOfConsumers = 1,
83                             .scale = 0.0f,
84                             .zeroPoint = 0,
85                             .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
86                             .channelQuant = {},
87                             .isIgnored = false,
88                             .data = TestBuffer::createFromVector<float>({-1.0f, 0.0f, 1.0f, 10.0f})
89                         }, { // placeholder
90                             .type = TestOperandType::TENSOR_FLOAT32,
91                             .dimensions = {1},
92                             .numberOfConsumers = 1,
93                             .scale = 0.0f,
94                             .zeroPoint = 0,
95                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
96                             .channelQuant = {},
97                             .isIgnored = false,
98                             .data = TestBuffer::createFromVector<float>({0.0f})
99                         }, { // param
100                             .type = TestOperandType::INT32,
101                             .dimensions = {},
102                             .numberOfConsumers = 1,
103                             .scale = 0.0f,
104                             .zeroPoint = 0,
105                             .lifetime = TestOperandLifeTime::CONSTANT_COPY,
106                             .channelQuant = {},
107                             .isIgnored = false,
108                             .data = TestBuffer::createFromVector<int32_t>({0})
109                         }},
110                 .operations = {{
111                             .type = TestOperationType::ADD,
112                             .inputs = {2, 3, 4},
113                             .outputs = {0}
114                         }, {
115                             .type = TestOperationType::TANH,
116                             .inputs = {0},
117                             .outputs = {1}
118                         }},
119                 .inputIndexes = {2},
120                 .outputIndexes = {1}
121             },
122         .referenced = {},
123         .isRelaxed = false,
124         .expectedMultinomialDistributionTolerance = 0,
125         .expectFailure = false,
126         .minSupportedVersion = TestHalVersion::V1_0
127     };
128     return model;
129 }
130 
131 const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("tanh_all_inputs_as_internal", get_test_model_all_inputs_as_internal());
132 
133 }  // namespace generated_tests::tanh
134 
135