// Generated from prelu.mod.py // DO NOT EDIT // clang-format off #include "TestHarness.h" using namespace test_helper; namespace generated_tests::prelu { const TestModel& get_test_model() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model = TestModelManager::get().add("prelu", get_test_model()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // param .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_all_inputs_as_internal = TestModelManager::get().add("prelu_all_inputs_as_internal", get_test_model_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { 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({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_all_tensors_as_inputs = TestModelManager::get().add("prelu_all_tensors_as_inputs", get_test_model_all_tensors_as_inputs()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_all_tensors_as_inputs_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder1 .channelQuant = {}, .data = TestBuffer::createFromVector({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({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder2 .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // param2 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_all_tensors_as_inputs_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_relaxed() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = true, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::UNKNOWN, .referenced = {} }; return model; } const auto dummy_test_model_relaxed = TestModelManager::get().add("prelu_relaxed", get_test_model_relaxed()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_relaxed_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = true, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder3 .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // param3 .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::UNKNOWN, .referenced = {} }; return model; } const auto dummy_test_model_relaxed_all_inputs_as_internal = TestModelManager::get().add("prelu_relaxed_all_inputs_as_internal", get_test_model_relaxed_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_relaxed_all_tensors_as_inputs() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = true, .main = { .inputIndexes = {0, 1}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::UNKNOWN, .referenced = {} }; return model; } const auto dummy_test_model_relaxed_all_tensors_as_inputs = TestModelManager::get().add("prelu_relaxed_all_tensors_as_inputs", get_test_model_relaxed_all_tensors_as_inputs()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = true, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder4 .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // param4 .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // placeholder5 .channelQuant = {}, .data = TestBuffer::createFromVector({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT32, .zeroPoint = 0 }, { // param5 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::UNKNOWN, .referenced = {} }; return model; } const auto dummy_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_relaxed_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_relaxed_all_tensors_as_inputs_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8 = TestModelManager::get().add("prelu_quant8", get_test_model_quant8()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder6 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param6 .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_inputs_as_internal = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal", get_test_model_quant8_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0, 1}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs", get_test_model_quant8_all_tensors_as_inputs()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 122, 122, 122, 120, 118, 116, 120, 116, 112}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder7 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param7 .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // placeholder8 .channelQuant = {}, .data = TestBuffer::createFromVector({50}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // param8 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_2() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_2 = TestModelManager::get().add("prelu_quant8_2", get_test_model_quant8_2()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_inputs_as_internal_2() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder9 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param9 .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_inputs_as_internal_2 = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal_2", get_test_model_quant8_all_inputs_as_internal_2()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_2() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0, 1}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_2 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_2", get_test_model_quant8_all_tensors_as_inputs_2()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 124, 124, 124, 120, 116, 112, 120, 112, 104}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder10 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param10 .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector({50, 54, 58}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // placeholder11 .channelQuant = {}, .data = TestBuffer::createFromVector({50}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // param11 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal_2", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_2()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_3() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.125f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_3 = TestModelManager::get().add("prelu_quant8_3", get_test_model_quant8_3()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_inputs_as_internal_3() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.125f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder12 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param12 .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_inputs_as_internal_3 = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal_3", get_test_model_quant8_all_inputs_as_internal_3()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_3() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0, 1}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.125f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_3 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_3", get_test_model_quant8_all_tensors_as_inputs_3()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 128, 128, 128, 120, 112, 104, 120, 104, 88}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.125f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder13 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param13 .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // placeholder14 .channelQuant = {}, .data = TestBuffer::createFromVector({50}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // param14 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal_3", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_3()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_4() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.1f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_4 = TestModelManager::get().add("prelu_quant8_4", get_test_model_quant8_4()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_inputs_as_internal_4() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.1f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder15 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param15 .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_inputs_as_internal_4 = TestModelManager::get().add("prelu_quant8_all_inputs_as_internal_4", get_test_model_quant8_all_inputs_as_internal_4()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_4() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0, 1}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.1f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_4 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_4", get_test_model_quant8_all_tensors_as_inputs_4()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector({120, 120, 120, 130, 130, 130, 120, 110, 100, 120, 100, 80}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.1f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 120 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector({128, 128, 128, 132, 132, 132, 124, 124, 124, 120, 120, 120}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // placeholder16 .channelQuant = {}, .data = TestBuffer::createFromVector({128}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.25f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 128 }, { // param16 .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector({50, 52, 54}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // placeholder17 .channelQuant = {}, .data = TestBuffer::createFromVector({50}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.5f, .type = TestOperandType::TENSOR_QUANT8_ASYMM, .zeroPoint = 50 }, { // param17 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4 = TestModelManager::get().add("prelu_quant8_all_tensors_as_inputs_all_inputs_as_internal_4", get_test_model_quant8_all_tensors_as_inputs_all_inputs_as_internal_4()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_float16() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_float16 = TestModelManager::get().add("prelu_float16", get_test_model_float16()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_float16_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // placeholder18 .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // param18 .channelQuant = {}, .data = TestBuffer::createFromVector({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::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_float16_all_inputs_as_internal = TestModelManager::get().add("prelu_float16_all_inputs_as_internal", get_test_model_float16_all_inputs_as_internal()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_float16_all_tensors_as_inputs() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {0, 1}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }}, .operations = {{ .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_float16_all_tensors_as_inputs = TestModelManager::get().add("prelu_float16_all_tensors_as_inputs", get_test_model_float16_all_tensors_as_inputs()); } // namespace generated_tests::prelu namespace generated_tests::prelu { const TestModel& get_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal() { static TestModel model = { .expectFailure = false, .expectedMultinomialDistributionTolerance = 0, .isRelaxed = false, .main = { .inputIndexes = {3, 6}, .operands = {{ // input .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // alpha .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // output .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, -2.0f, 0.0f, -2.0f, -4.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .numberOfConsumers = 0, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // input_new .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -2.0f, -2.0f, -2.0f}), .dimensions = {1, 2, 2, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // placeholder19 .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // param19 .channelQuant = {}, .data = TestBuffer::createFromVector({0}), .dimensions = {}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::INT32, .zeroPoint = 0 }, { // alpha_new .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f, 1.0f, 2.0f}), .dimensions = {1, 1, 3}, .isIgnored = false, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // placeholder20 .channelQuant = {}, .data = TestBuffer::createFromVector<_Float16>({0.0f}), .dimensions = {1}, .isIgnored = false, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .numberOfConsumers = 1, .scale = 0.0f, .type = TestOperandType::TENSOR_FLOAT16, .zeroPoint = 0 }, { // param20 .channelQuant = {}, .data = TestBuffer::createFromVector({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 = {6, 7, 8}, .outputs = {1}, .type = TestOperationType::ADD }, { .inputs = {0, 1}, .outputs = {2}, .type = TestOperationType::PRELU }}, .outputIndexes = {2} }, .minSupportedVersion = TestHalVersion::V1_2, .referenced = {} }; return model; } const auto dummy_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal = TestModelManager::get().add("prelu_float16_all_tensors_as_inputs_all_inputs_as_internal", get_test_model_float16_all_tensors_as_inputs_all_inputs_as_internal()); } // namespace generated_tests::prelu