Skip to content

Commit

Permalink
compilation errors solved
Browse files Browse the repository at this point in the history
  • Loading branch information
DariaMityagina committed May 5, 2021
1 parent de61852 commit f67061e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const std::vector<std::vector<float>> defaultScales = {
{1.f, 1.f, 1.333333f, 1.333333f}
};

std::map<std::string, std::string> additional_config = {};

const auto interpolateCasesWithoutNearest = ::testing::Combine(
::testing::ValuesIn(modesWithoutNearest),
::testing::ValuesIn(shapeCalculationMode),
Expand Down Expand Up @@ -115,7 +117,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Basic, InterpolateLayerTest, ::testing
::testing::Values(InferenceEngine::Layout::ANY),
::testing::ValuesIn(inShapes),
::testing::ValuesIn(targetShapes),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
InterpolateLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Nearest, InterpolateLayerTest, ::testing::Combine(
Expand All @@ -127,7 +130,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Nearest, InterpolateLayerTest, ::testi
::testing::Values(InferenceEngine::Layout::ANY),
::testing::ValuesIn(inShapes),
::testing::ValuesIn(targetShapes),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
InterpolateLayerTest::getTestCaseName);

const std::vector<std::vector<size_t>> targetShapesTailTest = {
Expand Down Expand Up @@ -171,7 +175,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Basic_Down_Sample_Tail, InterpolateLay
::testing::Values(InferenceEngine::Layout::ANY),
::testing::ValuesIn(inShapes),
::testing::ValuesIn(targetShapesTailTest),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
InterpolateLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Nearest_Down_Sample_Tail, InterpolateLayerTest, ::testing::Combine(
Expand All @@ -183,7 +188,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Nearest_Down_Sample_Tail, InterpolateL
::testing::Values(InferenceEngine::Layout::ANY),
::testing::ValuesIn(inShapes),
::testing::ValuesIn(targetShapesTailTest),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
InterpolateLayerTest::getTestCaseName);

} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ class InterpolateLayerCPUTest : public testing::WithParamInterface<InterpolateLa
std::vector<size_t> inputShape;
std::vector<size_t> targetShape;
Precision netPrecision;
std::tie(interpolateParams, netPrecision, inPrc, outPrc, inLayout, outLayout, inputShape, targetShape, targetDevice) = basicParamsSet;
std::map<std::string, std::string> additional_config;
std::tie(interpolateParams, netPrecision, inPrc, outPrc, inLayout, outLayout, inputShape,
targetShape, targetDevice, additional_config) = basicParamsSet;

ngraph::op::v4::Interpolate::InterpolateMode mode;
ngraph::op::v4::Interpolate::ShapeCalcMode shapeCalcMode;
Expand Down Expand Up @@ -239,6 +241,8 @@ const std::vector<fusingSpecificParams> interpolateFusingParamsSet{
fusingFakeQuantizePerChannelRelu,
};

std::map<std::string, std::string> additional_config = {};

std::vector<std::map<std::string, std::string>> filterAdditionalConfig() {
if (with_cpu_x86_avx512f()) {
return {
Expand All @@ -264,7 +268,8 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateNN_Layout_Test, InterpolateLayerCPUTest
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 21, 4, 4})),
::testing::Values(std::vector<size_t>({1, 21, 5, 6})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
::testing::ValuesIn(filterCPUInfoForDevice()),
::testing::ValuesIn(interpolateFusingParamsSet),
::testing::ValuesIn(filterAdditionalConfig())),
Expand All @@ -281,7 +286,8 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateLinearOnnx_Layout_Test, InterpolateLaye
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 21, 4, 4})),
::testing::Values(std::vector<size_t>({1, 21, 5, 6})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
::testing::ValuesIn(filterCPUInfoForDevice()),
::testing::ValuesIn(interpolateFusingParamsSet),
::testing::ValuesIn(filterAdditionalConfig())),
Expand All @@ -298,7 +304,8 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateLinear_Layout_Test, InterpolateLayerCPU
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 21, 4, 4})),
::testing::Values(std::vector<size_t>({1, 21, 5, 6})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
::testing::ValuesIn(filterCPUInfoForDevice()),
::testing::ValuesIn(interpolateFusingParamsSet),
::testing::ValuesIn(filterAdditionalConfig())),
Expand All @@ -315,7 +322,8 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateCubic_Layout_Test, InterpolateLayerCPUT
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 21, 4, 4})),
::testing::Values(std::vector<size_t>({1, 21, 5, 6})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
::testing::ValuesIn(filterCPUInfoForDevice()),
::testing::ValuesIn(interpolateFusingParamsSet),
::testing::ValuesIn(filterAdditionalConfig())),
Expand Down Expand Up @@ -388,7 +396,8 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateLinearOnnx5D_Layout_Test, InterpolateLa
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 21, 4, 4, 4})),
::testing::Values(std::vector<size_t>({1, 21, 5, 6, 2})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
::testing::ValuesIn(filterCPUInfoForDevice5D()),
::testing::ValuesIn(interpolateFusingParamsSet),
::testing::ValuesIn(filterAdditionalConfig())),
Expand All @@ -405,7 +414,8 @@ INSTANTIATE_TEST_CASE_P(smoke_InterpolateNN5D_Layout_Test, InterpolateLayerCPUTe
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 21, 4, 4, 4})),
::testing::Values(std::vector<size_t>({1, 21, 5, 6, 2})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(additional_config)),
::testing::ValuesIn(filterCPUInfoForDevice5D()),
::testing::ValuesIn(interpolateFusingParamsSet),
::testing::ValuesIn(filterAdditionalConfig())),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const std::vector<std::vector<float>> defaultScales = {
{1.f, 1.f, 2.f, 2.f}
};

std::map<std::string, std::string> additional_config = {};

const auto interpolateCasesWithoutNearest = ::testing::Combine(
::testing::ValuesIn(modesWithoutNearest),
::testing::ValuesIn(shapeCalculationMode),
Expand Down Expand Up @@ -115,7 +117,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Basic, InterpolateLayerTest, ::testing
::testing::Values(InferenceEngine::Layout::ANY),
::testing::ValuesIn(inShapes),
::testing::ValuesIn(targetShapes),
::testing::Values(CommonTestUtils::DEVICE_GPU)),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::Values(additional_config)),
InterpolateLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Nearest, InterpolateLayerTest, ::testing::Combine(
Expand All @@ -127,7 +130,8 @@ INSTANTIATE_TEST_CASE_P(smoke_Interpolate_Nearest, InterpolateLayerTest, ::testi
::testing::Values(InferenceEngine::Layout::ANY),
::testing::ValuesIn(inShapes),
::testing::ValuesIn(targetShapes),
::testing::Values(CommonTestUtils::DEVICE_GPU)),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::Values(additional_config)),
InterpolateLayerTest::getTestCaseName);

} // namespace

0 comments on commit f67061e

Please sign in to comment.