Skip to content

Commit

Permalink
Added nGraph as a public dependency (openvinotoolkit#6071)
Browse files Browse the repository at this point in the history
* Added nGraph as a public dependency

* Fixed Windows warning

* Fixed CMake

* Fixed constant op

* Fixed typo

* Fixed comments

* Revert ngraph libraries

* Fixed build

* Fixed IE::ngraph

* Fixed git merge
  • Loading branch information
ilyachur authored and akuporos committed Sep 29, 2021
1 parent dce8636 commit 4e0d039
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 49 deletions.
7 changes: 1 addition & 6 deletions inference-engine/include/cpp/ie_cnn_network.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
#include "ie_common.h"
#include "ie_data.h"
#include "ie_extension.h"

namespace ngraph {

class Function;

} // namespace ngraph
#include <ngraph/function.hpp>

namespace InferenceEngine {

Expand Down
1 change: 1 addition & 0 deletions inference-engine/include/ie_extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <string>
#include <vector>

#include <ngraph/opsets/opset.hpp>
#include "ie_iextension.h"
#include "details/ie_so_pointer.hpp"

Expand Down
6 changes: 1 addition & 5 deletions inference-engine/include/ie_icnn_network.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@
#include "ie_data.h"
#include "ie_input_info.hpp"

namespace ngraph {

class Function;

} // namespace ngraph
#include <ngraph/function.hpp>

namespace InferenceEngine {

Expand Down
8 changes: 1 addition & 7 deletions inference-engine/include/ie_iextension.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "ie_layouts.h"
#include "ie_blob.h"
#include "ie_version.hpp"
#include <ngraph/opsets/opset.hpp>

/**
* @def INFERENCE_EXTENSION_API(TYPE)
Expand All @@ -30,13 +31,6 @@
#define INFERENCE_EXTENSION_API(TYPE) INFERENCE_ENGINE_API(TYPE)
#endif

namespace ngraph {

class OpSet;
class Node;

} // namespace ngraph

namespace InferenceEngine {

/**
Expand Down
6 changes: 0 additions & 6 deletions inference-engine/include/ie_parameter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@

#include "ie_blob.h"

namespace ngraph {

class Variant;

} // namespace ngraph

namespace InferenceEngine {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class CustomReluOp : public ngraph::op::Op {
return std::make_shared<CustomReluOp>(new_args.at(0));
}

bool visit_attributes(ngraph::AttributeVisitor& visitor) override {
bool visit_attributes(ngraph::AttributeVisitor&) override {
return true;
}
};
Expand Down
5 changes: 3 additions & 2 deletions inference-engine/src/inference_engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ if (TBBBIND_2_4_FOUND)
endif()

target_link_libraries(${TARGET_NAME} PRIVATE pugixml::static openvino::itt ${CMAKE_DL_LIBS} Threads::Threads
ngraph ngraph::frontend_manager::static inference_engine_transformations)
ngraph::frontend_manager::static inference_engine_transformations
PUBLIC ngraph)

target_include_directories(${TARGET_NAME} INTERFACE
$<BUILD_INTERFACE:${PUBLIC_HEADERS_DIR}>
Expand Down Expand Up @@ -216,7 +217,7 @@ set_target_properties(${TARGET_NAME} ${TARGET_NAME}_obj ${TARGET_NAME}_s

# Export for build tree

export(TARGETS ${TARGET_NAME} NAMESPACE IE::
export(TARGETS ngraph ${TARGET_NAME} NAMESPACE IE::
APPEND FILE "${CMAKE_BINARY_DIR}/InferenceEngineTargets.cmake")

# Export for developer package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FakeAbs : public ngraph::op::Op {
std::shared_ptr<ngraph::Node> clone_with_new_inputs(const ngraph::OutputVector& new_args) const override {
return std::make_shared<FakeAbs>(new_args.at(0));
}
bool visit_attributes(ngraph::AttributeVisitor& visitor) override {
bool visit_attributes(ngraph::AttributeVisitor&) override {
return true;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class CustomAbs : public ngraph::op::Op {
std::shared_ptr<ngraph::Node> clone_with_new_inputs(const ngraph::OutputVector& new_args) const override {
return std::make_shared<CustomAbs>(new_args.at(0));
}
bool visit_attributes(ngraph::AttributeVisitor& visitor) override {
bool visit_attributes(ngraph::AttributeVisitor&) override {
return true;
}
};
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/abs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace ngraph
const NodeTypeInfo& get_type_info() const override { return type_info; }
/// \brief Constructs an absolute value operation.
Abs() = default;
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
/// \brief Constructs an absolute value operation.
///
/// \param arg Output that produces the input tensor.<br>
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/acos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace ngraph
/// Output `[d1, ...]`
///
Acos(const Output<Node>& arg);
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool evaluate(const HostTensorVector& outputs,
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/acosh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace ngraph

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/asin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace ngraph

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/asinh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace ngraph

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/atan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace ngraph

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/atanh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace ngraph

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/bucketize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace ngraph
const bool with_right_bound = true);

virtual void validate_and_infer_types() override;
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& inputs) const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/ceiling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace ngraph
/// \param arg Node that produces the input tensor.
Ceiling(const Output<Node>& arg);

bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }
virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
bool evaluate(const HostTensorVector& outputs,
Expand Down
2 changes: 2 additions & 0 deletions ngraph/core/include/ngraph/op/constant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ namespace ngraph
// Don't constant fold a constant; it would make a copy
bool constant_fold(OutputVector& outputs, const OutputVector& inputs) override
{
(void)outputs;
(void)inputs;
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/detection_output.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace ngraph
clone_with_new_inputs(const OutputVector& new_args) const override;

const DetectionOutputAttrs& get_attrs() const { return m_attrs; }
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

private:
DetectionOutputAttrs m_attrs;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/embedding_segments_sum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace ngraph
virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;

virtual bool visit_attributes(AttributeVisitor& visitor) override { return true; }
bool visit_attributes(AttributeVisitor&) override { return true; }

private:
static constexpr int EMB_TABLE = 0;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/mvn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace ngraph

virtual void validate_and_infer_types() override;

virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/prior_box.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace ngraph
static std::vector<float>
normalized_aspect_ratio(const std::vector<float>& aspect_ratio, bool flip);
const PriorBoxAttrs& get_attrs() const { return m_attrs; }
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/prior_box_clustered.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace ngraph
virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
const PriorBoxClusteredAttrs& get_attrs() const { return m_attrs; }
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;
bool evaluate(const HostTensorVector& outputs,
const HostTensorVector& inputs) const override;
bool has_evaluate() const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/proposal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace ngraph
virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
const ProposalAttrs& get_attrs() const { return m_attrs; }
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

protected:
ProposalAttrs m_attrs;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/reorg_yolo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace ngraph

void validate_and_infer_types() override;

virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/roi_align.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace ngraph
const PoolingMode mode);

virtual void validate_and_infer_types() override;
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;
virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& new_args) const override;

Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/scatter_elements_update.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace ngraph
const Output<Node>& axis);

virtual void validate_and_infer_types() override;
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

virtual std::shared_ptr<Node>
clone_with_new_inputs(const OutputVector& inputs) const override;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/util/scatter_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace ngraph
static constexpr NodeTypeInfo type_info{"ScatterBase", 3};
const NodeTypeInfo& get_type_info() const override { return type_info; }
virtual void validate_and_infer_types() override;
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

protected:
ScatterBase() = default;
Expand Down
2 changes: 1 addition & 1 deletion ngraph/core/include/ngraph/op/util/scatter_nd_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace ngraph
static constexpr int INDICES = 1;
static constexpr int UPDATES = 2;
virtual void validate_and_infer_types() override;
virtual bool visit_attributes(AttributeVisitor& visitor) override;
bool visit_attributes(AttributeVisitor& visitor) override;

protected:
ScatterNDBase() = default;
Expand Down

0 comments on commit 4e0d039

Please sign in to comment.