23 #include "ngraph/deprecated.hpp"
24 #include "ngraph/function.hpp"
25 #include "ngraph/node.hpp"
26 #include "ngraph/util.hpp"
32 enum class PassProperty : uint32_t
35 REQUIRE_STATIC_SHAPE = 0x1,
37 CHANGE_DYNAMIC_STATE = 1 << 1,
40 typedef EnumMask<PassProperty> PassPropertyMask;
41 const PassPropertyMask all_pass_property_off;
42 using param_callback = std::function<bool(
const std::shared_ptr<const ::ngraph::Node>)>;
54 void set_name(
const std::string& name) { m_name = name; }
55 std::string get_name()
const;
59 using type_info_t = DiscreteTypeInfo;
61 virtual const type_info_t& get_type_info()
const = 0;
64 void set_property(
const PassPropertyMask& prop,
bool value);
66 param_callback m_transformation_callback =
67 [](
const std::shared_ptr<const Node>&) ->
bool {
return false; };
68 bool m_has_default_callback =
true;
71 PassPropertyMask m_property;
78 NGRAPH_RTTI_DECLARATION;
80 virtual bool run_on_function(std::shared_ptr<ngraph::Function>) = 0;
83 class NGRAPH_DEPRECATED("Use MatcherPass or
FunctionPass instead.") NGRAPH_API NodePass
87 NGRAPH_RTTI_DECLARATION;
89 virtual bool run_on_node(std::shared_ptr<ngraph::Node>) = 0;
93 enum class FusionType : uint32_t
97 DIFFERENTIABLE_FUSIONS = 0x1,
98 REGULAR_FUSIONS = 0x2,
102 ALL_FUSIONS = 0xFFFFFFFF
104 typedef EnumMask<FusionType> FusionTypeMask;