// Generated from transpose.mod.py // DO NOT EDIT // clang-format off #include "TestHarness.h" using namespace test_helper; // NOLINT(google-build-using-namespace) namespace generated_tests::transpose { const TestModel& get_test_model() { static TestModel model = { .main = { .operands = {{ // input .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f}) }, { // perms .type = TestOperandType::TENSOR_INT32, .dimensions = {4}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 2, 1, 3}) }, { // output .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 3.0f, 2.0f, 4.0f}) }}, .operations = {{ .type = TestOperationType::TRANSPOSE, .inputs = {0, 1}, .outputs = {2} }}, .inputIndexes = {0}, .outputIndexes = {2} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_1 }; return model; } const auto dummy_test_model = TestModelManager::get().add("transpose", get_test_model()); } // namespace generated_tests::transpose namespace generated_tests::transpose { const TestModel& get_test_model_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // perms .type = TestOperandType::TENSOR_INT32, .dimensions = {4}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 2, 1, 3}) }, { // output .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 3.0f, 2.0f, 4.0f}) }, { // input_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f}) }, { // placeholder .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0.0f}) }, { // param .type = TestOperandType::INT32, .dimensions = {}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0}) }}, .operations = {{ .type = TestOperationType::ADD, .inputs = {3, 4, 5}, .outputs = {0} }, { .type = TestOperationType::TRANSPOSE, .inputs = {0, 1}, .outputs = {2} }}, .inputIndexes = {3}, .outputIndexes = {2} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_1 }; return model; } const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("transpose_all_inputs_as_internal", get_test_model_all_inputs_as_internal()); } // namespace generated_tests::transpose namespace generated_tests::transpose { const TestModel& get_test_model_all_tensors_as_inputs() { static TestModel model = { .main = { .operands = {{ // input .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f}) }, { // perms .type = TestOperandType::TENSOR_INT32, .dimensions = {4}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 2, 1, 3}) }, { // output .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 3.0f, 2.0f, 4.0f}) }}, .operations = {{ .type = TestOperationType::TRANSPOSE, .inputs = {0, 1}, .outputs = {2} }}, .inputIndexes = {0, 1}, .outputIndexes = {2} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_1 }; return model; } const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("transpose_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs()); } // namespace generated_tests::transpose namespace generated_tests::transpose { const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // perms .type = TestOperandType::TENSOR_INT32, .dimensions = {4}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 2, 1, 3}) }, { // output .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 3.0f, 2.0f, 4.0f}) }, { // input_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1, 2, 2, 1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f}) }, { // placeholder1 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0.0f}) }, { // param1 .type = TestOperandType::INT32, .dimensions = {}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0}) }}, .operations = {{ .type = TestOperationType::ADD, .inputs = {3, 4, 5}, .outputs = {0} }, { .type = TestOperationType::TRANSPOSE, .inputs = {0, 1}, .outputs = {2} }}, .inputIndexes = {1, 3}, .outputIndexes = {2} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_1 }; return model; } const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("transpose_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal()); } // namespace generated_tests::transpose