// Generated from cast.mod.py // DO NOT EDIT // clang-format off #include "TestHarness.h" using namespace test_helper; // NOLINT(google-build-using-namespace) namespace generated_tests::cast { const TestModel& get_test_model_float16_to_float16() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_float16 = TestModelManager::get().add("cast_float16_to_float16", get_test_model_float16_to_float16()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_float16_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input0_new .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // placeholder .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_float16_all_inputs_as_internal = TestModelManager::get().add("cast_float16_to_float16_all_inputs_as_internal", get_test_model_float16_to_float16_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_float32() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_float32 = TestModelManager::get().add("cast_float16_to_float32", get_test_model_float16_to_float32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_float32_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input0_new .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // placeholder1 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_float32_all_inputs_as_internal = TestModelManager::get().add("cast_float16_to_float32_all_inputs_as_internal", get_test_model_float16_to_float32_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_float32_relaxed() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float16_to_float32_relaxed = TestModelManager::get().add("cast_float16_to_float32_relaxed", get_test_model_float16_to_float32_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_float32_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input0_new .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // placeholder2 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({0.0f}) }, { // param2 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float16_to_float32_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_float16_to_float32_relaxed_all_inputs_as_internal", get_test_model_float16_to_float32_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_int32() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_int32 = TestModelManager::get().add("cast_float16_to_int32", get_test_model_float16_to_int32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_int32_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input0_new .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // placeholder3 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({0.0f}) }, { // param3 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_int32_all_inputs_as_internal = TestModelManager::get().add("cast_float16_to_int32_all_inputs_as_internal", get_test_model_float16_to_int32_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_quant8() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_quant8 = TestModelManager::get().add("cast_float16_to_quant8", get_test_model_float16_to_quant8()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_quant8_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input0_new .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // placeholder4 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({0.0f}) }, { // param4 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_quant8_all_inputs_as_internal = TestModelManager::get().add("cast_float16_to_quant8_all_inputs_as_internal", get_test_model_float16_to_quant8_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float16() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_float16 = TestModelManager::get().add("cast_float32_to_float16", get_test_model_float32_to_float16()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float16_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder5 .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}) }, { // param5 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_float16_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_float16_all_inputs_as_internal", get_test_model_float32_to_float16_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float16_relaxed() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_float16_relaxed = TestModelManager::get().add("cast_float32_to_float16_relaxed", get_test_model_float32_to_float16_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float16_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder6 .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}) }, { // param6 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_float16_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_float16_relaxed_all_inputs_as_internal", get_test_model_float32_to_float16_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float32() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_float32 = TestModelManager::get().add("cast_float32_to_float32", get_test_model_float32_to_float32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float32_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder7 .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}) }, { // param7 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_float32_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_float32_all_inputs_as_internal", get_test_model_float32_to_float32_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float32_relaxed() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_float32_relaxed = TestModelManager::get().add("cast_float32_to_float32_relaxed", get_test_model_float32_to_float32_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_float32_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder8 .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}) }, { // param8 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_float32_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_float32_relaxed_all_inputs_as_internal", get_test_model_float32_to_float32_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_int32() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_int32 = TestModelManager::get().add("cast_float32_to_int32", get_test_model_float32_to_int32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_int32_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder9 .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}) }, { // param9 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_int32_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_int32_all_inputs_as_internal", get_test_model_float32_to_int32_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_int32_relaxed() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_int32_relaxed = TestModelManager::get().add("cast_float32_to_int32_relaxed", get_test_model_float32_to_int32_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_int32_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder10 .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}) }, { // param10 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_int32_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_int32_relaxed_all_inputs_as_internal", get_test_model_float32_to_int32_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_quant8 = TestModelManager::get().add("cast_float32_to_quant8", get_test_model_float32_to_quant8()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder11 .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}) }, { // param11 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_quant8_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_quant8_all_inputs_as_internal", get_test_model_float32_to_quant8_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_relaxed() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_quant8_relaxed = TestModelManager::get().add("cast_float32_to_quant8_relaxed", get_test_model_float32_to_quant8_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input01_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .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, 5.0f, 6.0f}) }, { // placeholder12 .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}) }, { // param12 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_quant8_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_quant8_relaxed_all_inputs_as_internal", get_test_model_float32_to_quant8_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_int32_to_float16() { static TestModel model = { .main = { .operands = {{ // input02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_int32_to_float16 = TestModelManager::get().add("cast_int32_to_float16", get_test_model_int32_to_float16()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_int32_to_float32() { static TestModel model = { .main = { .operands = {{ // input02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_int32_to_float32 = TestModelManager::get().add("cast_int32_to_float32", get_test_model_int32_to_float32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_int32_to_float32_relaxed() { static TestModel model = { .main = { .operands = {{ // input02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_int32_to_float32_relaxed = TestModelManager::get().add("cast_int32_to_float32_relaxed", get_test_model_int32_to_float32_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_int32_to_int32() { static TestModel model = { .main = { .operands = {{ // input02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_int32_to_int32 = TestModelManager::get().add("cast_int32_to_int32", get_test_model_int32_to_int32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_int32_to_quant8() { static TestModel model = { .main = { .operands = {{ // input02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_int32_to_quant8 = TestModelManager::get().add("cast_int32_to_quant8", get_test_model_int32_to_quant8()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_float16() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_float16 = TestModelManager::get().add("cast_quant8_to_float16", get_test_model_quant8_to_float16()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_float16_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output0 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input03_new .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // placeholder13 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {1}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({100}) }, { // param13 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_float16_all_inputs_as_internal = TestModelManager::get().add("cast_quant8_to_float16_all_inputs_as_internal", get_test_model_quant8_to_float16_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_float32() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_float32 = TestModelManager::get().add("cast_quant8_to_float32", get_test_model_quant8_to_float32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_float32_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input03_new .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // placeholder14 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {1}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({100}) }, { // param14 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_float32_all_inputs_as_internal = TestModelManager::get().add("cast_quant8_to_float32_all_inputs_as_internal", get_test_model_quant8_to_float32_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_float32_relaxed() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_quant8_to_float32_relaxed = TestModelManager::get().add("cast_quant8_to_float32_relaxed", get_test_model_quant8_to_float32_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_float32_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output01 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}) }, { // input03_new .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // placeholder15 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {1}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({100}) }, { // param15 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_quant8_to_float32_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_quant8_to_float32_relaxed_all_inputs_as_internal", get_test_model_quant8_to_float32_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_int32() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_int32 = TestModelManager::get().add("cast_quant8_to_int32", get_test_model_quant8_to_int32()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_int32_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output02 .type = TestOperandType::TENSOR_INT32, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input03_new .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // placeholder16 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {1}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({100}) }, { // param16 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_int32_all_inputs_as_internal = TestModelManager::get().add("cast_quant8_to_int32_all_inputs_as_internal", get_test_model_quant8_to_int32_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_quant8() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_quant8 = TestModelManager::get().add("cast_quant8_to_quant8", get_test_model_quant8_to_quant8()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_quant8_to_quant8_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output03 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // input03_new .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2, 3}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({1, 2, 3, 4, 5, 6}) }, { // placeholder17 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {1}, .numberOfConsumers = 1, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({100}) }, { // param17 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_quant8_to_quant8_all_inputs_as_internal = TestModelManager::get().add("cast_quant8_to_quant8_all_inputs_as_internal", get_test_model_quant8_to_quant8_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_quant8_overflow() { static TestModel model = { .main = { .operands = {{ // input04 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({-1.0f, 256.0f}) }, { // output04 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_quant8_overflow = TestModelManager::get().add("cast_float16_to_quant8_overflow", get_test_model_float16_to_quant8_overflow()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float16_to_quant8_overflow_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input04 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({}) }, { // output04 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }, { // input04_new .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({-1.0f, 256.0f}) }, { // placeholder18 .type = TestOperandType::TENSOR_FLOAT16, .dimensions = {1}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::CONSTANT_COPY, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector<_Float16>({0.0f}) }, { // param18 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float16_to_quant8_overflow_all_inputs_as_internal = TestModelManager::get().add("cast_float16_to_quant8_overflow_all_inputs_as_internal", get_test_model_float16_to_quant8_overflow_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_overflow() { static TestModel model = { .main = { .operands = {{ // input05 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({-1.0f, 256.0f}) }, { // output05 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_quant8_overflow = TestModelManager::get().add("cast_float32_to_quant8_overflow", get_test_model_float32_to_quant8_overflow()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_overflow_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input05 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output05 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }, { // input05_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({-1.0f, 256.0f}) }, { // placeholder19 .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}) }, { // param19 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_float32_to_quant8_overflow_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_quant8_overflow_all_inputs_as_internal", get_test_model_float32_to_quant8_overflow_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_overflow_relaxed() { static TestModel model = { .main = { .operands = {{ // input05 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({-1.0f, 256.0f}) }, { // output05 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_quant8_overflow_relaxed = TestModelManager::get().add("cast_float32_to_quant8_overflow_relaxed", get_test_model_float32_to_quant8_overflow_relaxed()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_float32_to_quant8_overflow_relaxed_all_inputs_as_internal() { static TestModel model = { .main = { .operands = {{ // input05 .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::TEMPORARY_VARIABLE, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({}) }, { // output05 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }, { // input05_new .type = TestOperandType::TENSOR_FLOAT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({-1.0f, 256.0f}) }, { // placeholder20 .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}) }, { // param20 .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 = {2, 3, 4}, .outputs = {0} }, { .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {2}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = true, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::UNKNOWN }; return model; } const auto dummy_test_model_float32_to_quant8_overflow_relaxed_all_inputs_as_internal = TestModelManager::get().add("cast_float32_to_quant8_overflow_relaxed_all_inputs_as_internal", get_test_model_float32_to_quant8_overflow_relaxed_all_inputs_as_internal()); } // namespace generated_tests::cast namespace generated_tests::cast { const TestModel& get_test_model_int32_to_quant8_overflow() { static TestModel model = { .main = { .operands = {{ // input06 .type = TestOperandType::TENSOR_INT32, .dimensions = {2}, .numberOfConsumers = 1, .scale = 0.0f, .zeroPoint = 0, .lifetime = TestOperandLifeTime::SUBGRAPH_INPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({-1, 256}) }, { // output06 .type = TestOperandType::TENSOR_QUANT8_ASYMM, .dimensions = {2}, .numberOfConsumers = 0, .scale = 4.0f, .zeroPoint = 100, .lifetime = TestOperandLifeTime::SUBGRAPH_OUTPUT, .channelQuant = {}, .isIgnored = false, .data = TestBuffer::createFromVector({0, 255}) }}, .operations = {{ .type = TestOperationType::CAST, .inputs = {0}, .outputs = {1} }}, .inputIndexes = {0}, .outputIndexes = {1} }, .referenced = {}, .isRelaxed = false, .expectedMultinomialDistributionTolerance = 0, .expectFailure = false, .minSupportedVersion = TestHalVersion::V1_2 }; return model; } const auto dummy_test_model_int32_to_quant8_overflow = TestModelManager::get().add("cast_int32_to_quant8_overflow", get_test_model_int32_to_quant8_overflow()); } // namespace generated_tests::cast