diff options
Diffstat (limited to 'nn/runtime/test/generated/spec_V1_0/reshape.example.cpp')
-rw-r--r-- | nn/runtime/test/generated/spec_V1_0/reshape.example.cpp | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/nn/runtime/test/generated/spec_V1_0/reshape.example.cpp b/nn/runtime/test/generated/spec_V1_0/reshape.example.cpp index 6d3e7765f..1b9ac597d 100644 --- a/nn/runtime/test/generated/spec_V1_0/reshape.example.cpp +++ b/nn/runtime/test/generated/spec_V1_0/reshape.example.cpp @@ -152,3 +152,151 @@ const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add } // namespace generated_tests::reshape +namespace generated_tests::reshape { + +const TestModel& get_test_model_all_tensors_as_inputs() { + static TestModel model = { + .expectFailure = false, + .expectedMultinomialDistributionTolerance = 0, + .isRelaxed = false, + .main = { + .inputIndexes = {0, 1}, + .operands = {{ // op1 + .channelQuant = {}, + .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}), + .dimensions = {1, 1, 3, 3}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, + .numberOfConsumers = 1, + .scale = 0.0f, + .type = TestOperandType::TENSOR_FLOAT32, + .zeroPoint = 0 + }, { // op2 + .channelQuant = {}, + .data = TestBuffer::createFromVector<int32_t>({-1}), + .dimensions = {1}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, + .numberOfConsumers = 1, + .scale = 0.0f, + .type = TestOperandType::TENSOR_INT32, + .zeroPoint = 0 + }, { // op3 + .channelQuant = {}, + .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}), + .dimensions = {9}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, + .numberOfConsumers = 0, + .scale = 0.0f, + .type = TestOperandType::TENSOR_FLOAT32, + .zeroPoint = 0 + }}, + .operations = {{ + .inputs = {0, 1}, + .outputs = {2}, + .type = TestOperationType::RESHAPE + }}, + .outputIndexes = {2} + }, + .minSupportedVersion = TestHalVersion::V1_0, + .referenced = {} + }; + return model; +} + +const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("reshape_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs()); + +} // namespace generated_tests::reshape + +namespace generated_tests::reshape { + +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, 3}, + .operands = {{ // op1 + .channelQuant = {}, + .data = TestBuffer::createFromVector<float>({}), + .dimensions = {1, 1, 3, 3}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, + .numberOfConsumers = 1, + .scale = 0.0f, + .type = TestOperandType::TENSOR_FLOAT32, + .zeroPoint = 0 + }, { // op2 + .channelQuant = {}, + .data = TestBuffer::createFromVector<int32_t>({-1}), + .dimensions = {1}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, + .numberOfConsumers = 1, + .scale = 0.0f, + .type = TestOperandType::TENSOR_INT32, + .zeroPoint = 0 + }, { // op3 + .channelQuant = {}, + .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}), + .dimensions = {9}, + .isIgnored = false, + .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, + .numberOfConsumers = 0, + .scale = 0.0f, + .type = TestOperandType::TENSOR_FLOAT32, + .zeroPoint = 0 + }, { // op1_new + .channelQuant = {}, + .data = TestBuffer::createFromVector<float>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f}), + .dimensions = {1, 1, 3, 3}, + .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 = {3, 4, 5}, + .outputs = {0}, + .type = TestOperationType::ADD + }, { + .inputs = {0, 1}, + .outputs = {2}, + .type = TestOperationType::RESHAPE + }}, + .outputIndexes = {2} + }, + .minSupportedVersion = TestHalVersion::V1_0, + .referenced = {} + }; + return model; +} + +const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("reshape_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal()); + +} // namespace generated_tests::reshape + |