[IE TESTS] Replaced size_t with int64_t (#2699)

* Replaced size_t with int64_t

* Fix gpu plugin
This commit is contained in:
Liubov Batanina 2020-11-10 11:35:24 +03:00 committed by GitHub
parent be065c0144
commit 0a71ada75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 39 additions and 34 deletions

View 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),

View 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),

View 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

View 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

View 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

View 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

View 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);

View 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();

View 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;

View 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,

View 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());

View 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());

View 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;
}

View 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;