[CPU] Fix XmlModelWithExtensionFromDSO test (#21507)

This commit is contained in:
Aleksandr Voron 2023-12-08 06:21:16 +01:00 committed by GitHub
parent 072dcea299
commit 2086041552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -195,6 +195,7 @@ void Generic::initDescriptor(const NodeConfig &config) {
}
for (auto &outConf : rightConfig.outConfs) {
if (outConf.inPlace() < static_cast<int>(getParentEdges().size()) &&
outConf.inPlace() >= 0 &&
getParentEdgeAt(static_cast<size_t>(outConf.inPlace()))->getParent()->getChildEdges().size() > 1) {
outConf.inPlace(-1);
}

View File

@ -205,7 +205,7 @@ static std::string get_extension_path() {
}
TEST(Extension, XmlModelWithExtensionFromDSO) {
TEST(Extension, smoke_XmlModelWithExtensionFromDSO) {
std::string model = R"V0G0N(
<net name="Network" version="10">
<layers>
@ -260,6 +260,7 @@ TEST(Extension, XmlModelWithExtensionFromDSO) {
std::vector<float> input_values{1, 2, 3, 4, 5, 6, 7, 8};
std::vector<float> expected{12, 13, 14, 15, 16, 17, 18, 19};
InferenceEngine::Core ie;
ie.SetConfig({ { ov::hint::inference_precision.name(), ov::element::f32.get_type_name() } }, "CPU");
ie.AddExtension(std::make_shared<InferenceEngine::Extension>(get_extension_path()));
InferenceEngine::Blob::CPtr weights;
auto network = ie.ReadNetwork(model, weights);