|
PyTimeloop
|
A network component. More...


Public Member Functions | |
| declare_attrs (cls, *args, **kwargs) | |
| Initialize the attributes of this node. | |
| __init__ (self, *args, **kwargs) | |
Public Member Functions inherited from pytimeloop.timeloopfe.v4.arch.Component | |
| __init__ (self, *args, **kwargs) | |
Public Member Functions inherited from pytimeloop.timeloopfe.v4.arch.Leaf | |
| __init__ (self, *args, **kwargs) | |
| parse_expressions (self, Optional[Dict[str, Any]] symbol_table=None, Optional[set] parsed_ids=None) | |
| Parse the expressions in the leaf node. | |
| get_fanout (self) | |
Public Member Functions inherited from pytimeloop.timeloopfe.v4.arch.ArchNode | |
| __init__ (self, *args, **kwargs) | |
| "Leaf" | name2leaf (self, str name) |
| Finds a leaf node with the given name. | |
| "Leaf" | find (self, *args, **kwargs) |
| Alias for name2leaf function. | |
| "constraints.ConstraintGroup" | name2constraints (self, str name) |
| Retrieves the constraints of a leaf node with the given name. | |
Public Member Functions inherited from pytimeloop.timeloopfe.common.nodes.Node | |
| __init__ (self, *args, **kwargs) | |
| get_specifiers_from_processors (cls, "BaseSpecification" spec) | |
| Get the specifiers that have been set from processors. | |
| reset_specifiers_from_processors (cls, Optional[Type] processor=None) | |
| Reset the specifiers that have been set from processors. | |
| reset_processor_elems (cls, Optional[Type] processor=None) | |
| recognize_all (cls, bool recognize_all=True) | |
| Set whether all attributes under this node should be recognized. | |
| str | get_tag (self) |
| Get the tag of this node. | |
| Iterable[Tuple[Union[str, int], Any]] | items (self) |
| Get iterable of (key, value) or (index, value) pairs. | |
| T | combine_index (self, Union[str, int] key, T value) |
| Combine the value at the given key with the given value. | |
| str | get_name (self, Union[Set, None] seen=None) |
| Get the name of this node. | |
| Any | recursive_apply (self, callable func, bool self_first=False, set applied_to=None) |
| Apply a function to this node and all subnodes. | |
| clean_empties (self) | |
| Remove empty nodes from this node and all subnodes. | |
| bool | isempty (self) |
| Return True if this node is empty. | |
| bool | isempty_recursive (self) |
| Return True if this node or all subnodes are empty. | |
| add_attr (cls, str key_or_tag, Optional[Union[type, Tuple[type,...], Tuple[None,...], Tuple[str,...], None]] required_type=None, Any default=default_unspecified_, Optional[Callable] callfunc=None, Optional[bool] part_name_match=None, Optional[bool] no_change_key=None, Any _processor_responsible_for_removing=None, Optional[Dict[str, TypeSpecifier]] _add_checker_to=None) | |
| Initialize a type specifier for this class. | |
| List[T] | get_nodes_of_type (self, Type[T] node_type) |
| Return a list of all subnodes of a given type. | |
| Callable | get_setter_lambda (self, Union[str, int] keytag) |
| Get a function that can be used to set a value in this node. | |
| Callable | get_combiner_lambda (self, Union[str, int] keytag) |
| Get a function that can be used to combine a value to this node. | |
| List[Tuple[Any, Callable]] | get_setters_for_keytag (self, str keytag, bool recursive=True) |
| Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given key/tag. | |
| List[Tuple[Any, Callable]] | get_combiners_for_keytag (self, str keytag, bool recursive=True) |
| Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given key/tag. | |
| List[Tuple[Any, Callable]] | get_setters_for_type (self, Type t, bool recursive=True) |
| Get a list of tuples of the form (value, setter) for all keys/tags in this node that match the given type. | |
| List[Tuple[Any, Callable]] | get_combiners_for_type (self, Type t, bool recursive=True) |
| Get a list of tuples of the form (value, combiner) for all keys/tags in this node that match the given type. | |
| __str__ (self) | |
| Return the name of this node. | |
| __format__ (self, format_spec) | |
| Formats the name of this node. | |
| bool | is_defined_non_default_non_empty (self, str key) |
| Returns True if the given key is defined in this node and is not the default value and is not empty. | |
| Any | __getitem__ (self, Union[str, int] key) |
| Get the value at the given key or index. | |
| __setitem__ (self, Union[str, int] key, Any value) | |
| Set the value at the given key or index. | |
| unique_class_name (cls) | |
| Return a unique name for this class. | |
Public Member Functions inherited from pytimeloop.timeloopfe.common.nodes.DictNode | |
| __init__ (self, *args, __node_skip_parse=False, **kwargs) | |
| require_one_of (cls, *args) | |
| Require that at least one of the given keys is present. | |
| require_all_or_none_of (cls, *args) | |
| Require that all or none of the given keys are present. | |
| "DictNode" | combine (self, "DictNode" other) |
| Combines this dictionary with another dictionary. | |
| "DictNode" | from_yaml_files (cls, *Union[str, List[str], Path, list[Path]] files, Dict[str, Any] jinja_parse_data=None, **kwargs) |
| Loads a dictionary from one more more yaml files. | |
| Any | __getitem__ (self, Any __key) |
| None | __setitem__ (self, Any __key, Any __value) |
| Any | get (self, Any __key, Any __default=None) |
| Gets a key from the dictionary. | |
| Any | setdefault (self, Any __key, Any __default=None) |
| Sets the default value for a key. | |
| Any | pop (self, Any __key, Any __default=None) |
| Pops a key from the dictionary. | |
| None | check_unrecognized (self, *args, **kwargs) |
| Check for unrecognized keys in this node and all subnodes. | |
| __getattr__ (self, name) | |
| Index into the attributes or the contents of this node. | |
| __setattr__ (self, name, value) | |
Additional Inherited Members | |
Static Public Member Functions inherited from pytimeloop.timeloopfe.common.nodes.Node | |
| "BaseSpecification" | get_global_spec () |
| Get the global specification object. | |
| set_global_spec ("BaseSpecification" spec) | |
| Set the global specification object. | |
| Any | try_combine (Any a, Any b, Union["Node", None] innonde=None, Union[int, str, None] index=None) |
| Try to combine two values. | |
Public Attributes inherited from pytimeloop.timeloopfe.v4.arch.Component | |
| str | subclass = self["subclass"] |
| List[str] | required_actions = self["required_actions"] |
| float | area_scale = self["area_scale"] |
| float | energy_scale = self["energy_scale"] |
| bool | enabled = self["enabled"] |
Public Attributes inherited from pytimeloop.timeloopfe.v4.arch.Leaf | |
| str | name = self["name"] |
| Attributes | attributes = self["attributes"] |
| Spatial | spatial = self["spatial"] |
| constraints.ConstraintGroup | constraints = self["constraints"] |
| SparseOptimizationGroup | sparse_optimizations |
Public Attributes inherited from pytimeloop.timeloopfe.common.nodes.Node | |
| Node | parent_node = None |
| "BaseSpecification" | spec = Node.get_global_spec() |
| logger = logging.getLogger(self.__class__.__name__) | |
| from_data = None | |
Protected Member Functions inherited from pytimeloop.timeloopfe.v4.arch.Component | |
| _check_unrecognized (self, *args, **kwargs) | |
Protected Member Functions inherited from pytimeloop.timeloopfe.common.nodes.Node | |
| Dict[str, TypeSpecifier] | _get_type_specifiers (cls, "BaseSpecification" spec) |
| Get the type specifiers for this node. | |
| _get_all_recognized (self) | |
| Dict[Union[str, int], TypeSpecifier] | _get_index2checker (self, Optional[List[Tuple[str, Any]]] key2elem=None) |
| _parse_elem (self, Union[str, int] key, TypeSpecifier check, Any value_override=None) | |
| _parse_elems (self) | |
| _parse_extra_elems (self, List[Tuple[str, Any]] key2elem) | |
| _parse_expression (self, Union[str, int] index, Dict[str, Any] symbol_table, Optional[TypeSpecifier] checker=None) | |
Protected Member Functions inherited from pytimeloop.timeloopfe.common.nodes.DictNode | |
| _update_combine_pre_parse (self, dict other) | |
| None | _check_alias (self, key) |
Static Protected Member Functions inherited from pytimeloop.timeloopfe.common.nodes.Node | |
| str | _get_tag (x) |
Protected Attributes inherited from pytimeloop.timeloopfe.v4.arch.Component | |
| str | _class = self["class"] |
Protected Attributes inherited from pytimeloop.timeloopfe.common.nodes.Node | |
| tuple | _init_args = (args, kwargs) |
| bool | _default_parse = False |
Protected Attributes inherited from pytimeloop.timeloopfe.common.nodes.DictNode | |
| _require_one_of = _require_one_of | |
| _require_all_or_none_of = _require_all_or_none_of | |
A network component.
This class inherits from the Component class and provides additional functionality specific to networks.
| pytimeloop.timeloopfe.v4.arch.Network.__init__ | ( | self, | |
| * | args, | ||
| ** | kwargs ) |
| pytimeloop.timeloopfe.v4.arch.Network.declare_attrs | ( | cls, | |
| * | args, | ||
| ** | kwargs ) |
Initialize the attributes of this node.
Reimplemented from pytimeloop.timeloopfe.v4.arch.Component.