Skip to content

Commit

Permalink
Revise Split Single Layer Tests (openvinotoolkit#5190)
Browse files Browse the repository at this point in the history
* Add serialization single layer tests

* Add more precisions, axis and num of splits in single layer tests

* Add op to script of trusted operations
  • Loading branch information
ggalieroc authored and liubo-intel committed Apr 22, 2021
1 parent 791190d commit d711f5d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include <vector>

#include "shared_test_classes/single_layer/split.hpp"

using namespace LayerTestsDefinitions;

namespace {

TEST_P(SplitLayerTest, Serialize) {
Serialize();
}

const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U16,
InferenceEngine::Precision::BOOL};

INSTANTIATE_TEST_CASE_P(
smoke_Split_Serialization, SplitLayerTest,
::testing::Combine(
::testing::Values(1, 2, 5, 10),
::testing::Values(0, 1, 2, 3),
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(InferenceEngine::Layout::ANY),
::testing::Values(std::vector<size_t>{20, 30, 50, 50}),
::testing::Values(std::vector<size_t>({})),
::testing::Values(CommonTestUtils::DEVICE_CPU)),
SplitLayerTest::getTestCaseName
);

} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ namespace {

const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP32,
InferenceEngine::Precision::FP16
InferenceEngine::Precision::FP16,
InferenceEngine::Precision::I32,
InferenceEngine::Precision::U8
};

INSTANTIATE_TEST_CASE_P(smoke_NumSplitsCheck, SplitLayerTest,
::testing::Combine(
::testing::Values(1),
::testing::Values(1, 2, 3, 5),
::testing::Values(0, 1, 2, 3),
::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
'Sin-0',
'SoftPlus-4',
'Softmax-1',
'Split-1',
'StridedSlice-1',
'Substract-1',
'Swish-4',
Expand Down

0 comments on commit d711f5d

Please sign in to comment.