From 0a71ada75e6670bac4290ff6cee5af54391e94aa Mon Sep 17 00:00:00 2001 From: Liubov Batanina Date: Tue, 10 Nov 2020 11:35:24 +0300 Subject: [PATCH] [IE TESTS] Replaced size_t with int64_t (#2699) * Replaced size_t with int64_t * Fix gpu plugin --- .../single_layer_tests/tile.cpp | 4 ++-- .../single_layer_tests/tile.cpp | 4 ++-- .../single_layer_tests/batch_to_space.hpp | 6 +++--- .../single_layer_tests/space_to_batch.hpp | 6 +++--- .../shared/include/single_layer_tests/split.hpp | 2 +- .../shared/include/single_layer_tests/tile.hpp | 2 +- .../src/single_layer_tests/batch_to_space.cpp | 6 ++++-- .../src/single_layer_tests/space_to_batch.cpp | 6 ++++-- .../shared/src/single_layer_tests/split.cpp | 3 ++- .../include/ngraph_functions/builders.hpp | 16 ++++++++-------- .../ngraph_functions/src/batch_to_space.cpp | 6 +++--- .../ngraph_functions/src/space_to_batch.cpp | 6 +++--- .../tests/ngraph_functions/src/split.cpp | 4 ++-- .../tests/ngraph_functions/src/tile.cpp | 2 +- 14 files changed, 39 insertions(+), 34 deletions(-) diff --git a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/tile.cpp b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/tile.cpp index 4adcded448d..182ff24f36f 100644 --- a/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/tile.cpp +++ b/inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/tile.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { InferenceEngine::Precision::FP32 }; -const std::vector> repeats = { +const std::vector> repeats = { {1, 2, 3}, {2, 1, 1}, {2, 3, 1}, @@ -35,7 +35,7 @@ INSTANTIATE_TEST_CASE_P(smoke_Tile, TileLayerTest, INSTANTIATE_TEST_CASE_P(smoke_Tile6d, TileLayerTest, ::testing::Combine( - ::testing::Values(std::vector({1, 1, 1, 2, 1, 2})), + ::testing::Values(std::vector({1, 1, 1, 2, 1, 2})), ::testing::ValuesIn(netPrecisions), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), diff --git a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/tile.cpp b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/tile.cpp index 9dc434fbf2c..3327e02be4c 100644 --- a/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/tile.cpp +++ b/inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/tile.cpp @@ -14,7 +14,7 @@ const std::vector netPrecisions = { InferenceEngine::Precision::FP32 }; -const std::vector> repeats = { +const std::vector> repeats = { {1, 2, 3}, {2, 1, 1}, {2, 3, 1}, @@ -35,7 +35,7 @@ INSTANTIATE_TEST_CASE_P(smoke_Tile, TileLayerTest, INSTANTIATE_TEST_CASE_P(smoke_Tile6d, TileLayerTest, ::testing::Combine( - ::testing::Values(std::vector({1, 1, 1, 2, 1, 2})), + ::testing::Values(std::vector({1, 1, 1, 2, 1, 2})), ::testing::ValuesIn(netPrecisions), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), ::testing::Values(InferenceEngine::Precision::UNSPECIFIED), diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp index d1711387a32..04dec5d8c79 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp @@ -14,9 +14,9 @@ namespace LayerTestsDefinitions { using batchToSpaceParamsTuple = typename std::tuple< - std::vector, // block shape - std::vector, // crops begin - std::vector, // crops end + std::vector, // block shape + std::vector, // crops begin + std::vector, // crops end std::vector, // Input shapes InferenceEngine::Precision, // Network precision InferenceEngine::Precision, // Input precision diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp index 5850ef4507b..3189e00fe1a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp @@ -14,9 +14,9 @@ namespace LayerTestsDefinitions { using spaceToBatchParamsTuple = typename std::tuple< - std::vector, // block_shape - std::vector, // pads_begin - std::vector, // pads_end + std::vector, // block_shape + std::vector, // pads_begin + std::vector, // pads_end std::vector, // Input shapes InferenceEngine::Precision, // Network precision InferenceEngine::Precision, // Input precision diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp index 2bc03006cb0..63216325226 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp @@ -16,7 +16,7 @@ namespace LayerTestsDefinitions { typedef std::tuple< size_t, // Num splits - size_t, // Axis + int64_t, // Axis InferenceEngine::Precision, // Net precision InferenceEngine::Precision, // Input precision InferenceEngine::Precision, // Output precision diff --git a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp index 4ed8b8284f5..704ae0d2faf 100644 --- a/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp @@ -14,7 +14,7 @@ namespace LayerTestsDefinitions { -typedef std::vector TileSpecificParams; +typedef std::vector TileSpecificParams; typedef std::tuple< TileSpecificParams, InferenceEngine::Precision, // Net precision diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp index 3c23ffbd500..c3938d2db38 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp @@ -21,7 +21,8 @@ namespace LayerTestsDefinitions { std::string BatchToSpaceLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { - std::vector inShapes, blockShape, cropsBegin, cropsEnd; + std::vector inShapes; + std::vector blockShape, cropsBegin, cropsEnd; InferenceEngine::Precision netPrc; InferenceEngine::Precision inPrc, outPrc; InferenceEngine::Layout inLayout, outLayout; @@ -43,7 +44,8 @@ std::string BatchToSpaceLayerTest::getTestCaseName(const testing::TestParamInfo< void BatchToSpaceLayerTest::SetUp() { SetRefMode(LayerTestsUtils::RefMode::INTERPRETER_TRANSFORMATIONS); - std::vector inputShape, blockShape, cropsBegin, cropsEnd; + std::vector inputShape; + std::vector blockShape, cropsBegin, cropsEnd; InferenceEngine::Precision netPrecision; std::tie(blockShape, cropsBegin, cropsEnd, inputShape, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = this->GetParam(); auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision); diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp index 970c4677ce9..d2b17821f96 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp @@ -21,7 +21,8 @@ namespace LayerTestsDefinitions { std::string SpaceToBatchLayerTest::getTestCaseName(const testing::TestParamInfo &obj) { - std::vector inShapes, blockShape, padsBegin, padsEnd; + std::vector inShapes; + std::vector blockShape, padsBegin, padsEnd; InferenceEngine::Precision netPrc; InferenceEngine::Precision inPrc, outPrc; InferenceEngine::Layout inLayout, outLayout; @@ -43,7 +44,8 @@ std::string SpaceToBatchLayerTest::getTestCaseName(const testing::TestParamInfo< void SpaceToBatchLayerTest::SetUp() { SetRefMode(LayerTestsUtils::RefMode::INTERPRETER_TRANSFORMATIONS); - std::vector inputShape, blockShape, padsBegin, padsEnd; + std::vector inputShape; + std::vector blockShape, padsBegin, padsEnd; InferenceEngine::Precision inputPrecision, netPrecision; std::tie(blockShape, padsBegin, padsEnd, inputShape, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = this->GetParam(); diff --git a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp index 2731afaa62d..b2a73675652 100644 --- a/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp +++ b/inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp @@ -22,7 +22,8 @@ namespace LayerTestsDefinitions { std::string SplitLayerTest::getTestCaseName(testing::TestParamInfo obj) { - size_t numSplits, axis; + size_t numSplits; + int64_t axis; InferenceEngine::Precision netPrecision; InferenceEngine::Precision inPrc, outPrc; InferenceEngine::Layout inLayout, outLayout; diff --git a/inference-engine/tests/ngraph_functions/include/ngraph_functions/builders.hpp b/inference-engine/tests/ngraph_functions/include/ngraph_functions/builders.hpp index cc445d77535..ad2d450f933 100644 --- a/inference-engine/tests/ngraph_functions/include/ngraph_functions/builders.hpp +++ b/inference-engine/tests/ngraph_functions/include/ngraph_functions/builders.hpp @@ -188,7 +188,7 @@ std::shared_ptr makeBinaryConvolution(const ngraph::Output & std::shared_ptr makeSplit(const ngraph::Output &in, const element::Type &type, size_t numSplits, - size_t axis); + int64_t axis); std::shared_ptr makeVariadicSplit(const ngraph::Output &in, const std::vector numSplits, @@ -210,15 +210,15 @@ std::shared_ptr makeEltwise(const ngraph::Output &in0, std::shared_ptr makeBatchToSpace(const ngraph::Output &in, const element::Type &type, - const std::vector &blockShape, - const std::vector &cropsBegin, - const std::vector &cropsEnd); + const std::vector &blockShape, + const std::vector &cropsBegin, + const std::vector &cropsEnd); std::shared_ptr makeSpaceToBatch(const ngraph::Output &in, const element::Type &type, - const std::vector &blockShape, - const std::vector &padsBegin, - const std::vector &padsEnd); + const std::vector &blockShape, + const std::vector &padsBegin, + const std::vector &padsEnd); std::shared_ptr makeStridedSlice(const ngraph::Output &in, const std::vector &begin, @@ -438,7 +438,7 @@ std::shared_ptr makeGatherND( const std::size_t batchDims); std::shared_ptr makeTile(const ngraph::Output& in, - const std::vector& repeats); + const std::vector& repeats); std::shared_ptr makeNormalizeL2(const ngraph::Output& data, const std::vector& axes, diff --git a/inference-engine/tests/ngraph_functions/src/batch_to_space.cpp b/inference-engine/tests/ngraph_functions/src/batch_to_space.cpp index 6ce6860534b..6157df3c25e 100644 --- a/inference-engine/tests/ngraph_functions/src/batch_to_space.cpp +++ b/inference-engine/tests/ngraph_functions/src/batch_to_space.cpp @@ -9,9 +9,9 @@ namespace ngraph { namespace builder { std::shared_ptr makeBatchToSpace(const ngraph::Output &in, const element::Type &type, - const std::vector &blockShape, - const std::vector &cropsBegin, - const std::vector &cropsEnd) { + const std::vector &blockShape, + const std::vector &cropsBegin, + const std::vector &cropsEnd) { ngraph::Shape constShape = {in.get_shape().size()}; auto blockShapeNode = std::make_shared(ngraph::element::i64, constShape, blockShape.data()); diff --git a/inference-engine/tests/ngraph_functions/src/space_to_batch.cpp b/inference-engine/tests/ngraph_functions/src/space_to_batch.cpp index 9e6b628ba3f..b140a58e21e 100644 --- a/inference-engine/tests/ngraph_functions/src/space_to_batch.cpp +++ b/inference-engine/tests/ngraph_functions/src/space_to_batch.cpp @@ -8,9 +8,9 @@ namespace ngraph { namespace builder { std::shared_ptr makeSpaceToBatch(const ngraph::Output &in, const element::Type &type, - const std::vector &blockShape, - const std::vector &padsBegin, - const std::vector &padsEnd) { + const std::vector &blockShape, + const std::vector &padsBegin, + const std::vector &padsEnd) { ngraph::Shape constShape = {in.get_shape().size()}; auto blockShapeNode = std::make_shared(ngraph::element::i64, constShape, blockShape.data()); diff --git a/inference-engine/tests/ngraph_functions/src/split.cpp b/inference-engine/tests/ngraph_functions/src/split.cpp index afdcd75c2ba..64929731ce4 100644 --- a/inference-engine/tests/ngraph_functions/src/split.cpp +++ b/inference-engine/tests/ngraph_functions/src/split.cpp @@ -12,9 +12,9 @@ namespace builder { std::shared_ptr makeSplit(const ngraph::Output &in, const element::Type &type, size_t numSplits, - size_t axis) { + int64_t axis) { auto splitAxisOp = std::make_shared(ngraph::element::Type_t::i64, ngraph::Shape{}, - std::vector{axis}); + std::vector{axis}); auto splitNode = std::make_shared(in, splitAxisOp, numSplits); return splitNode; } diff --git a/inference-engine/tests/ngraph_functions/src/tile.cpp b/inference-engine/tests/ngraph_functions/src/tile.cpp index 3e8e58c9fb9..14016fea14c 100644 --- a/inference-engine/tests/ngraph_functions/src/tile.cpp +++ b/inference-engine/tests/ngraph_functions/src/tile.cpp @@ -8,7 +8,7 @@ namespace ngraph { namespace builder { std::shared_ptr makeTile(const ngraph::Output& in, - const std::vector& repeats) { + const std::vector& repeats) { auto repeatsNode = std::make_shared(ngraph::element::i64, std::vector{repeats.size()}, repeats); auto tileNode = std::make_shared(in, repeatsNode); return tileNode;