ZigZag - Deep Learning Hardware Design Space Exploration
This repository presents the novel version of our tried-and-tested hardware Architecture-Mapping Design Space Exploration (DSE) Framework for Deep Learning (DL) accelerators. ZigZag bridges the gap between algorithmic DL decisions and their acceleration cost on specialized accelerators through a fast and accurate hardware cost estimation.
|
Extends the ABC for workloads. More...
Public Member Functions | |
def | __init__ (self, list[LayerNode] nodes, **Any attr) |
"DNNWorkload" | get_copy_no_dummy (self) |
Return a copy. More... | |
![]() | |
list[tuple[T, T]] | in_edges (self, T node, Literal[False] data) |
list[tuple[T, T, dict[str, Any]]] | in_edges (self, T node, Literal[True] data) |
list[tuple[T, T]] | in_edges (self, T node) |
list[tuple[T, T]]|list[tuple[T, T, dict[str, Any]]] | in_edges (self, T node, bool data=False) |
list[tuple[T, T, dict[str, Any]]] | out_edges (self, T node, Literal[True] data) |
list[tuple[T, T]] | out_edges (self, T node, Literal[False] data) |
list[tuple[T, T]] | out_edges (self, T node) |
list[tuple[T, T]]|list[tuple[T, T, dict[str, Any]]] | out_edges (self, T node, bool data=False) |
Iterator[tuple[T, int]] | in_degree (self) |
Iterator[tuple[T, int]] | out_degree (self, Literal[None] node) |
Iterator[tuple[T, int]] | out_degree (self) |
int | out_degree (self, T node) |
int|Iterator[tuple[T, int]] | out_degree (self, T|None node=None) |
Iterator[T] | successors (self, T node) |
Iterator[T] | predecessors (self, T node) |
Iterator[T] | topological_sort (self) |
None | add_node (self, T node) |
None | add_nodes_from (self, Sequence[T] node) |
None | remove_nodes_from (self, Iterator[T] nodes) |
None | add_edge (self, T edge_from, T edge_to) |
None | add_edges_from (self, Sequence[tuple[T, T]|tuple[T, T, Any]] edges) |
Iterator[list[T]] | all_simple_paths (self, T producer, T consumer) |
list[T] | shortest_path (self, T producer, T consumer) |
list[T] | node_list (self) |
T | get_node_with_id (self, int node_id) |
![]() | |
def | __init__ (self, int layer_id, str node_name, LayerNodeAttributes node_attr, MappingAttributes mapping_attr) |
To construct each layer node, algorithm equation/dimension/indirect relation are parsed. More... | |
LayerOperand | get_act_layer_op (self) |
Return the I LayerOperand: either the non-constant operand or one of the input operands if none are constant. More... | |
LayerOperand | get_weight_layer_op (self) |
Return the W LayerOperand: either the constant operand or one of the input operands if none are constant. More... | |
tuple[PrLoop, LoopList, PrScalingFactors] | build_pr_funcs (self) |
def | __str__ (self) |
def | __jsonrepr__ (self) |
JSON representation used for saving this object to a json file. More... | |
float | calc_tensor_size (self, LayerOperand layer_op, LayerDimSizes layer_dim_sizes) |
Calculates the tensor size (nb of elements) for the given operand layer_op with the given loop dimension sizes layer_dim_sizes. More... | |
def | calc_tensor_dim (self, LayerDim dim, LayerDimSizes layer_dim_sizes) |
dict[LayerDim, UnrollFactor] | calc_tensor_dims (self, LayerOperand layer_op, LayerDimSizes layer_dim_sizes) |
int | calc_pr_dimension_size_total (self, LayerDim dim) |
Compute the total pr dimension size of this node, taking padding into account. More... | |
def | extract_layer_info (self) |
This function extract basic information for each layer node. More... | |
list[LayerDim] | get_operand_irrelevant_layer_dims (self, LayerOperand layer_op) |
Return the irrelevant dimensions of layer operand 'layer_op'. More... | |
LayerNodeAttributes | extract_node_attr (self) |
Pack this layer node's attributes in a LayerNodeAttributes instance. More... | |
MappingAttributes | extract_mapping_attr (self) |
![]() | |
def | __init__ (self, int node_id, str node_name) |
str | __repr__ (self) |
Public Attributes | |
layer_node_list | |
![]() | |
type | |
equation | |
layer_dim_sizes | |
operand_precision | |
dimension_relations | |
padding | |
constant_operands | |
input_operand_source | |
spatial_mapping | |
spatial_mapping_hint | |
memory_operand_links | |
temporal_ordering | |
layer_operands | |
output_operand | |
input_operands | |
layer_dims | |
pr_scaling_factors | |
pr_layer_dim_sizes | |
loop_relevancy_info | |
pr_decoupled_relevancy_info | |
total_mac_count | |
operand_size_bit | |
operand_data_reuse | |
![]() | |
id | |
name | |
Additional Inherited Members | |
![]() | |
def | calc_pr_dimension_size (int sa, int a, int sb, int b) |
Calculates the number of unique indices c generated by iterating through the indices a in range(0,A,1) and b in range(0,B,1) according to the equation c = sa * a + sb * b. More... | |
Extends the ABC for workloads.
For user-defined workloads (from yaml), the DummyNodes are not saved so this class only holds (non-dummy) LayerNodes
def __init__ | ( | self, | |
list[LayerNode] | nodes, | ||
**Any | attr | ||
) |
"DNNWorkload" get_copy_no_dummy | ( | self | ) |
Return a copy.
DNNWorkloads don't contain DummyNodes in the first place.
layer_node_list |