forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for MinMax, DepthToSpace (#105)
- Loading branch information
1 parent
9e8ae13
commit ab13bb4
Showing
3 changed files
with
100 additions
and
37 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
...ts/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/depth_to_space.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
#include <ngraph/opsets/opset3.hpp> | ||
|
||
#include "single_layer_tests/depth_to_space.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
using namespace ngraph::opset3; | ||
|
||
namespace { | ||
const std::vector<InferenceEngine::Precision> inputPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
//InferenceEngine::Precision::U8, | ||
//InferenceEngine::Precision::I16, | ||
}; | ||
|
||
const std::vector<DepthToSpace::DepthToSpaceMode> modes = { | ||
DepthToSpace::DepthToSpaceMode::BLOCKS_FIRST, | ||
DepthToSpace::DepthToSpaceMode::DEPTH_FIRST}; | ||
|
||
const std::vector<std::vector<size_t >> inputShapesBS2 = { | ||
{1, 4, 1, 1}, {1, 4, 2, 2}, {1, 4, 3, 3}, {2, 32, 3, 3}, {2, 16, 5, 4}, | ||
{1, 8, 1, 1, 1}, {1, 8, 2, 2, 2}, {1, 8, 3, 3, 3}, {2, 32, 3, 3, 3}, {2, 16, 5, 4, 6}}; | ||
|
||
const auto DepthToSpaceBS2 = ::testing::Combine( | ||
::testing::ValuesIn(inputShapesBS2), | ||
::testing::ValuesIn(inputPrecisions), | ||
::testing::ValuesIn(modes), | ||
::testing::Values(2), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P(DepthToSpaceBS2, DepthToSpaceLayerTest, DepthToSpaceBS2, DepthToSpaceLayerTest::getTestCaseName); | ||
|
||
const std::vector<std::vector<size_t >> inputShapesBS3 = { | ||
{1, 9, 1, 1}, {1, 9, 2, 2}, {1, 9, 3, 3}, {2, 36, 3, 3}, {2, 27, 5, 4}, | ||
{1, 27, 1, 1, 1}, {1, 27, 2, 2, 2}, {1, 27, 3, 3, 3}, {2, 108, 3, 3, 3}, {2, 54, 5, 4, 6}}; | ||
|
||
const auto DepthToSpaceBS3 = ::testing::Combine( | ||
::testing::ValuesIn(inputShapesBS3), | ||
::testing::ValuesIn(inputPrecisions), | ||
::testing::ValuesIn(modes), | ||
::testing::Values(3), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P(DepthToSpaceBS3, DepthToSpaceLayerTest, DepthToSpaceBS3, DepthToSpaceLayerTest::getTestCaseName); | ||
|
||
} // namespace |
37 changes: 0 additions & 37 deletions
37
...ctional/plugin/plaidml/shared_tests_instances/single_layer_tests/depth_to_space_smoke.cpp
This file was deleted.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
...s/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/minimum_maximum.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
#include "single_layer_tests/minimum_maximum.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
|
||
const std::vector<std::vector<std::vector<size_t>>> inShapes = { | ||
{{2}, {1}}, | ||
{{1, 1, 1, 3}, {1}}, | ||
{{1, 2, 4}, {1}}, | ||
{{1, 4, 4}, {1}}, | ||
{{1, 4, 4, 1}, {1}}, | ||
{{256, 56}, {256, 56}}, | ||
{{8, 1, 6, 1}, {7, 1, 5}}, | ||
}; | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
//InferenceEngine::Precision::FP16, | ||
}; | ||
|
||
const std::vector<ngraph::helpers::MinMaxOpType> opType = { | ||
ngraph::helpers::MinMaxOpType::MINIMUM, | ||
ngraph::helpers::MinMaxOpType::MAXIMUM, | ||
}; | ||
|
||
const std::vector<ngraph::helpers::InputLayerType> inputType = { | ||
ngraph::helpers::InputLayerType::CONSTANT, | ||
ngraph::helpers::InputLayerType::PARAMETER, | ||
}; | ||
|
||
INSTANTIATE_TEST_CASE_P(maximum, MaxMinLayerTest, | ||
::testing::Combine( | ||
::testing::ValuesIn(inShapes), | ||
::testing::ValuesIn(opType), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(inputType), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
MaxMinLayerTest::getTestCaseName); | ||
|
||
} // namespace |