Skip to content
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

update ReshapeLayerTest to have unsigned in output axis #6276

Merged
merged 2 commits into from
Jun 24, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
};

INSTANTIATE_TEST_CASE_P(
smoke_ReshapeCheckDynBatch, ReshapeLayerTestRevise,
smoke_ReshapeCheckDynBatch, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true), ::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
Expand All @@ -27,10 +27,10 @@ INSTANTIATE_TEST_CASE_P(
::testing::Values(std::vector<int64_t>({30, 30, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(
smoke_ReshapeCheck, ReshapeLayerTestRevise,
smoke_ReshapeCheck, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true), ::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
Expand All @@ -41,10 +41,10 @@ INSTANTIATE_TEST_CASE_P(
::testing::Values(std::vector<int64_t>({10, 0, 100})),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(
smoke_ReshapeCheckNegative, ReshapeLayerTestRevise,
smoke_ReshapeCheckNegative, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true), ::testing::ValuesIn(netPrecisions),
::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
Expand All @@ -55,5 +55,5 @@ INSTANTIATE_TEST_CASE_P(
::testing::Values(std::vector<int64_t>({10, -1, 100})),
::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using namespace LayerTestsDefinitions;

namespace {
TEST_P(ReshapeLayerTestRevise, Serialize) {
TEST_P(ReshapeLayerTest, Serialize) {
Serialize();
}

Expand All @@ -19,7 +19,7 @@ namespace {
InferenceEngine::Precision::FP16
};

INSTANTIATE_TEST_CASE_P(smoke_ReshapeSerialization, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(smoke_ReshapeSerialization, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -31,5 +31,5 @@ namespace {
::testing::Values(std::vector<int64_t>({30, 30, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>({{CONFIG_KEY(DYN_BATCH_ENABLED), CONFIG_VALUE(YES)}}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
InferenceEngine::Precision::FP16
};

INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckDynBatch, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckDynBatch, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -27,9 +27,9 @@ INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckDynBatch, ReshapeLayerTestRevise,
::testing::Values(std::vector<int64_t>({30, 30, 30, 30})),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>({{CONFIG_KEY(DYN_BATCH_ENABLED), CONFIG_VALUE(YES)}}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -41,9 +41,9 @@ INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTestRevise,
::testing::Values(std::vector<int64_t>({10, 0, 100})),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckNegative, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckNegative, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -55,5 +55,5 @@ INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckNegative, ReshapeLayerTestRevise,
::testing::Values(std::vector<int64_t>({10, -1, 100})),
::testing::Values(CommonTestUtils::DEVICE_CPU),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
};

//TODO: Issue : - 28981
INSTANTIATE_TEST_CASE_P(DISABLE_smoke_ReshapeCheckDynBatch, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(DISABLE_smoke_ReshapeCheckDynBatch, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -28,9 +28,9 @@ INSTANTIATE_TEST_CASE_P(DISABLE_smoke_ReshapeCheckDynBatch, ReshapeLayerTestRevi
::testing::Values(std::vector<int64_t>({1, 0, 256})),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::Values(std::map<std::string, std::string>({{CONFIG_KEY(DYN_BATCH_ENABLED), CONFIG_VALUE(YES)}}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -42,9 +42,9 @@ INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTestRevise,
::testing::Values(std::vector<int64_t>({10, 0, 100})),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);

INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckNegative, ReshapeLayerTestRevise,
INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckNegative, ReshapeLayerTest,
::testing::Combine(
::testing::Values(true),
::testing::ValuesIn(netPrecisions),
Expand All @@ -56,5 +56,5 @@ INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckNegative, ReshapeLayerTestRevise,
::testing::Values(std::vector<int64_t>({10, -1, 100})),
::testing::Values(CommonTestUtils::DEVICE_GPU),
::testing::Values(std::map<std::string, std::string>({}))),
ReshapeLayerTestRevise::getTestCaseName);
ReshapeLayerTest::getTestCaseName);
} // namespace
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@

namespace LayerTestsDefinitions {

//TODO: remove this alias when ticket 57975 is done - ticket: 57976
typedef std::tuple<bool, // SpecialZero
InferenceEngine::Precision, // Network precision
InferenceEngine::Precision, // Input precision
InferenceEngine::Precision, // Output precision
InferenceEngine::Layout, // Input layout
InferenceEngine::Layout, // Output layout
std::vector<size_t>, // Input shapes
std::vector<size_t>, // OutForm Shapes
std::vector<int64_t>, // OutForm Shapes
std::string, // Device name
std::map<std::string, std::string> // Config
>
reshapeParams;

//TODO: remove this class when ticket 57975 is done - ticket: 57976
class ReshapeLayerTest : public testing::WithParamInterface<reshapeParams>,
virtual public LayerTestsUtils::LayerTestsCommon {
public:
Expand All @@ -41,7 +38,7 @@ class ReshapeLayerTest : public testing::WithParamInterface<reshapeParams>,
};


//TODO: use this alias in all dependencies - ticket: 57975
//TODO: Drop this Revise impl when all pluging will switch back to ReshapeLayerTest
pelszkow marked this conversation as resolved.
Show resolved Hide resolved
typedef std::tuple<bool, // SpecialZero
InferenceEngine::Precision, // Network precision
InferenceEngine::Precision, // Input precision
Expand All @@ -55,7 +52,6 @@ typedef std::tuple<bool, // SpecialZero
>
reshapeParamsRevise;

//TODO: use this class in all dependencies - ticket: 57975
class ReshapeLayerTestRevise
: public testing::WithParamInterface<reshapeParamsRevise>,
virtual public LayerTestsUtils::LayerTestsCommon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ std::string ReshapeLayerTest::getTestCaseName(testing::TestParamInfo<reshapePara
InferenceEngine::Precision netPrecision;
InferenceEngine::Precision inPrc, outPrc;
InferenceEngine::Layout inLayout, outLayout;
InferenceEngine::SizeVector inputShapes, outFormShapes;
InferenceEngine::SizeVector inputShapes;
std::vector<int64_t> outFormShapes;
std::string targetDevice;
std::map<std::string, std::string> config;
bool specialZero;
Expand All @@ -28,7 +29,8 @@ std::string ReshapeLayerTest::getTestCaseName(testing::TestParamInfo<reshapePara
}

void ReshapeLayerTest::SetUp() {
InferenceEngine::SizeVector inputShapes, outFormShapes;
InferenceEngine::SizeVector inputShapes;
std::vector<int64_t> outFormShapes;
bool specialZero;
InferenceEngine::Precision netPrecision;
std::tie(specialZero, netPrecision, inPrc, outPrc, inLayout, outLayout, inputShapes, outFormShapes, targetDevice, configuration) =
Expand Down