@@ -109,6 +109,12 @@ class NgraphCustomOp: public ngraph::op::Op {
109
109
}
110
110
}
111
111
112
+ #if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_4)
113
+ std::shared_ptr<ngraph::Node> clone_with_new_inputs (const ngraph::OutputVector& new_args) const override
114
+ {
115
+ return std::make_shared<NgraphCustomOp>(new_args, params);
116
+ }
117
+ #else
112
118
std::shared_ptr<ngraph::Node> copy_with_new_args (const ngraph::NodeVector& new_args) const override
113
119
{
114
120
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_3)
@@ -117,6 +123,7 @@ class NgraphCustomOp: public ngraph::op::Op {
117
123
return std::make_shared<NgraphCustomOp>(new_args, params);
118
124
#endif
119
125
}
126
+ #endif
120
127
121
128
bool visit_attributes (ngraph::AttributeVisitor& visitor) override
122
129
{
@@ -380,7 +387,11 @@ void InfEngineNgraphNet::setNodePtr(std::shared_ptr<ngraph::Node>* ptr) {
380
387
381
388
void InfEngineNgraphNet::release () {
382
389
for (auto & node : components.back ()) {
390
+ #if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
391
+ if (!(ngraph::op::is_parameter (node) || ngraph::op::is_output (node) || ngraph::op::is_constant (node)) ) {
392
+ #else
383
393
if (!(node->is_parameter () || node->is_output () || node->is_constant ()) ) {
394
+ #endif
384
395
auto it = all_nodes.find (node->get_friendly_name ());
385
396
if (it != all_nodes.end ()) {
386
397
unconnectedNodes.erase (*(it->second ));
@@ -447,11 +458,19 @@ void InfEngineNgraphNet::createNet(Target targetId) {
447
458
ngraph::ResultVector outputs;
448
459
ngraph::ParameterVector inps;
449
460
for (auto & node : components.back ()) {
461
+ #if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
462
+ if (ngraph::op::is_parameter (node)) {
463
+ #else
450
464
if (node->is_parameter ()) {
465
+ #endif
451
466
auto parameter = std::dynamic_pointer_cast<ngraph::op::Parameter>(node);
452
467
inps.push_back (parameter);
453
468
}
469
+ #if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_4)
470
+ else if (ngraph::op::is_output (node)) {
471
+ #else
454
472
else if (node->is_output ()) {
473
+ #endif
455
474
auto result = std::dynamic_pointer_cast<ngraph::op::Result>(node);
456
475
outputs.push_back (result);
457
476
}
0 commit comments