diff --git a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp index 3facc4ce61d..0043a135b9d 100644 --- a/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp +++ b/inference-engine/tests/functional/plugin/myriad/shared_tests_instances/single_layer_tests/nonzero.cpp @@ -5,7 +5,7 @@ #include "single_layer_tests/nonzero.hpp" -#include "common_test_utils/test_constants.hpp" +#include "common/myriad_common_test_utils.hpp" #include #include @@ -16,10 +16,21 @@ using namespace LayerTestsDefinitions; namespace { +ConfigMap getConfig() { + ConfigMap config; + config[VPU_CONFIG_KEY(DETECT_NETWORK_BATCH)] = CONFIG_VALUE(NO); + if (CommonTestUtils::vpu::CheckMyriad2()) { + config[VPU_CONFIG_KEY(DISABLE_REORDER)] = CONFIG_VALUE(YES); + } + return config; +} + std::vector> inShapes = { {1000}, {4, 1000}, {2, 4, 1000}, + {2, 4, 4, 1000}, + {2, 4, 4, 2, 1000}, }; const std::vector inputPrecisions = { @@ -28,11 +39,12 @@ const std::vector inputPrecisions = { InferenceEngine::Precision::U8, }; -// Enable this when #-29056 is ready -INSTANTIATE_TEST_CASE_P(DISABLED_nonzero, NonZeroLayerTest, +INSTANTIATE_TEST_CASE_P(nonzero, NonZeroLayerTest, ::testing::Combine( ::testing::ValuesIn(inShapes), ::testing::ValuesIn(inputPrecisions), - ::testing::Values(CommonTestUtils::DEVICE_MYRIAD)), - NonZeroLayerTest::getTestCaseName); + ::testing::Values(CommonTestUtils::DEVICE_MYRIAD), + ::testing::Values(getConfig())), + NonZeroLayerTest::getTestCaseName); + } // namespace diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp index 0b38f404d7f..eb7d8ee252d 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/nonzero.hpp @@ -22,7 +22,8 @@ using ConfigMap = typename std::map; using NonZeroLayerTestParamsSet = typename std::tuple< InferenceEngine::SizeVector, // Input shapes InferenceEngine::Precision, // Input precision - LayerTestsUtils::TargetDevice>; // Device name + LayerTestsUtils::TargetDevice, // Device name + ConfigMap>; // Additional network configuration class NonZeroLayerTest : public testing::WithParamInterface, public LayerTestsUtils::LayerTestsCommon { diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp index 61da1c3a12a..ccfe5c59e26 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/nonzero.cpp @@ -22,7 +22,8 @@ std::string NonZeroLayerTest::getTestCaseName(testing::TestParamInfo inputShape; InferenceEngine::Precision inputPrecision; std::string targetDevice; - std::tie(inputShape, inputPrecision, targetDevice) = obj.param; + ConfigMap additionalConfig; + std::tie(inputShape, inputPrecision, targetDevice, additionalConfig) = obj.param; std::ostringstream result; result << "IS=" << CommonTestUtils::vec2str(inputShape) << "_"; @@ -35,7 +36,10 @@ void NonZeroLayerTest::SetUp() { SetRefMode(LayerTestsUtils::RefMode::CONSTANT_FOLDING); auto inputShape = std::vector{}; auto inputPrecision = InferenceEngine::Precision::UNSPECIFIED; - std::tie(inputShape, inputPrecision, targetDevice) = GetParam(); + ConfigMap additionalConfig; + std::tie(inputShape, inputPrecision, targetDevice, additionalConfig) = GetParam(); + + configuration.insert(additionalConfig.cbegin(), additionalConfig.cend()); const auto& precision = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(inputPrecision); const auto& paramNode = std::make_shared(precision, ngraph::Shape(inputShape));