init_node_info.hpp
Go to the documentation of this file.
1 // Copyright (C) 2018-2021 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #pragma once
6 
7 /**
8  * @brief Defines initialize node runtime information pass
9  * @file init_node_info.hpp
10  */
11 
12 #include <vector>
13 #include <memory>
14 
15 #include <transformations_visibility.hpp>
16 
17 #include <ngraph/pass/graph_rewrite.hpp>
18 
19 /**
20  * @brief ngraph namespace
21  */
22 namespace ngraph {
23 
24 /**
25  * @brief ngraph::pass namespace
26  */
27 namespace pass {
28 
29 class TRANSFORMATIONS_API InitNodeInfo;
30 
31 } // namespace pass
32 } // namespace ngraph
33 
34 /**
35  * @ingroup ie_transformation_common_api
36  * @brief InitNodeInfo transformation helps to set runtime info attributes in a single place.
37  *
38  * Every runtime info attribute that needs to be initialized should be registered
39  * in run_on_function method. Also do not forget to override init methods for registered
40  * attribute.
41  * This transformations should be called first in transformation pipeline. If attribute was
42  * already set initialization will be skipped for this node.
43  */
44 class ngraph::pass::InitNodeInfo: public ngraph::pass::FunctionPass {
45 public:
46  NGRAPH_RTTI_DECLARATION;
47  bool run_on_function(std::shared_ptr<ngraph::Function> f) override;
48 };
InitNodeInfo transformation helps to set runtime info attributes in a single place.
Definition: init_node_info.hpp:44
ngraph namespace
Definition: add_fake_quantize_fusion.hpp:14