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

Remove convert2OutputVector and castOps2Nodes #763

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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 @@ -158,10 +158,8 @@ class ConvolutionBackpropDataExtendedLayerTest

auto outputShapeNode = std::make_shared<ov::op::v0::Constant>(
ov::element::Type_t::i64, ov::Shape{outputShapeData.size()}, outputShapeData);
auto paramOuts =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ov::op::v0::Parameter>(params));
auto convBackpropData = std::dynamic_pointer_cast<ngraph::opset1::ConvolutionBackpropData>(
makeConvolutionBackpropData(paramOuts[0],
makeConvolutionBackpropData(params[0],
outputShapeNode,
ngPrc,
kernel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,8 @@ class ConvolutionBackpropDataAddExtendedLayerTest

auto outputShapeNode = std::make_shared<ov::op::v0::Constant>(
ov::element::Type_t::i64, ov::Shape{outputShapeData.size()}, outputShapeData);
auto paramOuts =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ov::op::v0::Parameter>(params));
auto convBackpropData = std::dynamic_pointer_cast<ngraph::opset1::ConvolutionBackpropData>(
makeConvolutionBackpropData(paramOuts[0],
makeConvolutionBackpropData(params[0],
outputShapeNode,
ngPrc,
kernel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,11 @@ class BasicConvolutionBiasAddActivationLayerTest

auto ngPrc = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(netPrecision);
ov::ParameterVector params{std::make_shared<ov::op::v0::Parameter>(ngPrc, ov::Shape(inputShape))};

auto paramOuts =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ov::op::v0::Parameter>(params));
std::vector<float> filter_weights;

std::shared_ptr<ov::Node> convNode = nullptr;
if constexpr (!isGroup) {
convNode = ngraph::builder::makeConvolution(paramOuts[0],
convNode = ngraph::builder::makeConvolution(params[0],
ngPrc,
kernel,
stride,
Expand All @@ -183,7 +180,7 @@ class BasicConvolutionBiasAddActivationLayerTest
false,
filter_weights);
} else {
convNode = ngraph::builder::makeGroupConvolution(paramOuts[0],
convNode = ngraph::builder::makeGroupConvolution(params[0],
ngPrc,
kernel,
stride,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,8 @@ class FullyConnectedLayerTest : public testing::WithParamInterface<FullyConnecte
secondaryInput = std::make_shared<ov::op::v0::Constant>(ngPrc, shapeRelatedParams.input2.first);
}
auto thirdInput = std::make_shared<ov::op::v0::Constant>(ngPrc, shapeRelatedParams.input3);
auto paramOuts =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ov::op::v0::Parameter>(params));
auto MatMul = std::make_shared<ov::op::v0::MatMul>(
paramOuts[0], secondaryInput, shapeRelatedParams.input1.second, shapeRelatedParams.input2.second);
params[0], secondaryInput, shapeRelatedParams.input1.second, shapeRelatedParams.input2.second);
auto Add = std::make_shared<ov::op::v1::Add>(MatMul, thirdInput);
ov::ResultVector results{std::make_shared<ngraph::opset1::Result>(Add)};
function = std::make_shared<ngraph::Function>(results, params, "FullyConnected");
Expand Down Expand Up @@ -215,13 +213,11 @@ class FullyConnectedLayer2MatMulTest : public testing::WithParamInterface<FullyC
std::make_shared<ov::op::v0::Constant>(ngPrc, shapeRelatedParams.matmul2_input2.first);
}

auto paramOuts =
ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes<ov::op::v0::Parameter>(params));
auto matMul0 = std::make_shared<ov::op::v0::MatMul>(paramOuts[0],
auto matMul0 = std::make_shared<ov::op::v0::MatMul>(params[0],
matmul0SecondaryInput,
shapeRelatedParams.matmul1_input1.second,
shapeRelatedParams.matmul1_input2.second);
auto matMul1 = std::make_shared<ov::op::v0::MatMul>(paramOuts[1],
auto matMul1 = std::make_shared<ov::op::v0::MatMul>(params[1],
matmul1SecondaryInput,
shapeRelatedParams.matmul2_input1.second,
shapeRelatedParams.matmul2_input2.second);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class LPCNetCUDNNGRUSequenceTest : public UnsymmetricalComparer<GRUSequenceTest>
ASSERT_EQ(InputLayerType::CONSTANT, WRBType);
std::vector<ov::Shape> WRB = {inputShapes[3], inputShapes[4], inputShapes[5], inputShapes[2]};
auto gru_sequence =
ngraph::builder::makeGRU(ngraph::helpers::convert2OutputVector(ngraph::helpers::castOps2Nodes(params)),
ngraph::builder::makeGRU(ov::OutputVector{params[0], params[1]},
WRB,
hidden_size,
activations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class AddConcat {

constexpr int64_t axis = CONCAT_AXIS;
const auto concat =
std::make_shared<ngraph::opset1::Concat>(ngraph::helpers::convert2OutputVector({add0, add1}), axis);
std::make_shared<ngraph::opset1::Concat>(ov::OutputVector{add0, add1}, axis);
const auto result = std::make_shared<ngraph::opset1::Result>(concat);
return std::make_shared<ov::Model>(result, params, "AddConcat");
}
Expand Down