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.
* Attempt to add tests back * Change op name for logical_and to match tests * Add Tests for *Convert *Convolution_Backprop_Data *Fake_quantize *SoftMax *Tile *Transpose * Fix comparison and logical tests, use IE ref mode for now * Remove cumsum and logical tests * Remove comparison tests and it's fixes
- Loading branch information
1 parent
ad80f4d
commit 50366a6
Showing
11 changed files
with
335 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
30 changes: 30 additions & 0 deletions
30
...ine/tests/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/convert.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,30 @@ | ||
// Copyright (C) 2019 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
|
||
#include "single_layer_tests/convert.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
const std::vector<std::vector<size_t>> inShape = {{1, 2, 3, 4}}; | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
//InferenceEngine::Precision::FP16, | ||
//InferenceEngine::Precision::U8, | ||
//InferenceEngine::Precision::I8, | ||
}; | ||
|
||
INSTANTIATE_TEST_CASE_P(NoReshape, ConvertLayerTest, | ||
::testing::Combine( | ||
::testing::Values(inShape), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
ConvertLayerTest::getTestCaseName); | ||
|
||
} // namespace |
111 changes: 111 additions & 0 deletions
111
...al/plugin/plaidml/shared_tests_instances/single_layer_tests/convolution_backprop_data.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,111 @@ | ||
// Copyright (C) 2019 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
|
||
#include "single_layer_tests/convolution_backprop_data.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
//InferenceEngine::Precision::FP16 | ||
}; | ||
|
||
const std::vector<size_t> numOutChannels = {1, 5, 16}; | ||
|
||
/* ============= 2D ConvolutionBackpropData ============= */ | ||
const std::vector<std::vector<size_t >> inputShapes2D = {{1, 3, 30, 30}, | ||
{1, 16, 10, 10}, | ||
{1, 32, 10, 10}}; | ||
const std::vector<std::vector<size_t >> kernels2D = {{1, 1}, {3, 3}, {3, 5}}; | ||
const std::vector<std::vector<size_t >> strides2D = {{1, 1}, {1, 3}}; | ||
const std::vector<std::vector<ptrdiff_t>> padBegins2D = {{0, 0}}; | ||
const std::vector<std::vector<ptrdiff_t>> padEnds2D = {{0, 0}, {1, 1}}; | ||
const std::vector<std::vector<size_t >> dilations2D = {{1, 1}, {2, 2}}; | ||
|
||
const auto conv2DParams_ExplicitPadding = ::testing::Combine( | ||
::testing::ValuesIn(kernels2D), | ||
::testing::ValuesIn(strides2D), | ||
::testing::ValuesIn(padBegins2D), | ||
::testing::ValuesIn(padEnds2D), | ||
::testing::ValuesIn(dilations2D), | ||
::testing::ValuesIn(numOutChannels), | ||
::testing::Values(ngraph::op::PadType::EXPLICIT) | ||
); | ||
const auto conv2DParams_AutoPadValid = ::testing::Combine( | ||
::testing::ValuesIn(kernels2D), | ||
::testing::ValuesIn(strides2D), | ||
::testing::Values(std::vector<ptrdiff_t>({0, 0})), | ||
::testing::Values(std::vector<ptrdiff_t>({0, 0})), | ||
::testing::ValuesIn(dilations2D), | ||
::testing::ValuesIn(numOutChannels), | ||
::testing::Values(ngraph::op::PadType::VALID) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P(ConvolutionBackpropData2D_ExplicitPadding, ConvolutionBackpropDataLayerTest, | ||
::testing::Combine( | ||
conv2DParams_ExplicitPadding, | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(inputShapes2D), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
ConvolutionBackpropDataLayerTest::getTestCaseName); | ||
|
||
INSTANTIATE_TEST_CASE_P(ConvolutionBackpropData2D_AutoPadValid, ConvolutionBackpropDataLayerTest, | ||
::testing::Combine( | ||
conv2DParams_AutoPadValid, | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(inputShapes2D), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
ConvolutionBackpropDataLayerTest::getTestCaseName); | ||
|
||
/* ============= 3D ConvolutionBackpropData ============= */ | ||
const std::vector<std::vector<size_t >> inputShapes3D = {{1, 3, 10, 10, 10}, | ||
{1, 16, 5, 5, 5}, | ||
{1, 32, 5, 5, 5}}; | ||
const std::vector<std::vector<size_t >> kernels3D = {{1, 1, 1}, {3, 3, 3}}; | ||
const std::vector<std::vector<size_t >> strides3D = {{1, 1, 1}}; | ||
const std::vector<std::vector<ptrdiff_t>> padBegins3D = {{0, 0, 0}}; | ||
const std::vector<std::vector<ptrdiff_t>> padEnds3D = {{0, 0, 0}, {1, 1, 1}}; | ||
const std::vector<std::vector<size_t >> dilations3D = {{1, 1, 1}, {2, 2, 2}}; | ||
|
||
const auto conv3DParams_ExplicitPadding = ::testing::Combine( | ||
::testing::ValuesIn(kernels3D), | ||
::testing::ValuesIn(strides3D), | ||
::testing::ValuesIn(padBegins3D), | ||
::testing::ValuesIn(padEnds3D), | ||
::testing::ValuesIn(dilations3D), | ||
::testing::ValuesIn(numOutChannels), | ||
::testing::Values(ngraph::op::PadType::EXPLICIT) | ||
); | ||
const auto conv3DParams_AutoPadValid = ::testing::Combine( | ||
::testing::ValuesIn(kernels3D), | ||
::testing::ValuesIn(strides3D), | ||
::testing::Values(std::vector<ptrdiff_t>({0, 0, 0})), | ||
::testing::Values(std::vector<ptrdiff_t>({0, 0, 0})), | ||
::testing::ValuesIn(dilations3D), | ||
::testing::ValuesIn(numOutChannels), | ||
::testing::Values(ngraph::op::PadType::VALID) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P(ConvolutionBackpropData3D_ExplicitPadding, ConvolutionBackpropDataLayerTest, | ||
::testing::Combine( | ||
conv3DParams_ExplicitPadding, | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(inputShapes3D), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
ConvolutionBackpropDataLayerTest::getTestCaseName); | ||
|
||
INSTANTIATE_TEST_CASE_P(ConvolutionBackpropData3D_AutoPadValid, ConvolutionBackpropDataLayerTest, | ||
::testing::Combine( | ||
conv3DParams_AutoPadValid, | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(inputShapes3D), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
ConvolutionBackpropDataLayerTest::getTestCaseName); | ||
|
||
} // namespace |
36 changes: 36 additions & 0 deletions
36
...sts/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/fake_quantize.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,36 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
|
||
#include "single_layer_tests/fake_quantize.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
//InferenceEngine::Precision::FP16 | ||
}; | ||
|
||
const std::vector<std::vector<size_t>> inputShapes = {{1, 1, 1, 1}, {3, 10, 5, 6}}; | ||
const std::vector<std::vector<size_t>> constShapes = {{1}}; | ||
const std::vector<size_t> levels = {16, 255, 256}; | ||
|
||
const auto fqParams = ::testing::Combine( | ||
::testing::ValuesIn(levels), | ||
::testing::ValuesIn(constShapes) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P(FakeQuantize, FakeQuantizeLayerTest, | ||
::testing::Combine( | ||
fqParams, | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::ValuesIn(inputShapes), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
FakeQuantizeLayerTest::getTestCaseName); | ||
|
||
} // namespace |
72 changes: 72 additions & 0 deletions
72
...ine/tests/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/softmax.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,72 @@ | ||
// Copyright (C) 2019 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
|
||
#include "single_layer_tests/softmax.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
}; | ||
|
||
const std::vector<InferenceEngine::Layout> inputLayouts2D = { | ||
InferenceEngine::Layout::NC, | ||
}; | ||
|
||
const std::vector<InferenceEngine::SizeVector> inputShapes2D = { | ||
InferenceEngine::SizeVector {1, 100}, | ||
InferenceEngine::SizeVector {100, 1}, | ||
InferenceEngine::SizeVector {10, 10}, | ||
}; | ||
|
||
const std::vector<size_t> axis2D = { | ||
0, 1 | ||
}; | ||
|
||
const auto params2D = testing::Combine( | ||
testing::ValuesIn(netPrecisions), | ||
testing::ValuesIn(inputLayouts2D), | ||
testing::ValuesIn(inputShapes2D), | ||
testing::ValuesIn(axis2D), | ||
testing::Values(CommonTestUtils::DEVICE_PLAIDML), | ||
testing::Values(std::map<std::string, std::string>()) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P( | ||
SoftMax2D, | ||
SoftMaxLayerTest, | ||
params2D, | ||
SoftMaxLayerTest::getTestCaseName | ||
); | ||
|
||
const std::vector<InferenceEngine::SizeVector> inputShapes4D = { | ||
InferenceEngine::SizeVector {1, 100, 1, 1}, | ||
InferenceEngine::SizeVector {1, 3, 4, 3}, | ||
InferenceEngine::SizeVector {2, 3, 4, 5}, | ||
}; | ||
|
||
const std::vector<size_t> axis4D = {0, 1, 2, 3}; | ||
|
||
const auto params4D = testing::Combine( | ||
testing::ValuesIn(netPrecisions), | ||
testing::Values(InferenceEngine::Layout::NCHW), | ||
testing::ValuesIn(inputShapes4D), | ||
testing::ValuesIn(axis4D), | ||
testing::Values(CommonTestUtils::DEVICE_PLAIDML), | ||
testing::Values(std::map<std::string, std::string>()) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P( | ||
SoftMax4D, | ||
SoftMaxLayerTest, | ||
params4D, | ||
SoftMaxLayerTest::getTestCaseName | ||
); | ||
|
||
} // namespace |
40 changes: 40 additions & 0 deletions
40
...engine/tests/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/tile.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,40 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
|
||
#include "single_layer_tests/tile.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32 | ||
}; | ||
|
||
const std::vector<std::vector<size_t>> repeats = { | ||
{1, 2, 3}, | ||
{2, 1, 1}, | ||
{2, 3, 1}, | ||
{2, 2, 2}, | ||
}; | ||
|
||
INSTANTIATE_TEST_CASE_P(Tile, TileLayerTest, | ||
::testing::Combine( | ||
::testing::ValuesIn(repeats), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::Values(std::vector<size_t>({2, 3, 4})), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
TileLayerTest::getTestCaseName); | ||
|
||
INSTANTIATE_TEST_CASE_P(Tile6d, TileLayerTest, | ||
::testing::Combine( | ||
::testing::Values(std::vector<size_t>({1, 1, 1, 2, 1, 2})), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::Values(std::vector<size_t>({1, 4, 3, 1, 3, 1})), | ||
::testing::Values(CommonTestUtils::DEVICE_PLAIDML)), | ||
TileLayerTest::getTestCaseName); | ||
|
||
} // namespace |
41 changes: 41 additions & 0 deletions
41
...e/tests/functional/plugin/plaidml/shared_tests_instances/single_layer_tests/transpose.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,41 @@ | ||
// Copyright (C) 2019 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <vector> | ||
|
||
#include "single_layer_tests/transpose.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
|
||
namespace { | ||
|
||
const std::vector<InferenceEngine::Precision> netPrecisions = { | ||
InferenceEngine::Precision::FP32, | ||
}; | ||
|
||
const std::vector<std::vector<size_t>> inputShapes = { | ||
std::vector<size_t>{1, 3, 100, 100}, | ||
}; | ||
|
||
const std::vector<std::vector<size_t>> inputOrder = { | ||
std::vector<size_t>{0, 3, 2, 1}, | ||
std::vector<size_t>{}, | ||
}; | ||
|
||
const auto params = testing::Combine( | ||
testing::ValuesIn(inputOrder), | ||
testing::ValuesIn(netPrecisions), | ||
testing::ValuesIn(inputShapes), | ||
testing::Values(CommonTestUtils::DEVICE_PLAIDML) | ||
); | ||
|
||
INSTANTIATE_TEST_CASE_P( | ||
Transpose, | ||
TransposeLayerTest, | ||
params, | ||
TransposeLayerTest::getTestCaseName | ||
); | ||
|
||
} // namespace |
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
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