diff options
Diffstat (limited to 'nn/runtime/test/generated/spec_V1_1/mean_quant8_1.example.cpp')
-rw-r--r-- | nn/runtime/test/generated/spec_V1_1/mean_quant8_1.example.cpp | 168 |
1 files changed, 168 insertions, 0 deletions
diff --git a/nn/runtime/test/generated/spec_V1_1/mean_quant8_1.example.cpp b/nn/runtime/test/generated/spec_V1_1/mean_quant8_1.example.cpp index 887472831..5760bdbd7 100644 --- a/nn/runtime/test/generated/spec_V1_1/mean_quant8_1.example.cpp +++ b/nn/runtime/test/generated/spec_V1_1/mean_quant8_1.example.cpp @@ -172,3 +172,171 @@ const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add } // namespace generated_tests::mean_quant8_1 +namespace generated_tests::mean_quant8_1 { + +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<uint8_t>({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}), + .dimensions = {4, 3, 2}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, + .numberOfConsumers = 1, + .scale = 0.8f, + .type = TestOperandType::TENSOR_QUANT8_ASYMM, + .zeroPoint = 5 + }, { // 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<uint8_t>({12, 13}), + .dimensions = {2}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, + .numberOfConsumers = 0, + .scale = 0.8f, + .type = TestOperandType::TENSOR_QUANT8_ASYMM, + .zeroPoint = 5 + }}, + .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_quant8_1_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs()); + +} // namespace generated_tests::mean_quant8_1 + +namespace generated_tests::mean_quant8_1 { + +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<uint8_t>({}), + .dimensions = {4, 3, 2}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, + .numberOfConsumers = 1, + .scale = 0.8f, + .type = TestOperandType::TENSOR_QUANT8_ASYMM, + .zeroPoint = 5 + }, { // 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<uint8_t>({12, 13}), + .dimensions = {2}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, + .numberOfConsumers = 0, + .scale = 0.8f, + .type = TestOperandType::TENSOR_QUANT8_ASYMM, + .zeroPoint = 5 + }, { // input_new + .channelQuant = {}, + .data = TestBuffer::createFromVector<uint8_t>({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}), + .dimensions = {4, 3, 2}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, + .numberOfConsumers = 1, + .scale = 0.8f, + .type = TestOperandType::TENSOR_QUANT8_ASYMM, + .zeroPoint = 5 + }, { // dummy1 + .channelQuant = {}, + .data = TestBuffer::createFromVector<uint8_t>({5}), + .dimensions = {1}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::CONSTANT_COPY, + .numberOfConsumers = 1, + .scale = 0.8f, + .type = TestOperandType::TENSOR_QUANT8_ASYMM, + .zeroPoint = 5 + }, { // 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_quant8_1_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal()); + +} // namespace generated_tests::mean_quant8_1 + |