mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Merge pull request #17538 from alalek:dnn_openvino_2020.3.0
This commit is contained in:
commit
c2664d912a
@ -135,9 +135,9 @@ endif()
|
|||||||
|
|
||||||
if(INF_ENGINE_TARGET)
|
if(INF_ENGINE_TARGET)
|
||||||
if(NOT INF_ENGINE_RELEASE)
|
if(NOT INF_ENGINE_RELEASE)
|
||||||
message(WARNING "InferenceEngine version has not been set, 2020.2 will be used by default. Set INF_ENGINE_RELEASE variable if you experience build errors.")
|
message(WARNING "InferenceEngine version has not been set, 2020.3 will be used by default. Set INF_ENGINE_RELEASE variable if you experience build errors.")
|
||||||
endif()
|
endif()
|
||||||
set(INF_ENGINE_RELEASE "2020020000" CACHE STRING "Force IE version, should be in form YYYYAABBCC (e.g. 2020.1.0.2 -> 2020010002)")
|
set(INF_ENGINE_RELEASE "2020030000" CACHE STRING "Force IE version, should be in form YYYYAABBCC (e.g. 2020.1.0.2 -> 2020010002)")
|
||||||
set_target_properties(${INF_ENGINE_TARGET} PROPERTIES
|
set_target_properties(${INF_ENGINE_TARGET} PROPERTIES
|
||||||
INTERFACE_COMPILE_DEFINITIONS "HAVE_INF_ENGINE=1;INF_ENGINE_RELEASE=${INF_ENGINE_RELEASE}"
|
INTERFACE_COMPILE_DEFINITIONS "HAVE_INF_ENGINE=1;INF_ENGINE_RELEASE=${INF_ENGINE_RELEASE}"
|
||||||
)
|
)
|
||||||
|
@ -2113,7 +2113,7 @@ struct Net::Impl : public detail::NetImplBase
|
|||||||
|
|
||||||
auto ieInpNode = inputNodes[i].dynamicCast<InfEngineNgraphNode>();
|
auto ieInpNode = inputNodes[i].dynamicCast<InfEngineNgraphNode>();
|
||||||
CV_Assert(oid < ieInpNode->node->get_output_size());
|
CV_Assert(oid < ieInpNode->node->get_output_size());
|
||||||
#if INF_ENGINE_VER_MAJOR_GT(2020030000)
|
#if INF_ENGINE_VER_MAJOR_GT(INF_ENGINE_RELEASE_2020_3)
|
||||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid)));
|
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid)));
|
||||||
#else
|
#else
|
||||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid, false)));
|
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid, false)));
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
return type_info;
|
return type_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if INF_ENGINE_VER_MAJOR_GT(2020020000)
|
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_3)
|
||||||
NgraphCustomOp(const ngraph::OutputVector& inputs,
|
NgraphCustomOp(const ngraph::OutputVector& inputs,
|
||||||
#else
|
#else
|
||||||
NgraphCustomOp(const ngraph::NodeVector& inputs,
|
NgraphCustomOp(const ngraph::NodeVector& inputs,
|
||||||
@ -112,7 +112,7 @@ public:
|
|||||||
|
|
||||||
std::shared_ptr<ngraph::Node> copy_with_new_args(const ngraph::NodeVector& new_args) const override
|
std::shared_ptr<ngraph::Node> copy_with_new_args(const ngraph::NodeVector& new_args) const override
|
||||||
{
|
{
|
||||||
#if INF_ENGINE_VER_MAJOR_GT(2020020000)
|
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_3)
|
||||||
return std::make_shared<NgraphCustomOp>(ngraph::as_output_vector(new_args), params);
|
return std::make_shared<NgraphCustomOp>(ngraph::as_output_vector(new_args), params);
|
||||||
#else
|
#else
|
||||||
return std::make_shared<NgraphCustomOp>(new_args, params);
|
return std::make_shared<NgraphCustomOp>(new_args, params);
|
||||||
@ -283,7 +283,7 @@ InfEngineNgraphNode::InfEngineNgraphNode(const std::vector<Ptr<BackendNode> >& n
|
|||||||
{"internals", shapesToStr(internals)}
|
{"internals", shapesToStr(internals)}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if INF_ENGINE_VER_MAJOR_GT(2020020000)
|
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2020_3)
|
||||||
ngraph::OutputVector inp_nodes;
|
ngraph::OutputVector inp_nodes;
|
||||||
#else
|
#else
|
||||||
ngraph::NodeVector inp_nodes;
|
ngraph::NodeVector inp_nodes;
|
||||||
|
@ -25,10 +25,11 @@
|
|||||||
#define INF_ENGINE_RELEASE_2019R3 2019030000
|
#define INF_ENGINE_RELEASE_2019R3 2019030000
|
||||||
#define INF_ENGINE_RELEASE_2020_1 2020010000
|
#define INF_ENGINE_RELEASE_2020_1 2020010000
|
||||||
#define INF_ENGINE_RELEASE_2020_2 2020020000
|
#define INF_ENGINE_RELEASE_2020_2 2020020000
|
||||||
|
#define INF_ENGINE_RELEASE_2020_3 2020030000
|
||||||
|
|
||||||
#ifndef INF_ENGINE_RELEASE
|
#ifndef INF_ENGINE_RELEASE
|
||||||
#warning("IE version have not been provided via command-line. Using 2020.2 by default")
|
#warning("IE version have not been provided via command-line. Using 2020.3 by default")
|
||||||
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2020_2
|
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2020_3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
|
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
|
||||||
|
Loading…
Reference in New Issue
Block a user