[IE TESTS] Replaced size_t with int64_t (#2699)
authorLiubov Batanina <liubov.batanina@intel.com>
Tue, 10 Nov 2020 08:35:24 +0000 (11:35 +0300)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 08:35:24 +0000 (11:35 +0300)
* Replaced size_t with int64_t

* Fix gpu plugin

14 files changed:
inference-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/tile.cpp
inference-engine/tests/functional/plugin/gpu/shared_tests_instances/single_layer_tests/tile.cpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/batch_to_space.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/space_to_batch.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/split.hpp
inference-engine/tests/functional/plugin/shared/include/single_layer_tests/tile.hpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/batch_to_space.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/space_to_batch.cpp
inference-engine/tests/functional/plugin/shared/src/single_layer_tests/split.cpp
inference-engine/tests/ngraph_functions/include/ngraph_functions/builders.hpp
inference-engine/tests/ngraph_functions/src/batch_to_space.cpp
inference-engine/tests/ngraph_functions/src/space_to_batch.cpp
inference-engine/tests/ngraph_functions/src/split.cpp
inference-engine/tests/ngraph_functions/src/tile.cpp

index 4adcded..182ff24 100644 (file)
@@ -14,7 +14,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
         InferenceEngine::Precision::FP32
 };
 
-const std::vector<std::vector<size_t>> repeats = {
+const std::vector<std::vector<int64_t>> 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<size_t>({1, 1, 1, 2, 1, 2})),
+                ::testing::Values(std::vector<int64_t>({1, 1, 1, 2, 1, 2})),
                 ::testing::ValuesIn(netPrecisions),
                 ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
                 ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
index 9dc434f..3327e02 100644 (file)
@@ -14,7 +14,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
         InferenceEngine::Precision::FP32
 };
 
-const std::vector<std::vector<size_t>> repeats = {
+const std::vector<std::vector<int64_t>> 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<size_t>({1, 1, 1, 2, 1, 2})),
+                ::testing::Values(std::vector<int64_t>({1, 1, 1, 2, 1, 2})),
                 ::testing::ValuesIn(netPrecisions),
                 ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
                 ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
index d171138..04dec5d 100644 (file)
@@ -14,9 +14,9 @@
 namespace LayerTestsDefinitions {
 
 using batchToSpaceParamsTuple = typename std::tuple<
-        std::vector<size_t>,               // block shape
-        std::vector<size_t>,               // crops begin
-        std::vector<size_t>,               // crops end
+        std::vector<int64_t>,              // block shape
+        std::vector<int64_t>,              // crops begin
+        std::vector<int64_t>,              // crops end
         std::vector<size_t>,               // Input shapes
         InferenceEngine::Precision,        // Network precision
         InferenceEngine::Precision,        // Input precision
index 5850ef4..3189e00 100644 (file)
@@ -14,9 +14,9 @@
 namespace LayerTestsDefinitions {
 
 using spaceToBatchParamsTuple = typename std::tuple<
-        std::vector<size_t>,               // block_shape
-        std::vector<size_t>,               // pads_begin
-        std::vector<size_t>,               // pads_end
+        std::vector<int64_t>,               // block_shape
+        std::vector<int64_t>,               // pads_begin
+        std::vector<int64_t>,               // pads_end
         std::vector<size_t>,               // Input shapes
         InferenceEngine::Precision,        // Network precision
         InferenceEngine::Precision,        // Input precision
index 2bc0300..6321632 100644 (file)
@@ -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
index 4ed8b82..704ae0d 100644 (file)
@@ -14,7 +14,7 @@
 
 namespace LayerTestsDefinitions {
 
-typedef std::vector<size_t> TileSpecificParams;
+typedef std::vector<int64_t> TileSpecificParams;
 typedef std::tuple<
         TileSpecificParams,
         InferenceEngine::Precision,    // Net precision
index 3c23ffb..c3938d2 100644 (file)
@@ -21,7 +21,8 @@
 namespace LayerTestsDefinitions {
 
 std::string BatchToSpaceLayerTest::getTestCaseName(const testing::TestParamInfo<batchToSpaceParamsTuple> &obj) {
-    std::vector<size_t> inShapes, blockShape, cropsBegin, cropsEnd;
+    std::vector<size_t> inShapes;
+    std::vector<int64_t> 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<size_t> inputShape, blockShape, cropsBegin, cropsEnd;
+    std::vector<size_t> inputShape;
+    std::vector<int64_t> 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);
index 970c467..d2b1782 100644 (file)
@@ -21,7 +21,8 @@
 namespace LayerTestsDefinitions {
 
 std::string SpaceToBatchLayerTest::getTestCaseName(const testing::TestParamInfo<spaceToBatchParamsTuple> &obj) {
-    std::vector<size_t> inShapes, blockShape, padsBegin, padsEnd;
+    std::vector<size_t> inShapes;
+    std::vector<int64_t> 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<size_t> inputShape, blockShape, padsBegin, padsEnd;
+    std::vector<size_t> inputShape;
+    std::vector<int64_t> blockShape, padsBegin, padsEnd;
     InferenceEngine::Precision inputPrecision, netPrecision;
     std::tie(blockShape, padsBegin, padsEnd, inputShape, netPrecision, inPrc, outPrc, inLayout, outLayout, targetDevice) = this->GetParam();
 
index 2731afa..b2a7367 100644 (file)
@@ -22,7 +22,8 @@
 namespace LayerTestsDefinitions {
 
 std::string SplitLayerTest::getTestCaseName(testing::TestParamInfo<splitParams> obj) {
-    size_t numSplits, axis;
+    size_t numSplits;
+    int64_t axis;
     InferenceEngine::Precision netPrecision;
     InferenceEngine::Precision inPrc, outPrc;
     InferenceEngine::Layout inLayout, outLayout;
index cc445d7..ad2d450 100644 (file)
@@ -188,7 +188,7 @@ std::shared_ptr<ngraph::Node> makeBinaryConvolution(const ngraph::Output<Node> &
 std::shared_ptr<ngraph::Node> makeSplit(const ngraph::Output<Node> &in,
                                         const element::Type &type,
                                         size_t numSplits,
-                                        size_t axis);
+                                        int64_t axis);
 
 std::shared_ptr<ngraph::Node> makeVariadicSplit(const ngraph::Output<Node> &in,
                                                 const std::vector<size_t> numSplits,
@@ -210,15 +210,15 @@ std::shared_ptr<ngraph::Node> makeEltwise(const ngraph::Output<Node> &in0,
 
 std::shared_ptr<ngraph::Node> makeBatchToSpace(const ngraph::Output<Node> &in,
                                                const element::Type &type,
-                                               const std::vector<size_t> &blockShape,
-                                               const std::vector<size_t> &cropsBegin,
-                                               const std::vector<size_t> &cropsEnd);
+                                               const std::vector<int64_t> &blockShape,
+                                               const std::vector<int64_t> &cropsBegin,
+                                               const std::vector<int64_t> &cropsEnd);
 
 std::shared_ptr<ngraph::Node> makeSpaceToBatch(const ngraph::Output<Node> &in,
                                                const element::Type &type,
-                                               const std::vector<size_t> &blockShape,
-                                               const std::vector<size_t> &padsBegin,
-                                               const std::vector<size_t> &padsEnd);
+                                               const std::vector<int64_t> &blockShape,
+                                               const std::vector<int64_t> &padsBegin,
+                                               const std::vector<int64_t> &padsEnd);
 
 std::shared_ptr<ngraph::Node> makeStridedSlice(const ngraph::Output<Node> &in,
                                                const std::vector<int64_t> &begin,
@@ -438,7 +438,7 @@ std::shared_ptr<ngraph::Node> makeGatherND(
                                       const std::size_t batchDims);
 
 std::shared_ptr<ngraph::Node> makeTile(const ngraph::Output<Node>& in,
-                                       const std::vector<size_t>& repeats);
+                                       const std::vector<int64_t>& repeats);
 
 std::shared_ptr<ngraph::Node> makeNormalizeL2(const ngraph::Output<Node>& data,
                                               const std::vector<int64_t>& axes,
index 6ce6860..6157df3 100644 (file)
@@ -9,9 +9,9 @@ namespace ngraph {
 namespace builder {
 std::shared_ptr<ngraph::Node> makeBatchToSpace(const ngraph::Output<Node> &in,
                                                const element::Type &type,
-                                               const std::vector<size_t> &blockShape,
-                                               const std::vector<size_t> &cropsBegin,
-                                               const std::vector<size_t> &cropsEnd) {
+                                               const std::vector<int64_t> &blockShape,
+                                               const std::vector<int64_t> &cropsBegin,
+                                               const std::vector<int64_t> &cropsEnd) {
     ngraph::Shape constShape = {in.get_shape().size()};
     auto blockShapeNode = std::make_shared<ngraph::opset1::Constant>(ngraph::element::i64, constShape,
                                                                      blockShape.data());
index 9e6b628..b140a58 100644 (file)
@@ -8,9 +8,9 @@ namespace ngraph {
 namespace builder {
 std::shared_ptr<ngraph::Node> makeSpaceToBatch(const ngraph::Output<Node> &in,
                                                const element::Type &type,
-                                               const std::vector<size_t> &blockShape,
-                                               const std::vector<size_t> &padsBegin,
-                                               const std::vector<size_t> &padsEnd) {
+                                               const std::vector<int64_t> &blockShape,
+                                               const std::vector<int64_t> &padsBegin,
+                                               const std::vector<int64_t> &padsEnd) {
     ngraph::Shape constShape = {in.get_shape().size()};
     auto blockShapeNode = std::make_shared<ngraph::opset1::Constant>(ngraph::element::i64, constShape,
                                                                      blockShape.data());
index afdcd75..6492973 100644 (file)
@@ -12,9 +12,9 @@ namespace builder {
 std::shared_ptr<ngraph::Node> makeSplit(const ngraph::Output<Node> &in,
                                         const element::Type &type,
                                         size_t numSplits,
-                                        size_t axis) {
+                                        int64_t axis) {
     auto splitAxisOp = std::make_shared<ngraph::opset1::Constant>(ngraph::element::Type_t::i64, ngraph::Shape{},
-                                                                  std::vector<uint64_t>{axis});
+                                                                  std::vector<int64_t>{axis});
     auto splitNode = std::make_shared<ngraph::opset1::Split>(in, splitAxisOp, numSplits);
     return splitNode;
 }
index 3e8e58c..14016fe 100644 (file)
@@ -8,7 +8,7 @@ namespace ngraph {
 namespace builder {
 
 std::shared_ptr<ngraph::Node> makeTile(const ngraph::Output<Node>& in,
-                                       const std::vector<size_t>& repeats) {
+                                       const std::vector<int64_t>& repeats) {
     auto repeatsNode = std::make_shared<ngraph::opset1::Constant>(ngraph::element::i64, std::vector<size_t>{repeats.size()}, repeats);
     auto tileNode = std::make_shared<ngraph::opset1::Tile>(in, repeatsNode);
     return tileNode;