Skip to content

Commit

Permalink
remove temporary ReshapeLayerTestRevise (openvinotoolkit#6371)
Browse files Browse the repository at this point in the history
  • Loading branch information
pelszkow authored and rnugmanx committed Aug 26, 2021
1 parent f35b94e commit 65620c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,4 @@ class ReshapeLayerTest : public testing::WithParamInterface<reshapeParams>,
void SetUp() override;
};


//TODO: Drop this Revise impl when all pluging will switch back to ReshapeLayerTest
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<int64_t>, // OutForm Shapes
std::string, // Device name
std::map<std::string, std::string> // Config
>
reshapeParamsRevise;

class ReshapeLayerTestRevise
: public testing::WithParamInterface<reshapeParamsRevise>,
virtual public LayerTestsUtils::LayerTestsCommon {
public:
static std::string getTestCaseName(
testing::TestParamInfo<reshapeParamsRevise> obj);

protected:
void SetUp() override;
};
} // namespace LayerTestsDefinitions
Original file line number Diff line number Diff line change
Expand Up @@ -47,46 +47,4 @@ void ReshapeLayerTest::SetUp() {
function = std::make_shared<ngraph::Function>(results, paramsIn, "Reshape");
}

std::string ReshapeLayerTestRevise::getTestCaseName(testing::TestParamInfo<reshapeParamsRevise> obj) {
InferenceEngine::Precision netPrecision;
InferenceEngine::Precision inPrc, outPrc;
InferenceEngine::Layout inLayout, outLayout;
InferenceEngine::SizeVector inputShapes;
std::vector<int64_t> outFormShapes;
std::string targetDevice;
std::map<std::string, std::string> config;
bool specialZero;
std::tie(specialZero, netPrecision, inPrc, outPrc, inLayout, outLayout, inputShapes, outFormShapes, targetDevice, config) = obj.param;
std::ostringstream result;
result << "IS=" << CommonTestUtils::vec2str(inputShapes) << "_";
result << "OS=" << CommonTestUtils::vec2str(outFormShapes) << "_";
result << "specialZero=" << specialZero << "_";
result << "netPRC=" << netPrecision.name() << "_";
result << "inPRC=" << inPrc.name() << "_";
result << "outPRC=" << outPrc.name() << "_";
result << "inL=" << inLayout << "_";
result << "outL=" << outLayout << "_";
result << "trgDev=" << targetDevice;
return result.str();
}

void ReshapeLayerTestRevise::SetUp() {
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) =
this->GetParam();
auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
auto paramsIn = ngraph::builder::makeParams(ngPrc, {inputShapes});
auto paramIn = ngraph::helpers::convert2OutputVector(
ngraph::helpers::castOps2Nodes<ngraph::op::Parameter>(paramsIn));
auto constNode = std::make_shared<ngraph::opset1::Constant>(
ngraph::element::Type_t::i64, ngraph::Shape{outFormShapes.size()}, outFormShapes);
auto reshape = std::dynamic_pointer_cast<ngraph::opset1::Reshape>(
std::make_shared<ngraph::opset1::Reshape>(paramIn[0], constNode, specialZero));
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(reshape)};
function = std::make_shared<ngraph::Function>(results, paramsIn, "Reshape");
}

} // namespace LayerTestsDefinitions

0 comments on commit 65620c6

Please sign in to comment.