-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eltwise shared test refactor #645
Closed
kmagiers
wants to merge
10
commits into
openvinotoolkit:master
from
kmagiers:Eltwise_shared_test_removal
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c68b343
Extend Multiply Test
99f2be0
Extend Add test
7670456
Add Substract test
06504c0
Remove Eltwise test
0195a2b
Code style unification
00a93d0
Style fixes
beb36da
Style fix
421f83d
Review comments implementations
ba2d64d
Code style
ca8ce35
Fix coma
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
56 changes: 0 additions & 56 deletions
56
...-engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/eltwise.cpp
This file was deleted.
Oops, something went wrong.
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
49 changes: 49 additions & 0 deletions
49
...engine/tests/functional/plugin/cpu/shared_tests_instances/single_layer_tests/subtract.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,49 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <cstddef> | ||
#include <vector> | ||
#include <map> | ||
|
||
#include "single_layer_tests/subtract.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
using namespace SubtractTestDefinitions; | ||
namespace { | ||
|
||
std::vector<std::vector<std::vector<size_t>>> inputShapes = { {{1, 200}}, | ||
{{1, 2000}}, | ||
{{1, 20000}}, | ||
{{2, 200}}, | ||
{{10, 200}}, | ||
{{1, 10, 100}}, | ||
{{4, 4, 16}}, | ||
}; | ||
|
||
std::vector<InferenceEngine::Precision> netPrecisions = { InferenceEngine::Precision::FP32, | ||
InferenceEngine::Precision::FP16, | ||
}; | ||
|
||
std::vector<SecondaryInputType> secondaryInputTypes = { SecondaryInputType::CONSTANT, | ||
SecondaryInputType::PARAMETER, | ||
}; | ||
|
||
std::vector<SubtractionType> subtractionTypes = { SubtractionType::SCALAR, | ||
SubtractionType::VECTOR, | ||
}; | ||
|
||
std::map<std::string, std::string> additional_config = {}; | ||
|
||
const auto subtraction_params = ::testing::Combine( | ||
::testing::ValuesIn(inputShapes), | ||
::testing::ValuesIn(secondaryInputTypes), | ||
::testing::ValuesIn(subtractionTypes), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::Values(CommonTestUtils::DEVICE_CPU), | ||
::testing::Values(additional_config)); | ||
|
||
INSTANTIATE_TEST_CASE_P(CompareWithRefs, SubtractLayerTest, subtraction_params, SubtractLayerTest::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
55 changes: 55 additions & 0 deletions
55
...ence-engine/tests/functional/plugin/gna/shared_tests_instances/single_layer_tests/add.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,55 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#include <cstddef> | ||
#include <vector> | ||
#include <map> | ||
|
||
#include "single_layer_tests/add.hpp" | ||
#include "common_test_utils/test_constants.hpp" | ||
|
||
using namespace LayerTestsDefinitions; | ||
using namespace AddTestDefinitions; | ||
namespace { | ||
|
||
std::vector<std::vector<InferenceEngine::SizeVector>> flat_shapes = { {{1, 200}}, {{1, 2000}}, {{1, 20000}} }; | ||
std::vector<std::vector<InferenceEngine::SizeVector>> non_flat_shapes = { {{2, 200}}, {{10, 200}}, {{1, 10, 100}}, {{4, 4, 16}} }; | ||
|
||
std::vector<SecondaryInputType> secondaryInputTypes = { SecondaryInputType::CONSTANT, | ||
SecondaryInputType::PARAMETER, | ||
}; | ||
|
||
std::vector<AdditionType> additionTypes = { AdditionType::SCALAR, | ||
AdditionType::VECTOR, | ||
}; | ||
|
||
std::vector<InferenceEngine::Precision> netPrecisions = { InferenceEngine::Precision::FP32, | ||
InferenceEngine::Precision::FP16, | ||
}; | ||
|
||
std::map<std::string, std::string> additional_config = { | ||
{"GNA_DEVICE_MODE", "GNA_SW_EXACT"}, | ||
{"GNA_SCALE_FACTOR_0", "1638.4"}, | ||
{"GNA_SCALE_FACTOR_1", "1638.4"} | ||
}; | ||
|
||
const auto addition_params_flat = ::testing::Combine( | ||
::testing::ValuesIn(flat_shapes), | ||
::testing::ValuesIn(secondaryInputTypes), | ||
::testing::ValuesIn(additionTypes), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::Values(CommonTestUtils::DEVICE_GNA), | ||
::testing::Values(additional_config)); | ||
|
||
const auto addition_params_non_flat = ::testing::Combine( | ||
::testing::ValuesIn(non_flat_shapes), | ||
::testing::ValuesIn(secondaryInputTypes), | ||
::testing::ValuesIn(additionTypes), | ||
::testing::ValuesIn(netPrecisions), | ||
::testing::Values(CommonTestUtils::DEVICE_GNA), | ||
::testing::Values(additional_config)); | ||
|
||
INSTANTIATE_TEST_CASE_P(CompareWithRefs_flat, AddLayerTest, addition_params_flat, AddLayerTest::getTestCaseName); | ||
INSTANTIATE_TEST_CASE_P(CompareWithRefs_non_flat, AddLayerTest, addition_params_non_flat, AddLayerTest::getTestCaseName); | ||
} // namespace |
57 changes: 0 additions & 57 deletions
57
...-engine/tests/functional/plugin/gna/shared_tests_instances/single_layer_tests/eltwise.cpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dmitry-gorokhov Please review updated/added CPU plugin instances
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with @dmitry-gorokhov, we have take a decision to make single eltwise tests file instead of existing. Dmitry had more powerful argument in our discussion.
I will use this PR in merge of these tests. Sorry for inconvenience.
So, This PR is not to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iefode, can you please elaborate on "I will use this PR in merge of these tests" - what do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will refactor these chanes in the refactoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor in the refactoring? It's still unclear. Is anything expected from our side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do it myself. I don't expected some actions from your side