afe.backends.mpk.nodeο
Functions for making MPK JSON node descriptions.
Functionsο
|
Convert un-nested tuples to a list. |
|
Get node size in bytes. |
|
Get the output node names. |
Convert a list of MPK JSON nodes to a list of inputs for MLA or EV74 plugin. |
Module Contentsο
- afe.backends.mpk.node.flatten_tuple(data: afe.ir.defines.DataValue[_A]) List[_A] [source]ο
Convert un-nested tuples to a list. Given a tuple of 0, 2, or more tensors, the tuple elements are returned. Given a tensor, the tensor is returned as a list of 1 item. An exception is raised for other inputs.
- Parameters:
data β Data value
- Returns:
Flattened data value
- afe.backends.mpk.node.get_node_size(node: afe.ir.node.AwesomeNode) int [source]ο
Get node size in bytes.
- Parameters:
node β AwesomeNode
- Returns:
Number of bytes.
- afe.backends.mpk.node.get_output_node_names(node_name: str, output_type: afe.ir.defines.DataValue[afe.ir.tensor_type.TensorType], output_names: Dict[str, str]) afe.ir.defines.DataValue[str] [source]ο
Get the output node names. Check if output node is an output of the model and if it is original model name is added to the ModelSDK name.
- afe.backends.mpk.node.get_plugin_input_nodes(input_nodes: List[afe.backends.mpk.defines.InOutNodesMPKData]) List[afe.backends.mpk.defines.PluginInputNodeMPKData] [source]ο
Convert a list of MPK JSON nodes to a list of inputs for MLA or EV74 plugin.
- Parameters:
input_node β MPK JSON objects representing inputs to the AwesomeNode.
- Returns:
PluginInputNodeMPKData class with input node.