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.
|
Classes | |
class | OnnxTensorCategory |
Internal representation of ONNX tensor category. More... | |
class | OnnxTensorType |
Functions | |
ModelProto | parse_onnx_model_from_path (str onnx_model_path) |
def | add_attribute (NodeProto node, str name, Any value) |
def | add_branch_attribute (GraphProto graph, int branch=0) |
GraphProto | unroll_branches (GraphProto graph) |
def | is_dynamic (ModelProto model) |
ModelProto | parse_dynamic_onnx_model (ModelProto model) |
Modifies the given onnx model if there's dynamic behavior in terms of an 'If' operator. More... | |
list[int]|int | get_attribute_ints_with_name (str name, Any attrs, list[int]|int|None default=None) |
Return the value of an attribute of given name from the given attributes If name does not exist in attrs, the default provided by the caller is used. More... | |
def | get_onnx_tensor_type (str name, ModelProto model) |
def | get_node_input_output_dimension_shapes (NodeProto node, ModelProto model) |
Variables | |
logger = logging.getLogger(__name__) | |
string | BRANCH_ATTRIBUTE = "branch" |
def zigzag.parser.onnx.utils.add_attribute | ( | NodeProto | node, |
str | name, | ||
Any | value | ||
) |
def zigzag.parser.onnx.utils.add_branch_attribute | ( | GraphProto | graph, |
int | branch = 0 |
||
) |
list[int] | int zigzag.parser.onnx.utils.get_attribute_ints_with_name | ( | str | name, |
Any | attrs, | ||
list[int] | int | None | default = None |
||
) |
Return the value of an attribute of given name from the given attributes If name does not exist in attrs, the default provided by the caller is used.
If the caller doesn't supply a default, an error is thrown.
def zigzag.parser.onnx.utils.get_node_input_output_dimension_shapes | ( | NodeProto | node, |
ModelProto | model | ||
) |
def zigzag.parser.onnx.utils.get_onnx_tensor_type | ( | str | name, |
ModelProto | model | ||
) |
def zigzag.parser.onnx.utils.is_dynamic | ( | ModelProto | model | ) |
ModelProto zigzag.parser.onnx.utils.parse_dynamic_onnx_model | ( | ModelProto | model | ) |
Modifies the given onnx model if there's dynamic behavior in terms of an 'If' operator.
All nodes are assigned a 'branch' attribute which specifies in which branch they live. The branch attribute starts from 0 and increases for each seen If operator. The nested graphs of the 'If' operators are then unrolled into a planar onnx model.
ModelProto zigzag.parser.onnx.utils.parse_onnx_model_from_path | ( | str | onnx_model_path | ) |
GraphProto zigzag.parser.onnx.utils.unroll_branches | ( | GraphProto | graph | ) |
string BRANCH_ATTRIBUTE = "branch" |
logger = logging.getLogger(__name__) |