Build all (Multiple target shape inputs removed)

This commit is contained in:
Steve Yoo 2021-09-28 19:06:16 +09:00
parent dd3d17c85f
commit 4c5eb0f8f4
11 changed files with 56 additions and 53 deletions

View File

@ -82,11 +82,7 @@ INSTANTIATE_TEST_SUITE_P(Convolution2D_ExplicitPaddingDynamicShape, ConvolutionL
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>( ::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(
{{{1, 10}, {3, 30}, {30, 300}, {30, 300}}})), {{{1, 10}, {3, 30}, {30, 300}, {30, 300}}})),
::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}}}), ::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}}}),
std::vector<std::vector<std::vector<size_t>>>({{{2, 4, 31, 31}}}), std::vector<std::vector<std::vector<size_t>>>({{{2, 4, 31, 31}}})),
std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}},
{{2, 4, 31, 31}}}),
std::vector<std::vector<std::vector<size_t>>>({{{2, 4, 31, 31}},
{{1, 3, 30, 30}}})),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)), ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
// ! [test_convolution:instantiate] // ! [test_convolution:instantiate]

View File

@ -44,7 +44,8 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 3, 30, 30})), ::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}}})),
::testing::Values(CommonTestUtils::DEVICE_CPU)), ::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -56,7 +57,8 @@ INSTANTIATE_TEST_SUITE_P(
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>({1, 3, 30, 30})), ::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}}})),
::testing::Values(CommonTestUtils::DEVICE_CPU)), ::testing::Values(CommonTestUtils::DEVICE_CPU)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
} // namespace } // namespace

View File

@ -22,6 +22,7 @@ const std::vector<InferenceEngine::Layout> inputLayouts2D = {
const std::vector<std::vector<std::vector<std::pair<size_t, size_t>>>> inputStaticShape2D = { const std::vector<std::vector<std::vector<std::pair<size_t, size_t>>>> inputStaticShape2D = {
{NULL_RANGE} {NULL_RANGE}
}; };
const std::vector<std::vector<std::vector<InferenceEngine::SizeVector>>> inputShapes2D = { const std::vector<std::vector<std::vector<InferenceEngine::SizeVector>>> inputShapes2D = {
{{InferenceEngine::SizeVector{1, 100}}}, {{InferenceEngine::SizeVector{1, 100}}},
{{InferenceEngine::SizeVector{100, 1}}}, {{InferenceEngine::SizeVector{100, 1}}},

View File

@ -47,9 +47,9 @@ const std::vector<std::vector<ptrdiff_t>> padEndsH1 = {{1, 0},
{1, 3}}; {1, 3}};
const std::vector<std::vector<size_t >> dilationsH1 = {{1, 1}, const std::vector<std::vector<size_t >> dilationsH1 = {{1, 1},
{1, 3}}; {1, 3}};
const std::vector<std::vector<size_t>> inputShapesH1 = {{1, 1, 1, 32}, const std::vector<std::vector<std::vector<std::vector<size_t>>>> inputShapesH1 = {{{{1, 1, 1, 32},
{1, 32, 1, 160}, {1, 32, 1, 160},
{1, 8, 1, 64}}; {1, 8, 1, 64}}}};
const std::vector<std::vector<size_t >> kernelsW1 = {{3, 1}, const std::vector<std::vector<size_t >> kernelsW1 = {{3, 1},
{5, 1}}; {5, 1}};
const std::vector<std::vector<size_t >> stridesW1 = {{1, 1}, const std::vector<std::vector<size_t >> stridesW1 = {{1, 1},
@ -60,9 +60,9 @@ const std::vector<std::vector<ptrdiff_t>> padEndsW1 = {{0, 1},
{3, 1}}; {3, 1}};
const std::vector<std::vector<size_t >> dilationsW1 = {{1, 1}, const std::vector<std::vector<size_t >> dilationsW1 = {{1, 1},
{3, 1}}; {3, 1}};
const std::vector<std::vector<size_t>> inputShapesW1 = {{1, 1, 32, 1}, const std::vector<std::vector<std::vector<std::vector<size_t>>>> inputShapesW1 = {{{{1, 1, 32, 1},
{1, 32, 160, 1}, {1, 32, 160, 1},
{1, 8, 64, 1}}; {1, 8, 64, 1}}}};
const std::vector<size_t> numOutCannels = {4, 8, 12}; const std::vector<size_t> numOutCannels = {4, 8, 12};
const std::vector<std::vector<size_t >> kernels2D = { const std::vector<std::vector<size_t >> kernels2D = {
@ -85,11 +85,11 @@ const std::vector<std::vector<size_t >> dilations2D = { {1, 1},
}; };
const std::vector<size_t> numOutCannels2D = { 8, 16, 32}; const std::vector<size_t> numOutCannels2D = { 8, 16, 32};
const std::vector<size_t> input2DNCHW = { 1, 8, 20, 16 }; const std::vector<std::vector<std::vector<size_t>>> input2DNCHW = {{{1, 8, 20, 16}}};
const std::vector<std::vector<size_t>> inputShapesMapTo1d = {{1, 1, 56, 5}, const std::vector<std::vector<std::vector<std::vector<size_t>>>> inputShapesMapTo1d = {{{{1, 1, 56, 5},
{1, 32, 56, 5}, {1, 32, 56, 5},
{1, 2, 64, 5}}; {1, 2, 64, 5}}}};
const auto conv2DParams_Kernels2D = ::testing::Combine( const auto conv2DParams_Kernels2D = ::testing::Combine(
::testing::ValuesIn(kernels2D), ::testing::ValuesIn(kernels2D),
@ -155,6 +155,7 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Convolution2D_ExplicitPadding_Height1, C
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::ValuesIn(inputShapesH1), ::testing::ValuesIn(inputShapesH1),
::testing::Values(CommonTestUtils::DEVICE_GNA)), ::testing::Values(CommonTestUtils::DEVICE_GNA)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -167,6 +168,7 @@ INSTANTIATE_TEST_SUITE_P(DISABLED_smoke_Convolution2D_ExplicitPadding_Width1, Co
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::ValuesIn(inputShapesW1), ::testing::ValuesIn(inputShapesW1),
::testing::Values(CommonTestUtils::DEVICE_GNA)), ::testing::Values(CommonTestUtils::DEVICE_GNA)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -179,6 +181,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_AutoPadValid_Height1, ConvolutionLa
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::ValuesIn(inputShapesH1), ::testing::ValuesIn(inputShapesH1),
::testing::Values(CommonTestUtils::DEVICE_GNA)), ::testing::Values(CommonTestUtils::DEVICE_GNA)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -191,6 +194,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_AutoPadValid_Width1, ConvolutionLay
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::ValuesIn(inputShapesW1), ::testing::ValuesIn(inputShapesW1),
::testing::Values(CommonTestUtils::DEVICE_GNA)), ::testing::Values(CommonTestUtils::DEVICE_GNA)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -203,6 +207,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_AutoPadValid_MapTo1d, ConvolutionLa
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::ValuesIn(inputShapesMapTo1d), ::testing::ValuesIn(inputShapesMapTo1d),
::testing::Values(CommonTestUtils::DEVICE_GNA)), ::testing::Values(CommonTestUtils::DEVICE_GNA)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -215,6 +220,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_Kernels2D, GnaConvolutionLayerTest,
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::Values(input2DNCHW), ::testing::Values(input2DNCHW),
::testing::Values(CommonTestUtils::DEVICE_GNA)), ::testing::Values(CommonTestUtils::DEVICE_GNA)),
GnaConvolutionLayerTest::getTestCaseName); GnaConvolutionLayerTest::getTestCaseName);

View File

@ -53,14 +53,16 @@ const std::vector<std::vector<size_t >> dilations2DInvalid = { {2, 2},
const std::vector<size_t> numOutChannels2D = { 32 }; const std::vector<size_t> numOutChannels2D = { 32 };
const std::vector<size_t> numOutChannels2DInvalid = { 1, 7, 9, 400 }; const std::vector<size_t> numOutChannels2DInvalid = { 1, 7, 9, 400 };
const std::vector<std::vector<size_t>> input2DNCHWFine = { { 1, 8, 20, 16 } }; const std::vector<std::vector<std::vector<std::vector<size_t>>>> input2DNCHWFine = {{{{1, 8, 20, 16}}}};
const std::vector<std::vector<size_t>> input2DNCHWInvalidInputC = { const std::vector<std::vector<std::vector<std::vector<size_t>>>> input2DNCHWInvalidInputC = {{{
{1, 7, 20, 16}, {1, 7, 20, 16},
{1, 9, 20, 16}, {1, 9, 20, 16},
{ 1, 400, 20, 16 } }; {1, 400, 20, 16}}}};
const std::vector<std::vector<size_t>> input2DNCHWInvalidInputH = { { 1, 8, 15, 16 }, { 1, 8, 400, 16 } }; const std::vector<std::vector<std::vector<std::vector<size_t>>>> input2DNCHWInvalidInputH = {
const std::vector<std::vector<size_t>> input2DNCHWInvalidInputW = { { 1, 8, 20, 14 }, { 1, 8, 20, 400 } }; {{{1, 8, 15, 16}, {1, 8, 400, 16}}}};
const std::vector<std::vector<std::vector<std::vector<size_t>>>> input2DNCHWInvalidInputW = {
{{{1, 8, 20, 14}, {1, 8, 20, 400}}}};
const auto conv2DParametersFine = ::testing::Combine( const auto conv2DParametersFine = ::testing::Combine(
::testing::ValuesIn(kernels2D), ::testing::ValuesIn(kernels2D),
@ -159,6 +161,7 @@ INSTANTIATE_TEST_SUITE_P(smoke_GnaConv2DNegativeTestInvalid##whats_wrong, GnaCon
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), \ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), \
::testing::Values(InferenceEngine::Layout::ANY), \ ::testing::Values(InferenceEngine::Layout::ANY), \
::testing::Values(InferenceEngine::Layout::ANY), \ ::testing::Values(InferenceEngine::Layout::ANY), \
::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)), \
::testing::ValuesIn(input2DNCHW##suffix_input), \ ::testing::ValuesIn(input2DNCHW##suffix_input), \
::testing::Values(CommonTestUtils::DEVICE_GNA)), \ ::testing::Values(CommonTestUtils::DEVICE_GNA)), \
GnaConv2DNegativeTest##whats_wrong::getTestCaseName); GnaConv2DNegativeTest##whats_wrong::getTestCaseName);

View File

@ -58,7 +58,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_ExplicitPadding, ConvolutionLayerTe
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t >({1, 3, 30, 30})), ::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}}})),
::testing::Values(CommonTestUtils::DEVICE_GPU)), ::testing::Values(CommonTestUtils::DEVICE_GPU)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
@ -70,7 +71,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution2D_AutoPadValid, ConvolutionLayerTest,
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t >({1, 3, 30, 30})), ::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 30, 30}}})),
::testing::Values(CommonTestUtils::DEVICE_GPU)), ::testing::Values(CommonTestUtils::DEVICE_GPU)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
/* ============= 3D Convolution ============= */ /* ============= 3D Convolution ============= */
@ -105,7 +107,8 @@ INSTANTIATE_TEST_SUITE_P(smoke_Convolution3D_Basic1, ConvolutionLayerTest,
::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY), ::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t >({1, 3, 10, 10, 10})), ::testing::Values(std::vector<std::vector<std::pair<size_t, size_t>>>(NULL_RANGE)),
::testing::Values(std::vector<std::vector<std::vector<size_t>>>({{{1, 3, 10, 10, 10}}})),
::testing::Values(CommonTestUtils::DEVICE_GPU)), ::testing::Values(CommonTestUtils::DEVICE_GPU)),
ConvolutionLayerTest::getTestCaseName); ConvolutionLayerTest::getTestCaseName);
} // namespace } // namespace

View File

@ -19,10 +19,14 @@ const std::vector<InferenceEngine::Layout> inputLayouts2D = {
InferenceEngine::Layout::NC, InferenceEngine::Layout::NC,
}; };
const std::vector<InferenceEngine::SizeVector> inputShapes2D = { const std::vector<std::vector<std::vector<std::pair<size_t, size_t>>>> inputStaticShape2D = {
InferenceEngine::SizeVector {1, 100}, {NULL_RANGE}
InferenceEngine::SizeVector {100, 1}, };
InferenceEngine::SizeVector {10, 10},
const std::vector<std::vector<std::vector<InferenceEngine::SizeVector>>> inputShapes2D = {
{{InferenceEngine::SizeVector{1, 100}}},
{{InferenceEngine::SizeVector{100, 1}}},
{{InferenceEngine::SizeVector{10, 10}}},
}; };
const std::vector<size_t> axis2D = { const std::vector<size_t> axis2D = {
@ -35,6 +39,7 @@ const auto params2D = testing::Combine(
testing::Values(InferenceEngine::Precision::UNSPECIFIED), testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::ValuesIn(inputLayouts2D), testing::ValuesIn(inputLayouts2D),
testing::Values(InferenceEngine::Layout::ANY), testing::Values(InferenceEngine::Layout::ANY),
testing::ValuesIn(inputStaticShape2D),
testing::ValuesIn(inputShapes2D), testing::ValuesIn(inputShapes2D),
testing::ValuesIn(axis2D), testing::ValuesIn(axis2D),
testing::Values(CommonTestUtils::DEVICE_GPU), testing::Values(CommonTestUtils::DEVICE_GPU),
@ -48,10 +53,14 @@ INSTANTIATE_TEST_SUITE_P(
SoftMaxLayerTest::getTestCaseName SoftMaxLayerTest::getTestCaseName
); );
const std::vector<InferenceEngine::SizeVector> inputShapes4D = { const std::vector<std::vector<std::vector<std::pair<size_t, size_t>>>> inputStaticShape4D = {
InferenceEngine::SizeVector {1, 100, 1, 1}, {NULL_RANGE}
InferenceEngine::SizeVector {1, 3, 4, 3}, };
InferenceEngine::SizeVector {2, 3, 4, 5},
const std::vector<std::vector<std::vector<InferenceEngine::SizeVector>>> inputShapes4D = {
{{InferenceEngine::SizeVector{1, 100, 1, 1}}},
{{InferenceEngine::SizeVector{1, 3, 4, 3}}},
{{InferenceEngine::SizeVector{2, 3, 4, 5}}},
}; };
const std::vector<size_t> axis4D = {0, 1, 2, 3}; const std::vector<size_t> axis4D = {0, 1, 2, 3};
@ -62,6 +71,7 @@ const auto params4D = testing::Combine(
testing::Values(InferenceEngine::Precision::UNSPECIFIED), testing::Values(InferenceEngine::Precision::UNSPECIFIED),
testing::Values(InferenceEngine::Layout::NCHW), testing::Values(InferenceEngine::Layout::NCHW),
testing::Values(InferenceEngine::Layout::ANY), testing::Values(InferenceEngine::Layout::ANY),
testing::ValuesIn(inputStaticShape4D),
testing::ValuesIn(inputShapes4D), testing::ValuesIn(inputShapes4D),
testing::ValuesIn(axis4D), testing::ValuesIn(axis4D),
testing::Values(CommonTestUtils::DEVICE_GPU), testing::Values(CommonTestUtils::DEVICE_GPU),

View File

@ -155,8 +155,6 @@ protected:
virtual void setTargetStaticShape(std::vector<ngraph::Shape>& desiredTargetStaticShape) {} virtual void setTargetStaticShape(std::vector<ngraph::Shape>& desiredTargetStaticShape) {}
virtual bool updateFunctionRefs() {return false;}
virtual void Validate(); virtual void Validate();
virtual std::vector<std::pair<ngraph::element::Type, std::vector<std::uint8_t>>> CalculateRefs(); virtual std::vector<std::pair<ngraph::element::Type, std::vector<std::uint8_t>>> CalculateRefs();

View File

@ -46,7 +46,6 @@ protected:
void SetUp() override; void SetUp() override;
std::shared_ptr<ngraph::Function> makeConvolution(const std::string& name = ""); std::shared_ptr<ngraph::Function> makeConvolution(const std::string& name = "");
void setTargetStaticShape(std::vector<ngraph::Shape>& desiredTargetStaticShape) override; void setTargetStaticShape(std::vector<ngraph::Shape>& desiredTargetStaticShape) override;
bool updateFunctionRefs() override;
private: private:
InferenceEngine::Precision::ePrecision netPrecision = InferenceEngine::Precision::UNSPECIFIED; InferenceEngine::Precision::ePrecision netPrecision = InferenceEngine::Precision::UNSPECIFIED;

View File

@ -49,7 +49,6 @@ void LayerTestsCommon::Run() {
LoadNetwork(); LoadNetwork();
for (auto&& tss : targetStaticShapes) { for (auto&& tss : targetStaticShapes) {
setTargetStaticShape(tss); setTargetStaticShape(tss);
updateFunctionRefs();
GenerateInputs(); GenerateInputs();
Infer(); Infer();
Validate(); Validate();

View File

@ -88,18 +88,4 @@ void ConvolutionLayerTest::setTargetStaticShape(std::vector<ngraph::Shape>& desi
targetStaticShape = desiredTargetStaticShape; targetStaticShape = desiredTargetStaticShape;
} }
bool ConvolutionLayerTest::updateFunctionRefs() {
auto params = functionRefs->get_parameters()[0];
if (!params) {
return false;
}
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
auto params_new = std::make_shared<ngraph::opset1::Parameter>(ngPrc, targetStaticShape.front());
params_new->set_friendly_name(params->get_friendly_name());
ngraph::copy_runtime_info(params, params_new);
ngraph::replace_node(params, params_new);
functionRefs->validate_nodes_and_infer_types();
return true;
}
} // namespace LayerTestsDefinitions } // namespace LayerTestsDefinitions