mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
dnn: use OpenVINO 2020.3 defines
This commit is contained in:
parent
0c8da03869
commit
d2a9efd039
@ -135,9 +135,9 @@ endif()
|
||||
|
||||
if(INF_ENGINE_TARGET)
|
||||
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()
|
||||
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
|
||||
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>();
|
||||
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)));
|
||||
#else
|
||||
inputNodes[i] = Ptr<BackendNode>(new InfEngineNgraphNode(ieInpNode->node->get_output_as_single_output_node(oid, false)));
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
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,
|
||||
#else
|
||||
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
|
||||
{
|
||||
#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);
|
||||
#else
|
||||
return std::make_shared<NgraphCustomOp>(new_args, params);
|
||||
@ -283,7 +283,7 @@ InfEngineNgraphNode::InfEngineNgraphNode(const std::vector<Ptr<BackendNode> >& n
|
||||
{"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;
|
||||
#else
|
||||
ngraph::NodeVector inp_nodes;
|
||||
|
@ -25,10 +25,11 @@
|
||||
#define INF_ENGINE_RELEASE_2019R3 2019030000
|
||||
#define INF_ENGINE_RELEASE_2020_1 2020010000
|
||||
#define INF_ENGINE_RELEASE_2020_2 2020020000
|
||||
#define INF_ENGINE_RELEASE_2020_3 2020030000
|
||||
|
||||
#ifndef INF_ENGINE_RELEASE
|
||||
#warning("IE version have not been provided via command-line. Using 2020.2 by default")
|
||||
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2020_2
|
||||
#warning("IE version have not been provided via command-line. Using 2020.3 by default")
|
||||
#define INF_ENGINE_RELEASE INF_ENGINE_RELEASE_2020_3
|
||||
#endif
|
||||
|
||||
#define INF_ENGINE_VER_MAJOR_GT(ver) (((INF_ENGINE_RELEASE) / 10000) > ((ver) / 10000))
|
||||
|
Loading…
Reference in New Issue
Block a user