diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/shape_of.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/shape_of.cpp index 42ee9c1699f..9f960f5edef 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/shape_of.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/shape_of.cpp @@ -11,12 +11,14 @@ using namespace LayerTestsDefinitions; namespace { const std::vector netPrecisions = { + InferenceEngine::Precision::FP32, InferenceEngine::Precision::I32 }; INSTANTIATE_TEST_SUITE_P(smoke_Check, ShapeOfLayerTest, ::testing::Combine( ::testing::ValuesIn(netPrecisions), + ::testing::Values(InferenceEngine::Precision::I64), ::testing::Values(std::vector({10, 10, 10})), ::testing::Values(CommonTestUtils::DEVICE_CPU)), ShapeOfLayerTest::getTestCaseName); diff --git a/src/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp b/src/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp index ba76202b986..0ab01ee68c1 100644 --- a/src/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp +++ b/src/tests/functional/plugin/cpu/shared_tests_instances/skip_tests_config.cpp @@ -32,7 +32,6 @@ std::vector disabledTestPatterns() { // TODO: Issue: 63469 R"(.*ConversionLayerTest.*ConvertLike.*)", // TODO: Issue: 34055 - R"(.*ShapeOfLayerTest.*)", R"(.*ReluShapeOfSubgraphTest.*)", // TODO: Issue: 43314 R"(.*Broadcast.*mode=BIDIRECTIONAL.*inNPrec=BOOL.*)", diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp index 482d4a9bb59..b45baeb3069 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/single_layer/shape_of.hpp @@ -18,12 +18,19 @@ typedef std::tuple< InferenceEngine::Precision, // Network precision std::vector, // Input shapes std::string // Device name +> shapeOfParamsCommon; + +typedef std::tuple< + InferenceEngine::Precision, // Network precision + InferenceEngine::Precision, // Output precision + std::vector, // Input shapes + std::string // Device name > shapeOfParams; class ShapeOfLayerTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); + static std::string getTestCaseName(testing::TestParamInfo obj); protected: void SetUp() override; diff --git a/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp b/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp index f7cc92d22a9..d56ebebcafa 100644 --- a/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp +++ b/src/tests/functional/shared_test_classes/include/shared_test_classes/subgraph/relu_shape_of.hpp @@ -16,10 +16,10 @@ namespace SubgraphTestsDefinitions { -class ReluShapeOfSubgraphTest : public testing::WithParamInterface, +class ReluShapeOfSubgraphTest : public testing::WithParamInterface, virtual public LayerTestsUtils::LayerTestsCommon { public: - static std::string getTestCaseName(const testing::TestParamInfo& obj); + static std::string getTestCaseName(const testing::TestParamInfo& obj); protected: void SetUp() override; }; diff --git a/src/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp b/src/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp index 0ebaf8c52af..ebb8d3fbe97 100644 --- a/src/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp +++ b/src/tests/functional/shared_test_classes/src/single_layer/shape_of.cpp @@ -6,14 +6,16 @@ namespace LayerTestsDefinitions { - std::string ShapeOfLayerTest::getTestCaseName(const testing::TestParamInfo& obj) { + std::string ShapeOfLayerTest::getTestCaseName(testing::TestParamInfo obj) { InferenceEngine::SizeVector inputShapes; InferenceEngine::Precision inputPrecision; + InferenceEngine::Precision outputPrecision; std::string targetDevice; - std::tie(inputPrecision, inputShapes, targetDevice) = obj.param; + std::tie(inputPrecision, outputPrecision, inputShapes, targetDevice) = obj.param; std::ostringstream result; result << "IS=" << CommonTestUtils::vec2str(inputShapes) << "_"; result << "Precision=" << inputPrecision.name() << "_"; + result << "Output Precision=" << outputPrecision.name() << "_"; result << "TargetDevice=" << targetDevice; return result.str(); } @@ -21,11 +23,12 @@ namespace LayerTestsDefinitions { void ShapeOfLayerTest::SetUp() { InferenceEngine::SizeVector inputShapes; InferenceEngine::Precision inputPrecision; - std::tie(inputPrecision, inputShapes, targetDevice) = this->GetParam(); + std::tie(inputPrecision, outPrc, inputShapes, targetDevice) = this->GetParam(); auto inType = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(inputPrecision); + auto outType = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(outPrc); auto param = ngraph::builder::makeParams(inType, {inputShapes}); auto paramOuts = ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(param)); - auto shapeOf = std::make_shared(paramOuts[0], inType); + auto shapeOf = std::make_shared(paramOuts[0], outType); ngraph::ResultVector results{std::make_shared(shapeOf)}; function = std::make_shared(results, param, "shapeOf"); } diff --git a/src/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp b/src/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp index 5bc1fd2c9ba..58ca48aee67 100644 --- a/src/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp +++ b/src/tests/functional/shared_test_classes/src/subgraph/relu_shape_of.cpp @@ -6,7 +6,7 @@ namespace SubgraphTestsDefinitions { - std::string ReluShapeOfSubgraphTest::getTestCaseName(const testing::TestParamInfo& obj) { + std::string ReluShapeOfSubgraphTest::getTestCaseName(const testing::TestParamInfo& obj) { InferenceEngine::SizeVector inputShapes; InferenceEngine::Precision inputPrecision; std::string targetDevice;