23 #include "ngraph/deprecated.hpp"
24 #include "ngraph/function.hpp"
25 #include "ngraph/node.hpp"
26 #include "ngraph/pass/pass_config.hpp"
27 #include "ngraph/util.hpp"
33 enum class PassProperty : uint32_t
36 REQUIRE_STATIC_SHAPE = 0x1,
38 CHANGE_DYNAMIC_STATE = 1 << 1,
41 typedef EnumMask<PassProperty> PassPropertyMask;
42 const PassPropertyMask all_pass_property_off;
54 void set_name(
const std::string& name) { m_name = name; }
55 std::string get_name()
const;
67 m_pass_config = pass_config;
77 NGRAPH_DEPRECATED(
"Please use transformation_callback method instead")
78 bool m_transformation_callback(const std::shared_ptr<const
Node>& node)
80 return m_pass_config->get_callback(get_type_info())(node);
88 return m_pass_config->get_callback(get_type_info())(node);
93 virtual const type_info_t& get_type_info()
const = 0;
102 std::shared_ptr<PassConfig> m_pass_config;
108 NGRAPH_RTTI_DECLARATION;
110 virtual bool run_on_function(std::shared_ptr<ngraph::Function>) = 0;
117 NGRAPH_RTTI_DECLARATION;
119 virtual bool run_on_node(std::shared_ptr<ngraph::Node>) = 0;
123 enum class FusionType : uint32_t
127 DIFFERENTIABLE_FUSIONS = 0x1,
128 REGULAR_FUSIONS = 0x2,
132 ALL_FUSIONS = 0xFFFFFFFF
134 typedef EnumMask<FusionType> FusionTypeMask;
Definition: manager.hpp:32
MatcherPass is a basic block for pattern based transformations. It describes pattern and action that ...
Definition: graph_rewrite.hpp:60
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:72
virtual void set_pass_config(const std::shared_ptr< PassConfig > &pass_config)
Set PassConfig for particular transformation instance.
Definition: pass.hpp:65
bool transformation_callback(const std::shared_ptr< const Node > &node)
Applies callback for given node. By default callback returns false.
Definition: pass.hpp:86
The Intel nGraph C++ API.
Definition: attribute_adapter.hpp:28