Skip to content

Commit

Permalink
Fixed MYRIAD tests compilation on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed May 27, 2021
1 parent b506e08 commit 1d43809
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ class DynamicShapeResolverTests : public CommonTestUtils::TestsCommon {
}

protected:
IE_SUPPRESS_DEPRECATED_START
InferenceEngine::CNNLayerPtr getDynamicShapeResolverLayer() const {
return CommonTestUtils::getLayerByName(cnnNetwork, s_FriendlyName);
}
IE_SUPPRESS_DEPRECATED_END
InferenceEngine::CNNNetwork cnnNetwork;

private:
Expand All @@ -59,10 +61,12 @@ TEST_F(DynamicShapeResolverTests, smoke_NGraphFunctionCanBeConvertedToCNNNetwork
ASSERT_EQ(cnnNetwork.layerCount(), cnnNetwork.getInputsInfo().size() + 1);
ASSERT_EQ(cnnNetwork.getOutputsInfo().size(), 1);

IE_SUPPRESS_DEPRECATED_START
const auto dynamicShapeResolver = getDynamicShapeResolverLayer();
ASSERT_EQ(dynamicShapeResolver->type, "DynamicShapeResolver");
ASSERT_EQ(dynamicShapeResolver->insData.size(), 2);
ASSERT_EQ(dynamicShapeResolver->outData.size(), 1);
IE_SUPPRESS_DEPRECATED_END
}

} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ namespace {
{{InferenceEngine::MYRIAD_ENABLE_WEIGHTS_ANALYSIS, CONFIG_VALUE(NO)}},

// Deprecated
IE_SUPPRESS_DEPRECATED_START
{{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(YES)}},
{{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(NO)}},

Expand All @@ -59,6 +60,7 @@ namespace {

{{VPU_MYRIAD_CONFIG_KEY(PLATFORM), VPU_MYRIAD_CONFIG_VALUE(2450)}},
{{VPU_MYRIAD_CONFIG_KEY(PLATFORM), VPU_MYRIAD_CONFIG_VALUE(2480)}}
IE_SUPPRESS_DEPRECATED_END
};

const std::vector<std::map<std::string, std::string>> MultiConfigs = {
Expand All @@ -68,8 +70,10 @@ namespace {
{InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION, CONFIG_VALUE(YES)}},

// Deprecated
IE_SUPPRESS_DEPRECATED_START
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD},
{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)}}
IE_SUPPRESS_DEPRECATED_END
};

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, CorrectConfigTests,
Expand Down Expand Up @@ -110,6 +114,7 @@ namespace {
{{InferenceEngine::MYRIAD_ENABLE_WEIGHTS_ANALYSIS, "OFF"}},

// Deprecated
IE_SUPPRESS_DEPRECATED_START
{{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "BLUETOOTH"}},
{{VPU_MYRIAD_CONFIG_KEY(PROTOCOL), "LAN"}},

Expand All @@ -125,6 +130,7 @@ namespace {
{{VPU_MYRIAD_CONFIG_KEY(PLATFORM), "-1"}},
{{VPU_MYRIAD_CONFIG_KEY(PLATFORM), "0"}},
{{VPU_MYRIAD_CONFIG_KEY(PLATFORM), "1"}},
IE_SUPPRESS_DEPRECATED_END
};

const std::vector<std::map<std::string, std::string>> multiinconfigs = {
Expand All @@ -134,6 +140,7 @@ namespace {
{CONFIG_KEY(LOG_LEVEL), "VERBOSE"}},

// Deprecated
IE_SUPPRESS_DEPRECATED_START
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD},
{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), "ON"}},

Expand All @@ -143,6 +150,7 @@ namespace {
{VPU_MYRIAD_CONFIG_KEY(PLATFORM), "0"}},
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD},
{VPU_MYRIAD_CONFIG_KEY(PLATFORM), "1"}},
IE_SUPPRESS_DEPRECATED_END
};

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, IncorrectConfigTests,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ namespace {
{{InferenceEngine::MYRIAD_ENABLE_WEIGHTS_ANALYSIS, CONFIG_VALUE(NO)}},

// Deprecated
IE_SUPPRESS_DEPRECATED_START
{{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(YES)}},
{{VPU_MYRIAD_CONFIG_KEY(FORCE_RESET), CONFIG_VALUE(NO)}},

Expand All @@ -62,6 +63,7 @@ namespace {

{{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(YES)}},
{{VPU_CONFIG_KEY(PRINT_RECEIVE_TENSOR_TIME), CONFIG_VALUE(NO)}},
IE_SUPPRESS_DEPRECATED_END
};

const std::vector<std::map<std::string, std::string>> inferMultiConfigs = {
Expand All @@ -71,8 +73,10 @@ namespace {
{InferenceEngine::MYRIAD_ENABLE_HW_ACCELERATION, CONFIG_VALUE(YES)}},

// Deprecated
IE_SUPPRESS_DEPRECATED_START
{{InferenceEngine::MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES, CommonTestUtils::DEVICE_MYRIAD},
{VPU_CONFIG_KEY(HW_STAGES_OPTIMIZATION), CONFIG_VALUE(YES)}},
IE_SUPPRESS_DEPRECATED_END
};

INSTANTIATE_TEST_CASE_P(smoke_BehaviorTests, InferConfigTests,
Expand Down

0 comments on commit 1d43809

Please sign in to comment.