diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/softmax.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/softmax.cpp index 2bde5814232..d7c77c83e96 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/softmax.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/softmax.cpp @@ -34,8 +34,8 @@ const std::vector axis2D = { const auto params2D_static = testing::Combine( testing::ValuesIn(netPrecisions), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(ov::element::Type_t::undefined), + testing::Values(ov::element::Type_t::undefined), testing::ValuesIn(inputStaticShape2D), testing::ValuesIn(axis2D), testing::Values(CommonTestUtils::DEVICE_CPU), @@ -44,8 +44,8 @@ const auto params2D_static = testing::Combine( const auto params2D_dynamic = testing::Combine( testing::ValuesIn(netPrecisions), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(ov::element::Type_t::undefined), + testing::Values(ov::element::Type_t::undefined), testing::ValuesIn(inputDynamicShape2D), testing::ValuesIn(axis2D), testing::Values(CommonTestUtils::DEVICE_CPU), @@ -82,8 +82,8 @@ const std::vector axis4D = {0, 1, 2, 3}; const auto params4Dstatic = testing::Combine( testing::ValuesIn(netPrecisions), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(ov::element::Type_t::undefined), + testing::Values(ov::element::Type_t::undefined), testing::ValuesIn(inputStaticShape4D), testing::ValuesIn(axis4D), testing::Values(CommonTestUtils::DEVICE_CPU), @@ -92,8 +92,8 @@ const auto params4Dstatic = testing::Combine( const auto params4Ddynamic = testing::Combine( testing::ValuesIn(netPrecisions), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), -// testing::Values(InferenceEngine::Precision::UNSPECIFIED), + testing::Values(ov::element::Type_t::undefined), + testing::Values(ov::element::Type_t::undefined), testing::ValuesIn(inputDynamicShape4D), testing::ValuesIn(axis4D), testing::Values(CommonTestUtils::DEVICE_CPU), diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp index f75c99a9eaa..ddd9055636a 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/base/ov_subgraph.hpp @@ -68,7 +68,7 @@ protected: // //#endif -// virtual void configure_model(); + virtual void configure_model(); virtual void compile_model(); virtual void generate_inputs(const std::vector& targetInputStaticShapes); @@ -86,8 +86,8 @@ protected: std::shared_ptr function; std::shared_ptr functionRefs; - ov::element::Type inPrc; - ov::element::Type outPrc; + ov::element::Type_t inType; + ov::element::Type_t outType; std::map inputs; std::vector inputDynamicShapes; std::vector> targetStaticShapes; diff --git a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp index 6abd2739dee..d1a460cbc45 100644 --- a/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp +++ b/inference-engine/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/softmax.hpp @@ -18,8 +18,8 @@ namespace LayerTestsDefinitions { using softMaxLayerTestParams = std::tuple< ngraph::element::Type_t, // netPrecision -// ngraph::element::Type, // Input precision -// ngraph::element::Type, // Output precision + ngraph::element::Type_t, // Input precision + ngraph::element::Type_t, // Output precision // InferenceEngine::Layout, // Input layout // InferenceEngine::Layout, // Output layout std::pair>, // Dynamic shape + Target static shapes diff --git a/inference-engine/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp b/inference-engine/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp index 5d9e84ab54d..e1d2aa8cc4b 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/base/ov_subgraph.cpp @@ -76,8 +76,8 @@ void SubgraphBaseTest::serialize() { std::string out_xml_path = output_name + ".xml"; std::string out_bin_path = output_name + ".bin"; - ngraph::pass::Manager manager; - manager.register_pass(out_xml_path, out_bin_path); + ov::pass::Manager manager; + manager.register_pass(out_xml_path, out_bin_path); manager.run_passes(function); function->validate_nodes_and_infer_types(); @@ -140,26 +140,30 @@ void SubgraphBaseTest::compare(const std::vector &expected, // ASSERT_EQ(expected.get_shape(), actual.get_shape()); //} -//void SubgraphBaseTest::configure_model() { -// // configure input precision -// { -// auto params = function->get_parameters(); -// for (auto& param : params) { -// param->get_output_tensor(0).set_element_type(inPrc); -// } -// } -// -// // configure output precision -// { -// auto results = function->get_results(); -// for (auto& result : results) { -// result->get_output_tensor(0).set_element_type(outPrc); -// } -// } -//} +void SubgraphBaseTest::configure_model() { + // configure input precision + { + auto params = function->get_parameters(); + for (auto& param : params) { + if (inType != ov::element::Type_t::undefined) { + param->get_output_tensor(0).set_element_type(inType); + } + } + } + + // configure output precision + { + auto results = function->get_results(); + for (auto& result : results) { + if (outType != ov::element::Type_t::undefined) { + result->get_output_tensor(0).set_element_type(outType); + } + } + } +} void SubgraphBaseTest::compile_model() { -// configure_model(); + configure_model(); executableNetwork = core->compile_model(function, targetDevice, configuration); } @@ -180,7 +184,7 @@ void SubgraphBaseTest::infer() { } inferRequest.infer(); } -// + std::vector SubgraphBaseTest::calculate_refs() { // nGraph interpreter does not support f16/bf16 ngraph::pass::ConvertPrecision().run_on_function(function); @@ -193,7 +197,7 @@ std::vector SubgraphBaseTest::calculate_refs() { auto expectedOutputs = ngraph::helpers::interpreterFunction(function, referenceInputs); return expectedOutputs; } -// + std::vector SubgraphBaseTest::get_outputs() { auto outputs = std::vector{}; for (const auto& output : executableNetwork.get_results()) { diff --git a/inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp b/inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp index 37008f165b2..f85bb776004 100644 --- a/inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp +++ b/inference-engine/tests/functional/shared_test_classes/src/single_layer/softmax.cpp @@ -7,18 +7,17 @@ namespace LayerTestsDefinitions { std::string SoftMaxLayerTest::getTestCaseName(const testing::TestParamInfo& obj) { - ngraph::element::Type_t netPrecision; -// InferenceEngine::Precision inPrc, outPrc; + ov::element::Type_t netType, inType, outType; std::pair> shapes; size_t axis; std::string targetDevice; std::map config; - std::tie(netPrecision, shapes, axis, targetDevice, config) = obj.param; + std::tie(netType, inType, outType, shapes, axis, targetDevice, config) = obj.param; std::ostringstream result; - result << "netPRC=" << netPrecision << "_"; -// result << "inPRC=" << inPrc.name() << "_"; -// result << "outPRC=" << outPrc.name() << "_"; + result << "NetType=" << netType << "_"; + result << "InType=" << inType << "_"; + result << "OutType=" << outType << "_"; result << "IS=" << CommonTestUtils::partialShape2str({shapes.first}) << "_"; result << "TS="; for (const auto& item : shapes.second) { @@ -35,7 +34,7 @@ void SoftMaxLayerTest::SetUp() { ngraph::element::Type_t ngPrc; size_t axis; - std::tie(ngPrc, shapes, axis, targetDevice, configuration) = GetParam(); + std::tie(ngPrc, inType, outType, shapes, axis, targetDevice, configuration) = GetParam(); init_input_shapes(shapes); const auto params = ngraph::builder::makeDynamicParams(ngPrc, inputDynamicShapes);