TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _create_functional_ir_node(node: torch._C.Node, inputs_map: Dict[torch._C.TensorType, torch._C.TensorType]) \
        -> IrNode:
    """
    Create an IrNode containing input and output connections information given a torch graph node.
    :param node: trace graph node
    :param inputs_map: Mapping
    :return: IrNode created from information in the trace graph node
    """
    outputs = [output for output in node.outputs()]
    op_type = ConnectedGraph._parse_op_type(node)
    # If there is a known mapping to an onnx type for this functional, use the onnx type as the op type
    if op_type in onnx_utils.pytorch_functional_name_to_onnx_dict.keys():
        op_type = onnx_utils.pytorch_functional_name_to_onnx_dict[op_type]
    ir_node = IrNode(node_type=op_type,
                     inputs=[inputs_map.get(inp, inp) for inp in node.inputs()],
                     outputs=outputs,
                     module=None)
    return ir_node

    Create an IrNode containing input and output connections information given a torch graph node.
    :param node: trace graph node
    :param inputs_map: Mapping
    :return: IrNode created from information in the trace graph node
    
Create an IrNode containing input and output connections information given a torch graph node.
Create an IrNode containing input and output connections information given a torch graph node .
def _create_functional_ir_node(node: torch._C.Node, inputs_map: Dict[torch._C.TensorType, torch._C.TensorType]) \
        -> IrNode:
    outputs = [output for output in node.outputs()]
    op_type = ConnectedGraph._parse_op_type(node)
    if op_type in onnx_utils.pytorch_functional_name_to_onnx_dict.keys():
        op_type = onnx_utils.pytorch_functional_name_to_onnx_dict[op_type]
    ir_node = IrNode(node_type=op_type,
                     inputs=[inputs_map.get(inp, inp) for inp in node.inputs()],
                     outputs=outputs,
                     module=None)
    return ir_node
def _create_functional_ir_node ( node : torch . _C . Node , inputs_map : Dict [ torch . _C . TensorType , torch . _C . TensorType ] ) -> IrNode : outputs = [ output for output in node . outputs ( ) ] op_type = ConnectedGraph . _parse_op_type ( node ) if op_type in onnx_utils . pytorch_functional_name_to_onnx_dict . keys ( ) : op_type = onnx_utils . pytorch_functional_name_to_onnx_dict [ op_type ] ir_node = IrNode ( node_type = op_type , inputs = [ inputs_map . get ( inp , inp ) for inp in node . inputs ( ) ] , outputs = outputs , module = None ) return ir_node
Create an IrNode containing input and output connections information given a torch graph node.
Create an IrNode containing input and output connections information given a torch graph node .
"""
    Create an IrNode containing input and output connections information given a torch graph node.
    :param node: trace graph node
    :param inputs_map: Mapping
    :return: IrNode created from information in the trace graph node
    """ # If there is a known mapping to an onnx type for this functional, use the onnx type as the op type
IrNode created from information in the trace graph node
IrNode created from information in the trace graph node
node
torch._C.Node
trace graph node
trace graph node
inputs_map
Dict[torch._C.TensorType, torch._C.TensorType]
None