summaryrefslogtreecommitdiff
path: root/nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp')
-rw-r--r--nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp340
1 files changed, 338 insertions, 2 deletions
diff --git a/nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp b/nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp
index a83ba4998..af3c7d28f 100644
--- a/nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp
+++ b/nn/runtime/test/generated/spec_V1_3/mean_quant8_signed.example.cpp
@@ -174,6 +174,174 @@ const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add
namespace generated_tests::mean_quant8_signed {
+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<int8_t>({-127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // axis
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({1, 0, -3, -3}),
+ .dimensions = {4},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_INT32,
+ .zeroPoint = 0
+ }, { // keepDims
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({0}),
+ .dimensions = {},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::INT32,
+ .zeroPoint = 0
+ }, { // output
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-116, -115}),
+ .dimensions = {2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
+ .numberOfConsumers = 0,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }},
+ .operations = {{
+ .inputs = {0, 1, 2},
+ .outputs = {3},
+ .type = TestOperationType::MEAN
+ }},
+ .outputIndexes = {3}
+ },
+ .minSupportedVersion = TestHalVersion::V1_3,
+ .referenced = {}
+ };
+ return model;
+}
+
+const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("mean_quant8_signed_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs());
+
+} // namespace generated_tests::mean_quant8_signed
+
+namespace generated_tests::mean_quant8_signed {
+
+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<int8_t>({}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // axis
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({1, 0, -3, -3}),
+ .dimensions = {4},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::TENSOR_INT32,
+ .zeroPoint = 0
+ }, { // keepDims
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({0}),
+ .dimensions = {},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::INT32,
+ .zeroPoint = 0
+ }, { // output
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-116, -115}),
+ .dimensions = {2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
+ .numberOfConsumers = 0,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // input_new
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // dummy1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-123}),
+ .dimensions = {1},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // 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_3,
+ .referenced = {}
+ };
+ return model;
+}
+
+const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("mean_quant8_signed_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal());
+
+} // namespace generated_tests::mean_quant8_signed
+
+namespace generated_tests::mean_quant8_signed {
+
const TestModel& get_test_model_2() {
static TestModel model = {
.expectFailure = false,
@@ -298,7 +466,7 @@ const TestModel& get_test_model_all_inputs_as_internal_2() {
.scale = 0.8f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
.zeroPoint = -123
- }, { // dummy1
+ }, { // dummy2
.channelQuant = {},
.data = TestBuffer::createFromVector<int8_t>({-123}),
.dimensions = {1},
@@ -308,7 +476,7 @@ const TestModel& get_test_model_all_inputs_as_internal_2() {
.scale = 0.8f,
.type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
.zeroPoint = -123
- }, { // param1
+ }, { // param2
.channelQuant = {},
.data = TestBuffer::createFromVector<int32_t>({0}),
.dimensions = {},
@@ -340,3 +508,171 @@ const auto dummy_test_model_all_inputs_as_internal_2 = TestModelManager::get().a
} // namespace generated_tests::mean_quant8_signed
+namespace generated_tests::mean_quant8_signed {
+
+const TestModel& get_test_model_all_tensors_as_inputs_2() {
+ static TestModel model = {
+ .expectFailure = false,
+ .expectedMultinomialDistributionTolerance = 0,
+ .isRelaxed = false,
+ .main = {
+ .inputIndexes = {0, 1},
+ .operands = {{ // input1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // axis1
+ .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
+ }, { // keepDims1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({1}),
+ .dimensions = {},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::INT32,
+ .zeroPoint = 0
+ }, { // output1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-118, -116, -114}),
+ .dimensions = {1, 3, 1},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
+ .numberOfConsumers = 0,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }},
+ .operations = {{
+ .inputs = {0, 1, 2},
+ .outputs = {3},
+ .type = TestOperationType::MEAN
+ }},
+ .outputIndexes = {3}
+ },
+ .minSupportedVersion = TestHalVersion::V1_3,
+ .referenced = {}
+ };
+ return model;
+}
+
+const auto dummy_test_model_all_tensors_as_inputs_2 = TestModelManager::get().add("mean_quant8_signed_all_tensors_as_inputs_2", get_test_model_all_tensors_as_inputs_2());
+
+} // namespace generated_tests::mean_quant8_signed
+
+namespace generated_tests::mean_quant8_signed {
+
+const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal_2() {
+ static TestModel model = {
+ .expectFailure = false,
+ .expectedMultinomialDistributionTolerance = 0,
+ .isRelaxed = false,
+ .main = {
+ .inputIndexes = {1, 4},
+ .operands = {{ // input1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // axis1
+ .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
+ }, { // keepDims1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int32_t>({1}),
+ .dimensions = {},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.0f,
+ .type = TestOperandType::INT32,
+ .zeroPoint = 0
+ }, { // output1
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-118, -116, -114}),
+ .dimensions = {1, 3, 1},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT,
+ .numberOfConsumers = 0,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // input1_new
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104}),
+ .dimensions = {4, 3, 2},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // dummy3
+ .channelQuant = {},
+ .data = TestBuffer::createFromVector<int8_t>({-123}),
+ .dimensions = {1},
+ .isIgnored = false,
+ .lifetime = TestOperandLifeTime::CONSTANT_COPY,
+ .numberOfConsumers = 1,
+ .scale = 0.8f,
+ .type = TestOperandType::TENSOR_QUANT8_ASYMM_SIGNED,
+ .zeroPoint = -123
+ }, { // param3
+ .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_3,
+ .referenced = {}
+ };
+ return model;
+}
+
+const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal_2 = TestModelManager::get().add("mean_quant8_signed_all_tensors_as_inputs_all_inputs_as_internal_2", get_test_model_all_tensors_as_inputs_all_inputs_as_internal_2());
+
+} // namespace generated_tests::mean_quant8_signed
+