openvino.runtime.passes.Matcher¶
- class openvino.runtime.passes.Matcher¶
Bases:
pybind11_builtins.pybind11_object
openvino.runtime.passes.Matcher wraps ov::pass::pattern::Matcher
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: openvino._pyopenvino.passes.Matcher, node: openvino._pyopenvino.Node, name: str) -> None
Creates Matcher object with given pattern root node and matcher name. Matcher object is used for pattern matching on Model.
- param node
pattern root node.
- type node
openvino.runtime.Node
- param name
pattern name. Usually matches the MatcherPass class name.
- type name
str
__init__(self: openvino._pyopenvino.passes.Matcher, output: ov::Output<ov::Node>, name: str) -> None
Creates Matcher object with given pattern root node output and matcher name. Matcher object is used for pattern matching on Model.
- param node
pattern root node output.
- type node
openvino.runtime.Output
- param name
pattern name. Usually matches the MatcherPass class name.
- type name
str
Methods
__delattr__
(name, /)Implement delattr(self, name).
__dir__
()Default dir() implementation.
__eq__
(value, /)Return self==value.
__format__
(format_spec, /)Default object formatter.
__ge__
(value, /)Return self>=value.
__getattribute__
(name, /)Return getattr(self, name).
__gt__
(value, /)Return self>value.
__hash__
()Return hash(self).
__init__
(*args, **kwargs)Overloaded function.
This method is called when a class is subclassed.
__le__
(value, /)Return self<=value.
__lt__
(value, /)Return self<value.
__ne__
(value, /)Return self!=value.
__new__
(**kwargs)Helper for pickle.
__reduce_ex__
(protocol, /)Helper for pickle.
__repr__
()Return repr(self).
__setattr__
(name, value, /)Implement setattr(self, name, value).
Size of object in memory, in bytes.
__str__
()Return str(self).
Abstract classes can override this to customize issubclass().
get_match_nodes
(self)Get NodeVector of matched nodes.
get_match_root
(self)Get matched root node inside Model.
get_match_value
(self)Get matched node output inside Model.
get_match_values
(self)Get OutputVector of matched outputs.
get_name
(self)Get Matcher name.
get_pattern_value_map
(self)Get map which can be used to access matched nodes using nodes from pattern.
match
(*args, **kwargs)Overloaded function.
- __class__¶
alias of
pybind11_builtins.pybind11_type
- __delattr__(name, /)¶
Implement delattr(self, name).
- __dir__()¶
Default dir() implementation.
- __eq__(value, /)¶
Return self==value.
- __format__(format_spec, /)¶
Default object formatter.
- __ge__(value, /)¶
Return self>=value.
- __getattribute__(name, /)¶
Return getattr(self, name).
- __gt__(value, /)¶
Return self>value.
- __hash__()¶
Return hash(self).
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: openvino._pyopenvino.passes.Matcher, node: openvino._pyopenvino.Node, name: str) -> None
Creates Matcher object with given pattern root node and matcher name. Matcher object is used for pattern matching on Model.
- param node
pattern root node.
- type node
openvino.runtime.Node
- param name
pattern name. Usually matches the MatcherPass class name.
- type name
str
__init__(self: openvino._pyopenvino.passes.Matcher, output: ov::Output<ov::Node>, name: str) -> None
Creates Matcher object with given pattern root node output and matcher name. Matcher object is used for pattern matching on Model.
- param node
pattern root node output.
- type node
openvino.runtime.Output
- param name
pattern name. Usually matches the MatcherPass class name.
- type name
str
- __init_subclass__()¶
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- __le__(value, /)¶
Return self<=value.
- __lt__(value, /)¶
Return self<value.
- __ne__(value, /)¶
Return self!=value.
- __new__(**kwargs)¶
- __reduce__()¶
Helper for pickle.
- __reduce_ex__(protocol, /)¶
Helper for pickle.
- __repr__()¶
Return repr(self).
- __setattr__(name, value, /)¶
Implement setattr(self, name, value).
- __sizeof__()¶
Size of object in memory, in bytes.
- __str__()¶
Return str(self).
- __subclasshook__()¶
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- get_match_nodes(self: openvino._pyopenvino.passes.Matcher) List[openvino._pyopenvino.Node] ¶
Get NodeVector of matched nodes. Should be used after match() method is called.
- Returns
matched nodes vector.
- Return type
List[openvino.runtime.Node]
- get_match_root(self: openvino._pyopenvino.passes.Matcher) openvino._pyopenvino.Node ¶
Get matched root node inside Model. Should be used after match() method is called.
- Returns
matched node.
- Return type
- get_match_value(self: openvino._pyopenvino.passes.Matcher) ov::Output<ov::Node> ¶
Get matched node output inside Model. Should be used after match() method is called.
- Returns
matched node output.
- Return type
- get_match_values(self: openvino._pyopenvino.passes.Matcher) List[ov::Output<ov::Node>] ¶
Get OutputVector of matched outputs. Should be used after match() method is called.
- Returns
matched outputs vector.
- Return type
List[openvino.runtime.Output]
- get_name(self: openvino._pyopenvino.passes.Matcher) str ¶
Get Matcher name.
- Returns
openvino.runtime.passes.Matcher name.
- Return type
str
- get_pattern_value_map(self: openvino._pyopenvino.passes.Matcher) Dict[openvino._pyopenvino.Node, ov::Output<ov::Node>] ¶
Get map which can be used to access matched nodes using nodes from pattern. Should be used after match() method is called.
- Returns
mapping of pattern nodes to matched nodes.
- Return type
dict
- match(*args, **kwargs)¶
Overloaded function.
match(self: openvino._pyopenvino.passes.Matcher, arg0: ov::Output<ov::Node>) -> bool
Matches registered pattern starting from given output.
- return
status of matching.
- rtype
bool
match(self: openvino._pyopenvino.passes.Matcher, arg0: openvino._pyopenvino.Node) -> bool
Matches registered pattern starting from given Node.
- return
status of matching.
- rtype
bool