11 #include "ngraph/deprecated.hpp"
12 #include "ngraph/function.hpp"
13 #include "ngraph/node.hpp"
14 #include "ngraph/pass/pass_config.hpp"
15 #include "ngraph/util.hpp"
21 enum class PassProperty : uint32_t
24 REQUIRE_STATIC_SHAPE = 0x1,
26 CHANGE_DYNAMIC_STATE = 1 << 1,
29 typedef EnumMask<PassProperty> PassPropertyMask;
30 const PassPropertyMask all_pass_property_off;
42 void set_name(
const std::string& name) { m_name = name; }
43 std::string get_name()
const;
55 m_pass_config = pass_config;
65 NGRAPH_DEPRECATED(
"Please use transformation_callback method instead")
66 bool m_transformation_callback(const std::shared_ptr<const
Node>& node)
68 return m_pass_config->get_callback(get_type_info())(node);
76 return m_pass_config->get_callback(get_type_info())(node);
81 virtual const type_info_t& get_type_info()
const = 0;
90 std::shared_ptr<PassConfig> m_pass_config;
96 NGRAPH_RTTI_DECLARATION;
98 virtual bool run_on_function(std::shared_ptr<ngraph::Function>) = 0;
105 NGRAPH_RTTI_DECLARATION;
107 virtual bool run_on_node(std::shared_ptr<ngraph::Node>) = 0;
111 enum class FusionType : uint32_t
115 DIFFERENTIABLE_FUSIONS = 0x1,
116 REGULAR_FUSIONS = 0x2,
120 ALL_FUSIONS = 0xFFFFFFFF
122 typedef EnumMask<FusionType> FusionTypeMask;
Definition: manager.hpp:20
MatcherPass is a basic block for pattern based transformations. It describes pattern and action that ...
Definition: graph_rewrite.hpp:48
void set_callback(const param_callback &callback)
Set callback for particular transformation type. This method set global callback. For more details se...
bool get_property(const PassPropertyMask &prop_mask) const
Check if this pass has all the pass properties.
std::shared_ptr< PassConfig > get_pass_config()
Allows to access PassConfig shared instance.
Definition: pass.hpp:60
virtual void set_pass_config(const std::shared_ptr< PassConfig > &pass_config)
Set PassConfig for particular transformation instance.
Definition: pass.hpp:53
bool transformation_callback(const std::shared_ptr< const Node > &node)
Applies callback for given node. By default callback returns false.
Definition: pass.hpp:74
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:16