summaryrefslogtreecommitdiff
path: root/nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp')
-rw-r--r--nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp168
1 files changed, 168 insertions, 0 deletions
diff --git a/nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp b/nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp
index af3947875..c11386637 100644
--- a/nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp
+++ b/nn/runtime/test/generated/spec_V1_1/mean_float_2.example.cpp
@@ -172,3 +172,171 @@ const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add
} // namespace generated_tests::mean_float_2
+namespace generated_tests::mean_float_2 {
+
+const TestModel& get_test_model_all_tensors_as_inputs() {
+ static TestModel model = {
+ .expectFailure = false,
+ .expectedMultinomialDistributionTolerance = 0,
+ .isRelaxed = false,
+ .main = {
+ .inputIndexes = {0, 1},
+ .operands = {{ // input
+ .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, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_FLOAT32,
+ .zeroPoint = 0
+ }, { // axis
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({0, 2}),
+ .dimensions = {2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_INT32,
+ .zeroPoint = 0
+ }, { // keepDims
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({1}),
+ .dimensions = {},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::INT32,
+ .zeroPoint = 0
+ }, { // output
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<float>({10.5f, 12.5f, 14.5f}),
+ .dimensions = {1, 3, 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::MEAN
+ }},
+ .outputIndexes = {3}
+ },
+ .minSupportedVersion = TestHalVersion::V1_1,
+ .referenced = {}
+ };
+ return model;
+}
+
+const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("mean_float_2_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs());
+
+} // namespace generated_tests::mean_float_2
+
+namespace generated_tests::mean_float_2 {
+
+const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal() {
+ static TestModel model = {
+ .expectFailure = false,
+ .expectedMultinomialDistributionTolerance = 0,
+ .isRelaxed = false,
+ .main = {
+ .inputIndexes = {1, 4},
+ .operands = {{ // input
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<float>({}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_FLOAT32,
+ .zeroPoint = 0
+ }, { // axis
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({0, 2}),
+ .dimensions = {2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_INT32,
+ .zeroPoint = 0
+ }, { // keepDims
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({1}),
+ .dimensions = {},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::INT32,
+ .zeroPoint = 0
+ }, { // output
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<float>({10.5f, 12.5f, 14.5f}),
+ .dimensions = {1, 3, 1},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
+ .numberOfConsumers = 0,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_FLOAT32,
+ .zeroPoint = 0
+ }, { // input_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, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f, 21.0f, 22.0f, 23.0f, 24.0f}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .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
+ }, { // 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
+ }},
+ .operations = {{
+ .inputs = {4, 5, 6},
+ .outputs = {0},
+ .type = TestOperationType::ADD
+ }, {
+ .inputs = {0, 1, 2},
+ .outputs = {3},
+ .type = TestOperationType::MEAN
+ }},
+ .outputIndexes = {3}
+ },
+ .minSupportedVersion = TestHalVersion::V1_1,
+ .referenced = {}
+ };
+ return model;
+}
+
+const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("mean_float_2_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal());
+
+} // namespace generated_tests::mean_float_2
+