TrainingExtensions/torch/src/python/aimet_torch/meta/connectedgraph.py
def _handle_input_ir_node_to_ignore(ir_node: IrNode, connections_to_ir_nodes_dict: ConnectionsToIrDictType):
    """
    Update the consumers of input ir_nodes to ignore to remove thoe incoming connections.
    :param ir_node: Tuple or list construct ir_node
    :param connections_to_ir_nodes_dict: Dictionary mapping connections to input ir_node and output ir_nodes
    """
    # For input ops like prim::Constant, disconnect it from the graph so it is not represented by ConnectedGraph.
    # For consumers of the input op, remove the input connection corresponding to the input from the input op.
    assert not ir_node.inputs
    for output in ir_node.outputs:
        consumers = connections_to_ir_nodes_dict[output][1]
        for consumer in consumers:
            consumer.inputs.remove(output)
        del connections_to_ir_nodes_dict[output]
    ir_node.outputs = []

    Update the consumers of input ir_nodes to ignore to remove thoe incoming connections.
    :param ir_node: Tuple or list construct ir_node
    :param connections_to_ir_nodes_dict: Dictionary mapping connections to input ir_node and output ir_nodes
    
Update the consumers of input ir_nodes to ignore to remove thoe incoming connections.
Update the consumers of input ir_nodes to ignore to remove thoe incoming connections .
def _handle_input_ir_node_to_ignore(ir_node: IrNode, connections_to_ir_nodes_dict: ConnectionsToIrDictType):
    assert not ir_node.inputs
    for output in ir_node.outputs:
        consumers = connections_to_ir_nodes_dict[output][1]
        for consumer in consumers:
            consumer.inputs.remove(output)
        del connections_to_ir_nodes_dict[output]
    ir_node.outputs = []
def _handle_input_ir_node_to_ignore ( ir_node : IrNode , connections_to_ir_nodes_dict : ConnectionsToIrDictType ) : assert not ir_node . inputs for output in ir_node . outputs : consumers = connections_to_ir_nodes_dict [ output ] [ 1 ] for consumer in consumers : consumer . inputs . remove ( output ) del connections_to_ir_nodes_dict [ output ] ir_node . outputs = [ ]
Update the consumers of input ir_nodes to ignore to remove thoe incoming connections.
Update the consumers of input ir_nodes to ignore to remove thoe incoming connections .
"""
    Update the consumers of input ir_nodes to ignore to remove thoe incoming connections.
    :param ir_node: Tuple or list construct ir_node
    :param connections_to_ir_nodes_dict: Dictionary mapping connections to input ir_node and output ir_nodes
    """ # For input ops like prim::Constant, disconnect it from the graph so it is not represented by ConnectedGraph. # For consumers of the input op, remove the input connection corresponding to the input from the input op.
ir_node
IrNode
Tuple or list construct ir_node
Tuple or list construct ir_node
connections_to_ir_nodes_dict
ConnectionsToIrDictType
Dictionary mapping connections to input ir_node and output ir_nodes
Dictionary mapping connections to input ir_node and output ir_nodes