Deeploy.Targets.Generic.Parsers.MatMulParser
- class Deeploy.Targets.Generic.Parsers.MatMulParser(noBiasHoisting=True)
- Bases: - NodeParser- Methods - __init__(noBiasHoisting=True)
 - __init__([noBiasHoisting])- parse(ctxt, node[, default_channels_first, ...])- DONT OVERRIDE - Uses other NodeParser functions to implement a full parsing passing of the node - parseInputs(ctxt, node)- DONT OVERRIDE - Takes care of hoisting IO tensors into the NetworkContext. - parseNode(node)- Parser-specific method to-be-implemented. - parseNodeCtxt(ctxt, node[, channels_first])- Parses the node's input and output tensors, and adds them to its operatorRepresentation. - parseOutputs(ctxt, node)- DONT OVERRIDE - registers the output tensor of the operator - Attributes - The internal representation of the operator this parser has analyzed that describes all relevant attributes of the node to be used by code generation - parseNode(node: Node) bool
- Parser-specific method to-be-implemented. Given a graphsurgeon node, this method returns whether its attributes are mappable by this parser. - Parameters:
- node (gs.Node) – Graphsurgeon node to be evaluated 
- Returns:
- False if any attribute in the node cannot be mapped correctly. 
- Return type:
- bool 
 
 - parseNodeCtxt(ctxt: NetworkContext, node: Node, channels_first: bool = True) Tuple[NetworkContext, bool]
- Parses the node’s input and output tensors, and adds them to its operatorRepresentation. May also be used to assert certain input- and output-level characteristics like correct dimensions. - Parameters:
- ctxt (NetworkContext) – Current NetworkContext 
- node (gs.Node) – Node to be analyzed 
- channels_first (bool) – Flag to indicate whether tensor dimensions are expected to be in CxHxW layout (true) or HxWxC layout (false) 
 
- Returns:
- Tuple of the updated NetworkContext and return boolean to indicate whether the node, including it’s IO tensors can be mapped. 
- Return type:
- Tuple[NetworkContext, bool] 
 
 - parse(ctxt: NetworkContext, node: Node, default_channels_first: bool = True, ioParse: bool = True) Tuple[NetworkContext, bool]
- DONT OVERRIDE - Uses other NodeParser functions to implement a full parsing passing of the node - Parameters:
- ctxt (NetworkContext) – Current NetworkContext 
- node (gs.Node) – Node to be parsed 
- default_channels_first (bool) – The default channels_first value if none is provided by the node’s attributes 
- ioParse (bool) – Flag to indicate whether to go through IO parsing or not 
 
- Returns:
- Returns updated NetworkContext and flag to indicate success 
- Return type:
- Tuple[NetworkContext, bool] 
 
 - classmethod parseInputs(ctxt: NetworkContext, node: Node) NetworkContext
- DONT OVERRIDE - Takes care of hoisting IO tensors into the NetworkContext. Also verifies that all inputs have been registered and the output has not been registered. - Parameters:
- ctxt (NetworkContext) – Current NetworkContext 
- node (gs.Node) – Node whose IO tensors should be hoisted 
 
- Returns:
- Updated NetworkContext with hoisted IO tensors 
- Return type:
 
 - classmethod parseOutputs(ctxt: NetworkContext, node: Node) NetworkContext
- DONT OVERRIDE - registers the output tensor of the operator - Parameters:
- ctxt (NetworkContext) – Current NetworkContext 
- node (gs.Node) – Operator whose outputs should be parsed 
 
- Returns:
- Updated NetworkContext 
- Return type:
 
 - operatorRepresentation: OperatorRepresentation
- The internal representation of the operator this parser has analyzed that describes all relevant attributes of the node to be used by code generation - Type:
- Dict[str, Any]