[IE TESTS] Remove functionRefs from all tests and add it in necessary places (#7873)

* gna

* [IE TESTS] Remove functionRefs from some places
This commit is contained in:
Irina Efode
2021-10-08 00:29:00 +03:00
committed by GitHub
parent 5eaf029723
commit a3a651ff97
310 changed files with 18 additions and 361 deletions

View File

@@ -70,7 +70,6 @@ protected:
ngraph::NodeVector {bias_2},
ngraph::ParameterVector {input},
"SimpleNet");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -92,7 +92,6 @@ protected:
ngraph::ResultVector outputs;
outputs.push_back(std::make_shared<ngraph::opset1::Result>(outputNode));
function = std::make_shared<ngraph::Function>(outputs, inputs);
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -71,7 +71,6 @@ protected:
auto activation = ngraph::builder::makeActivation(params[0], ngPrc, activationType, shapes.second, constantsValue);
activation->get_rt_info() = getCPUInfo();
function = std::make_shared<ngraph::Function>(ngraph::NodeVector{activation}, params, "Activation");
functionRefs = ngraph::clone_function(*function);
}
InferenceEngine::Precision netPrecision;

View File

@@ -81,7 +81,6 @@ protected:
threshold = 1e-2;
function = (mode == "max" ? std::make_shared<ngraph::Function>(adapoolMax->outputs(), params, "AdaPoolMax") :
std::make_shared<ngraph::Function>(adapoolAvg->outputs(), params, "AdaPoolAvg"));
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -55,7 +55,6 @@ protected:
b2s->get_rt_info() = getCPUInfo();
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(b2s)};
function = std::make_shared<ngraph::Function>(results, params, "BatchToSpace");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -56,7 +56,6 @@ protected:
auto concat = std::make_shared<ngraph::opset1::Concat>(paramOuts, axis);
function = makeNgraphFunction(ngPrc, params, concat, "concat");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -63,7 +63,6 @@ protected:
auto powerStatic = ngraph::builder::makeEltwise(inputs[0], inputs[1], nodeType);
function = std::make_shared<ngraph::Function>(powerStatic, ParameterVector{param}, "ConvertToPluginSpecificNode");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -119,8 +119,6 @@ protected:
padEnd, dilation, padType, convOutChannels);
function = makeNgraphFunction(ngPrc, inputParams, convolutionNode, "Convolution");
functionRefs = ngraph::clone_function(*function);
function->set_friendly_name("convolutionRefs");
}
};

View File

@@ -95,7 +95,6 @@ protected:
}
function = makeNgraphFunction(ngPrc, inputParams, deconvolutionNode, "convolutionBackpropData");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -54,8 +54,7 @@ protected:
auto d2s = ngraph::builder::makeDepthToSpace(paramOuts[0], mode, blockSize);
d2s->get_rt_info() = getCPUInfo();
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(d2s)};
function = std::make_shared<ngraph::Function>(results, params, "DepthToSpace");
functionRefs = ngraph::clone_function(*function);
function = std::make_shared<ngraph::Function>(results, params, "DepthToSpaceCPU");
}
};

View File

@@ -102,8 +102,6 @@ protected:
auto eltwise = ngraph::builder::makeEltwise(input[0], secondaryInput, eltwiseType);
function = makeNgraphFunction(ngPrc, input, eltwise, "Eltwise");
functionRefs = ngraph::clone_function(*function);
functionRefs->set_friendly_name("EltwiseRefs");
}
};

View File

@@ -53,7 +53,6 @@ protected:
inputNode, ngraph::Shape(kernel), ngraph::Strides(strides), ngraph::Shape(rates), pad_type);
ngraph::ResultVector results{std::make_shared<ngraph::opset6::Result>(extImgPatches)};
function = std::make_shared<ngraph::Function>(results, params, "ExtractImagePatches");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -123,7 +123,6 @@ protected:
fq->get_rt_info() = getCPUInfo();
function = std::make_shared<Function>(fq, params, "FakeQuantizeCPU");
functionRefs = ngraph::clone_function(*function);
}
private:

View File

@@ -60,7 +60,6 @@ protected:
auto activation = ngraph::builder::makeGatherElements(params[0], indicesShape, ngIPrc, axis);
activation->get_rt_info() = getCPUInfo();
function = std::make_shared<ngraph::Function>(ngraph::NodeVector{activation}, params, "GatherElements");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -104,7 +104,6 @@ protected:
ngraph::builder::makeGroupConvolution(paramOuts[0], ngPrc, kernel, stride, padBegin,
padEnd, dilation, padType, convOutChannels, numGroups));
function = makeNgraphFunction(ngPrc, params, groupConv, "groupConvolution");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -94,7 +94,6 @@ protected:
padEnd, dilation, padType, convOutChannels, numGroups, false, outputPadding));
}
function = makeNgraphFunction(ngPrc, params, groupConv, "groupConvolutionBackpropData");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -88,7 +88,6 @@ protected:
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(gru_cell->output(0))};
function = makeNgraphFunction(ngPrc, params, gru_cell, "gru_cell");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -137,8 +137,6 @@ protected:
bool ti_found = ngraph::helpers::is_tensor_iterator_exist(function);
EXPECT_EQ(ti_found, false);
}
functionRefs = ngraph::clone_function(*function);
}
void GenerateInputs() override {

View File

@@ -107,7 +107,6 @@ protected:
selectedType += "BF16";
else
selectedType += netPrecision.name();
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -72,7 +72,6 @@ protected:
logicalNode->get_rt_info() = getCPUInfo();
function = std::make_shared<ngraph::Function>(logicalNode, inputs, "Logical");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -87,7 +87,6 @@ protected:
std::make_shared<ngraph::opset1::Result>(lstm_cell->output(1))};
function = makeNgraphFunction(ngPrc, params, lstm_cell, "lstm_cell");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -144,8 +144,6 @@ protected:
bool ti_found = ngraph::helpers::is_tensor_iterator_exist(function);
EXPECT_EQ(ti_found, false);
}
functionRefs = ngraph::clone_function(*function);
}
void GenerateInputs() override {

View File

@@ -96,7 +96,6 @@ protected:
auto paramOuts = helpers::convert2OutputVector(helpers::castOps2Nodes<opset1::Parameter>(params));
auto matMul = builder::makeMatMul(paramOuts[0], matrixB, transpA, transpB);
function = makeNgraphFunction(ngPrec, params, matMul, cpuNodeType);
functionRefs = ngraph::clone_function(*function);
checkFusingPosition = false;
}
};

View File

@@ -71,7 +71,6 @@ protected:
threshold = 0.015f;
function = makeNgraphFunction(netPrc, param, mvn, "mvn");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -57,7 +57,6 @@ protected:
auto normalize = builder::makeNormalizeL2(paramOuts[0], axes, eps, eps_mode);
function = makeNgraphFunction(netPrc, params, normalize, "Normalize");
functionRefs = ngraph::clone_function(*function);
selectedType = "unknown_" + std::string(inPrc.name());
threshold = 0.015f;

View File

@@ -73,7 +73,6 @@ protected:
auto oneHot = std::make_shared<ngraph::opset5::OneHot>(inputParams.front(), depthConst, onConst, offConst, axis);
function = makeNgraphFunction(ngPrc, inputParams, oneHot, "OneHot");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -58,7 +58,6 @@ protected:
pad->get_rt_info() = getCPUInfo();
ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(pad)};
function = std::make_shared<ngraph::Function>(results, params, "pad");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -86,7 +86,6 @@ protected:
function = makeNgraphFunction(ngPrc, params, pooling, "Pooling");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -97,7 +97,6 @@ protected:
threshold = 1e-2;
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(psroi)};
function = std::make_shared<ngraph::Function>(results, params, "PSROIPooling");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -74,7 +74,6 @@ protected:
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(reduce)};
function = std::make_shared<ngraph::Function>(results, params, "Reduce");
functionRefs = ngraph::clone_function(*function);
}
InferenceEngine::Blob::Ptr GenerateInput(const InferenceEngine::InputInfo &info) const override {
if (ngraph::helpers::ReductionType::Prod == reductionType) {

View File

@@ -77,7 +77,6 @@ protected:
attributes.do_softmax, mask, attributes.start_axis, attributes.end_axis);
function = makeNgraphFunction(ngPrc, paramRegionYolo, region_yolo, "RegionYolo");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -82,7 +82,6 @@ protected:
WRB, hidden_size, activations, {}, {}, clip);
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(rnn_cell)};
function = makeNgraphFunction(ngPrc, params, rnn_cell, "rnn_cell");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -117,7 +117,6 @@ protected:
bool ti_found = ngraph::helpers::is_tensor_iterator_exist(function);
EXPECT_EQ(ti_found, false);
}
functionRefs = ngraph::clone_function(*function);
}
void GenerateInputs() override {

View File

@@ -144,8 +144,6 @@ protected:
ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(roi_pooling)};
function = makeNgraphFunction(ngPrc, params, roi_pooling, "roi_pooling");
functionRefs = ngraph::clone_function(*function);
selectedType += "_";
selectedType += netPrecision.name();
}

View File

@@ -98,7 +98,6 @@ protected:
threshold = 1e-2;
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(roialign)};
function = std::make_shared<ngraph::Function>(results, params, "ROIAlign");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -63,8 +63,6 @@ protected:
}
selectedType.push_back('_');
selectedType += netPrecision.name();
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -67,7 +67,6 @@ protected:
const auto softMax = std::make_shared<ngraph::opset1::Softmax>(paramOuts.at(0), config.axis);
function = makeNgraphFunction(ngPrc, params, softMax, "SoftMax");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -60,7 +60,6 @@ protected:
s2b->get_rt_info() = getCPUInfo();
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(s2b)};
function = std::make_shared<ngraph::Function>(results, params, "SpaceToBatch");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -55,7 +55,6 @@ protected:
d2s->get_rt_info() = getCPUInfo();
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(d2s)};
function = std::make_shared<ngraph::Function>(results, params, "SpaceToDepth");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -79,7 +79,6 @@ protected:
}
split->get_rt_info() = getCPUInfo();
function = std::make_shared<ngraph::Function>(results, params, "split");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -71,7 +71,6 @@ protected:
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(ss)};
function = std::make_shared<ngraph::Function>(results, params, "StridedSlice");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -67,7 +67,6 @@ protected:
transpose->get_rt_info() = getCPUInfo();
const ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(transpose)};
function = std::make_shared<ngraph::Function>(results, params, "Transpose");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -35,7 +35,6 @@ public:
auto gather = std::make_shared<ngraph::opset3::Gather>(paramOuts[0], indicesNode, axisNode);
ngraph::ResultVector results{std::make_shared<ngraph::opset3::Result>(gather)};
function = std::make_shared<ngraph::Function>(results, params, "gather");
functionRefs = ngraph::clone_function(*function);
}
std::vector<std::pair<ngraph::element::Type, std::vector<std::uint8_t>>> CalculateRefs() override {
// Convert the second input constant precision to i64 to run the reference function

View File

@@ -42,7 +42,6 @@ public:
ngraph::ResultVector results{std::make_shared<ngraph::opset8::Result>(concat)};
function = std::make_shared<ngraph::Function>(results, inputParams, "ConcatConstantInPlace");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -75,7 +75,6 @@ protected:
}
function = std::make_shared<ngraph::Function>(results, inputParams, "Conv3dReshape");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -109,7 +109,6 @@ void ConvConcatSubgraphTest::SetUp() {
ngraph::ResultVector results{std::make_shared<ngraph::opset4::Result>(concat)};
function = std::make_shared<ngraph::Function>(results, inputParams, "convolutionConcat");
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConvConcatSubgraphTest, CompareWithRefs) {

View File

@@ -59,7 +59,6 @@ protected:
}
function = makeNgraphFunction(element::f32, inputParams, pooling, "ConvPoolActiv");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -105,7 +105,6 @@ protected:
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(eltwiseOps[eltwiseOps.size() - 1])};
function = std::make_shared<ngraph::Function>(results, ngraphParam, "eltwise_chain");
}
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -29,7 +29,6 @@ void FuseMulAddAndEwSimpleTest::SetUp() {
std::tie(inputShape, inPrec) = this->GetParam();
CreateGraph();
functionRefs = ngraph::clone_function(*function);
}
const auto mulAddAndEwSimpleCommonParams = ::testing::Combine(

View File

@@ -76,7 +76,6 @@ protected:
quantizeIntervals[3]);
ngraph::ResultVector results{std::make_shared<ngraph::opset6::Result>(quantize)};
function = std::make_shared<ngraph::Function>(results, ngraph::ParameterVector{param}, "FuseScaleShiftAndQuantize");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -48,7 +48,6 @@ void FuseTransposeAndReorderTest::SetUp() {
std::tie(inputShape, inPrec) = this->GetParam();
CreateGraph();
functionRefs = ngraph::clone_function(*function);
}
const auto fuseTransposeAndReorderCommonParams = ::testing::Combine(

View File

@@ -33,7 +33,6 @@ protected:
auto eltwise = ngraph::builder::makeEltwise(input[0], secondaryInput, eltwiseType);
function = makeNgraphFunction(ngPrc, input, eltwise, "Eltwise");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -36,7 +36,6 @@ protected:
NodeVector results{postOpCandidate, secondConsumpt};
function = std::make_shared<ngraph::Function>(results, inputParams, "NotFusedConvSimpleOp");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -60,7 +60,6 @@ protected:
auto matMul = builder::makeMatMul(reshape, matrixB, false, transpB);
function = makeNgraphFunction(element::f32, inputParams, matMul, "ReshapeFC");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -29,7 +29,6 @@ protected:
NodeVector results{add1, add2};
function = std::make_shared<ngraph::Function>(results, inputParams, "TileWithTwoOutputEdges");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -53,6 +53,7 @@ public:
void Run() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
functionRefs = ngraph::clone_function(*function);
configuration.insert(exportConfiguration.begin(), exportConfiguration.end());
LoadNetwork();
@@ -131,7 +132,6 @@ protected:
auto relu2 = std::make_shared<ngraph::opset1::Relu>(conv);
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(relu2)};
function = std::make_shared<ngraph::Function>(results, params, "ExportImportNetwork");
functionRefs = ngraph::clone_function(*function);
}
private:

View File

@@ -96,7 +96,6 @@ protected:
relu->add_control_dependency(mem_w);
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(relu)};
function = std::make_shared<ngraph::Function>(results, params, "ExportImportNetwork");
functionRefs = ngraph::clone_function(*function);
}
private:

View File

@@ -72,7 +72,6 @@ class Eltwise4dBroadcast : public testing::WithParamInterface<eltwiseParams>,
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape2) };
function = std::make_shared<ngraph::Function>(results, params, "Eltwise4dBroadcast");
functionRefs = ngraph::clone_function(*function);
}
};
@@ -121,7 +120,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape3) };
function = std::make_shared<ngraph::Function>(results, params, "Eltwise4dMultipleInput");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -90,7 +90,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(maxpool)};
function = std::make_shared<ngraph::Function>(results, inputVector, "ActMaxpoolReordering");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -64,7 +64,6 @@ protected:
auto add = std::make_shared<ngraph::opset1::Add>(fakeQuantize1, fakeQuantize2);
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(add)};
function = std::make_shared<ngraph::Function>(results, params, "BroadcastConstWithFq");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -118,7 +118,6 @@ protected:
auto result = std::make_shared<Result>(lastOp);
function = std::make_shared<Function>(ResultVector{result}, ParameterVector{input});
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -200,7 +200,6 @@ protected:
auto result = std::make_shared<Result>(lastOp);
function = std::make_shared<Function>(ResultVector{result}, ParameterVector{input});
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -199,7 +199,6 @@ protected:
auto result = std::make_shared<Result>(lastOp);
function = std::make_shared<Function>(ResultVector{result}, ParameterVector{input});
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -56,7 +56,6 @@ protected:
auto mul = ngraph::builder::makeEltwise(params[0], const_mult2, ngraph::helpers::EltwiseTypes::MULTIPLY);
function = std::make_shared<ngraph::Function>(mul, params, "EltwiseSplitOverChannelsPassTest");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -87,7 +87,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reluFQNode) };
function = std::make_shared<ngraph::Function>(results, inputVector, "FQActivation");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -99,7 +99,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset7::Result>(add3)};
function = std::make_shared<ngraph::Function>(results, params, "FQFusionWithMultipleWeights");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -41,7 +41,6 @@ protected:
auto mul3 = ngraph::builder::makeEltwise(mul2, fake3, ngraph::helpers::EltwiseTypes::ADD);
auto result = std::make_shared<ngraph::opset7::Result>(mul3);
function = std::make_shared<ngraph::Function>(ngraph::ResultVector{result}, input, "fq_fusion_with_sigmoid");
functionRefs = ngraph::clone_function(*function);
}
public:
static std::string getTestCaseName(const testing::TestParamInfo<fqFusionWithSigmoidParams> &obj) {

View File

@@ -104,7 +104,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(maxpool)};
function = std::make_shared<ngraph::Function>(results, inputVector, "FQMaxPoolReorder");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -89,7 +89,6 @@ protected:
results.push_back(std::make_shared<ngraph::opset8::Result>(reluFQNode));
}
function = std::make_shared<ngraph::Function>(results, inputVector, "FQOutputsActivation");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -77,7 +77,6 @@ protected:
ngraph::ResultVector results{std::make_shared<ngraph::opset8::Result>(reshape2),
std::make_shared<ngraph::opset8::Result>(reshape3)};
function = std::make_shared<ngraph::Function>(results, params, "FQFusionWithMultipleWeights");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -80,7 +80,6 @@ protected:
results.push_back(std::make_shared<ngraph::opset1::Result>(relu));
}
function = std::make_shared<ngraph::Function>(results, params, "InsertCopyBeforeSelfConcat");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -91,7 +91,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(matmul)};
function = std::make_shared<ngraph::Function>(results, params, "InsertTransposeBeforeMatmul");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -100,7 +100,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape3)};
function = std::make_shared<ngraph::Function>(results, params, "InsertTransposeBetweenConvs");
functionRefs = ngraph::clone_function(*function);
}
};
@@ -179,7 +178,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape3)};
function = std::make_shared<ngraph::Function>(results, params, "InsertTransposeBetweenConvs");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -75,7 +75,6 @@ protected:
InferenceEngine::Precision netPrecision;
std::tie(netPrecision, configuration, targetDevice) = this->GetParam();
function = T::createTopology(netPrecision);
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -102,7 +102,6 @@ class RemovePermutationsNHWCToNCHWPassTest : public testing::WithParamInterface<
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape2) };
function = std::make_shared<ngraph::Function>(results, params, "RemovePermutationPass");
functionRefs = ngraph::clone_function(*function);
}
};
@@ -146,7 +145,6 @@ protected:
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(permute2) };
function = std::make_shared<ngraph::Function>(results, params, "RemovePermutationPass4DOutput");
functionRefs = ngraph::clone_function(*function);
}
};
@@ -242,7 +240,6 @@ class RemovePermutationsWithPoolAndActTest : public testing::WithParamInterface<
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape2) };
function = std::make_shared<ngraph::Function>(results, params, "RemovePermutationPass");
functionRefs = ngraph::clone_function(*function);
}
};
@@ -333,7 +330,6 @@ class RemovePermutationsWithTwoConvTest : public testing::WithParamInterface<rem
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape2) };
function = std::make_shared<ngraph::Function>(results, params, "RemovePermutationPass");
functionRefs = ngraph::clone_function(*function);
}
};
@@ -432,7 +428,6 @@ class RemovePermutationsWithEltwiseTest : public testing::WithParamInterface<rem
ngraph::ResultVector results{ std::make_shared<ngraph::opset1::Result>(reshape3) };
function = std::make_shared<ngraph::Function>(results, params, "RemovePermutationPass");
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -256,7 +256,6 @@ protected:
break;
}
}
functionRefs = ngraph::clone_function(*function);
}
};

View File

@@ -107,20 +107,19 @@ public:
function = make_ngraph(false);
reference_function = make_ngraph(true); //use extra ops to mimic the preprocessing
functionRefs = ngraph::clone_function(*function);
}
void Validate() override {
// w/a: copy of original function is required to provide correct op coverage report (overflow of convert counter issue)
auto copyOriginalFunction = function;
//force the reference implementation to use graph with extra Convert operation
functionRefs = ngraph::clone_function(*reference_function);
LayerTestsUtils::LayerTestsCommon::Validate();
function = copyOriginalFunction;
}
void Run() override {
SKIP_IF_CURRENT_TEST_IS_DISABLED();
functionRefs = ngraph::clone_function(*function);
try {
LoadNetwork();
GenerateInputs();

View File

@@ -69,7 +69,6 @@ TEST_P(TrivialLoopTest, PassThroughBody) {
function = std::make_shared<ngraph::Function>(
ngraph::OutputVector {loop},
ngraph::ParameterVector {start});
functionRefs = ngraph::clone_function(*function);
// Precalculated ref blobs
auto blob = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)});
@@ -114,7 +113,6 @@ TEST_P(TrivialLoopTest, UnusedInputBody) {
function = std::make_shared<ngraph::Function>(
ngraph::OutputVector {loop},
ngraph::ParameterVector {start});
functionRefs = ngraph::clone_function(*function);
// Precalculated ref blobs
auto blob = make_blob_with_precision({iePrc, ieShape, InferenceEngine::TensorDesc::getLayoutByDims(ieShape)});

View File

@@ -42,11 +42,13 @@ void ImportNetworkTestBase::exportImportNetwork() {
}
void ImportNetworkTestBase::Run() {
functionRefs = ngraph::clone_function(*function);
TestRun(false);
}
void ImportNetworkTestBase::TestRun(bool isModelChanged) {
SKIP_IF_CURRENT_TEST_IS_DISABLED()
functionRefs = ngraph::clone_function(*function);
// load export configuration and save outputs
configuration.insert(exportConfiguration.begin(), exportConfiguration.end());
LoadNetwork();

View File

@@ -141,7 +141,6 @@ void LoadNetworkCacheTestBase::SetUp() {
} catch (...) {
GTEST_SKIP();
}
functionRefs = ngraph::clone_function(*function);
std::stringstream ss;
auto hash = std::hash<std::string>()(GetTestName());

View File

@@ -47,7 +47,6 @@ namespace ConfigurationTestsDefinitions {
max_batch_size = *std::max_element(batch_sizes.begin(), batch_sizes.end());
function = ngraph::builder::subgraph::makeSingleConv();
functionRefs = ngraph::clone_function(*function);
}
void DynamicBatchTest::LoadNetwork() {

View File

@@ -91,7 +91,6 @@ void ProposalBehTest::SetUp() {
ngraph::ResultVector results{std::make_shared<ngraph::opset1::Result>(proposal)};
function = std::make_shared<ngraph::Function>(results, params, "proposal");
functionRefs = ngraph::clone_function(*function);
}
void ProposalBehTest::Run() {

View File

@@ -106,7 +106,6 @@ void SetBlobTest::SetUp() {
auto cumSum = std::dynamic_pointer_cast<ngraph::opset4::CumSum>(ngraph::builder::makeCumSum(paramOuts[0], axisNode, false, false));
ngraph::ResultVector results{std::make_shared<ngraph::opset4::Result>(cumSum)};
function = std::make_shared<ngraph::Function>(results, params, "InferSetBlob");
functionRefs = ngraph::clone_function(*function);
}
TEST_P(SetBlobTest, CompareWithRefs) {

View File

@@ -21,7 +21,6 @@ std::string MultipleAllocations::getTestCaseName(const testing::TestParamInfo<Mu
void MultipleAllocations::SetUp() {
std::tie(targetDevice, m_allocationsCount) = this->GetParam();
function = ngraph::builder::subgraph::makeSplitConvConcat();
functionRefs = ngraph::clone_function(*function);
}
TEST_P(MultipleAllocations, InferWorksCorrectAfterAllocations) {

View File

@@ -14,7 +14,6 @@ void QueryNetworkTest::SetUp() {
auto& param = GetParam();
targetDevice = std::get<Plugin>(param);
function = std::get<Function>(param);
functionRefs = ngraph::clone_function(*function);
cnnNetwork = InferenceEngine::CNNNetwork{function};
}

View File

@@ -107,7 +107,6 @@ void HeteroSyntheticTest::SetUp() {
--num;
}
function = std::get<Function>(param)._function;
functionRefs = ngraph::clone_function(*function);
}
void HeteroSyntheticTest::TearDown() {

View File

@@ -63,7 +63,6 @@ void AddTransformation::SetUp() {
param.fakeQuantize1, param.fakeQuantize2);
ngraph::pass::InitNodeInfo().run_on_function(function);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(AddTransformation, CompareWithRefImpl) {

View File

@@ -41,7 +41,6 @@ void ClampTransformation::SetUp() {
param.fakeQuantize,
param.clampLowConst,
param.clampHighConst);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ClampTransformation, CompareWithRefImpl) {

View File

@@ -52,7 +52,6 @@ void ConcatTransformation::SetUp() {
inputShape,
testValues.fqOnData1,
testValues.fqOnData2);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConcatTransformation, CompareWithRefImpl) {

View File

@@ -54,7 +54,6 @@ void ConcatWithChildAndOutputTransformation::SetUp() {
function = ngraph::builder::subgraph::ConcatFunction::getOriginalWithChildAndOutput(
netPrecision, inputShapes, param.fqOnData1, param.fqOnData2);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConcatWithChildAndOutputTransformation, CompareWithRefImpl) {

View File

@@ -56,7 +56,6 @@ void ConcatWithDifferentChildrenTransformation::SetUp() {
function = ngraph::builder::subgraph::ConcatFunction::getOriginalWithDifferentPrecisionOnChildren(
netPrecision, inputShapes, param.axis, param.fqOnData1, param.fqOnData2);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConcatWithDifferentChildrenTransformation, CompareWithRefImpl) {

View File

@@ -72,7 +72,6 @@ void ConcatWithIntermediateTransformation::SetUp() {
transparentIntermediate,
{ 256ul, ngraph::Shape({}), {0.f}, {2.55f}, {0.f}, {2.55f} },
{ 256ul, ngraph::Shape({}), {0.f}, {2.55f}, {0.f}, {2.55f / 2.f} });
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConcatWithIntermediateTransformation, CompareWithRefImpl) {

View File

@@ -55,7 +55,6 @@ void ConcatWithNeighborsGraphTransformation::SetUp() {
{ 256ul, ngraph::Shape({}), {0.f}, {2.55f}, {0.f}, {2.55f / 3.f} },
"concat",
"");
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConcatWithNeighborsGraphTransformation, CompareWithRefImpl) {

View File

@@ -65,7 +65,6 @@ void ConcatWithSplitTransformation::SetUp() {
param.fqOnData1,
param.fqOnData2,
true);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConcatWithSplitTransformation, CompareWithRefImpl) {

View File

@@ -65,7 +65,6 @@ void ConvolutionBackpropDataTransformation::SetUp() {
outputShape,
param.fakeQuantizeOnData,
weights);
functionRefs = ngraph::clone_function(*function);
}
void ConvolutionBackpropDataTransformation::Run() {

View File

@@ -53,7 +53,6 @@ void ConvolutionQDqTransformation::SetUp() {
param.convertOnWeights,
param.dequantizationOnWeights,
{});
functionRefs = ngraph::clone_function(*function);
}
void ConvolutionQDqTransformation::Run() {

View File

@@ -50,7 +50,6 @@ void ConvolutionTransformation::SetUp() {
// TODO: pass from test parameters
param.fakeQuantizeOnData,
param.fakeQuantizeOnWeights);
functionRefs = ngraph::clone_function(*function);
}
void ConvolutionTransformation::Run() {

View File

@@ -51,7 +51,6 @@ void ConvolutionWIthIncorrectWeightsTransformation::SetUp() {
param.fakeQuantizeOnWeights,
param.fakeQuantizeOnData,
param.isCorrect);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(ConvolutionWIthIncorrectWeightsTransformation, CompareWithRefImpl) {

View File

@@ -64,7 +64,6 @@ void DepthToSpaceTransformation::SetUp() {
}
function = ngraph::builder::subgraph::DepthToSpaceFunction::getOriginal(precision, inputShape, mode, blockSize);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(DepthToSpaceTransformation, CompareWithRefImpl) {

View File

@@ -41,7 +41,6 @@ void FakeQuantizeAndAvgPoolTransformation::SetUp() {
fakeQuantize);
ngraph::pass::InitNodeInfo().run_on_function(function);
functionRefs = ngraph::clone_function(*function);
}
TEST_P(FakeQuantizeAndAvgPoolTransformation, CompareWithRefImpl) {

Some files were not shown because too many files have changed in this diff Show More