def create_ait_operator_support(
    use_implicit_batch_dim=True,
    op_lowering_disallow_list=None,
    allow_int_inputs=False,
    allow_op_supports=None,
) -> ops.OperatorSupportBase:
    """Creates an `OperatorSupportBase` instance used for AIT splitting purpose."""
    # Create an `OperatorSupport` that declares a node supported if it
    # finds a registered AIT converter.
    support_dict: Dict[str, None] = {}
    for k in AIT_CONVERTERS.keys():
        # may need to switch the op name here
        support_dict[get_acc_ops_name(k)] = None
    supported_if_converter_registered = ops.OperatorSupport(support_dict=support_dict)

    op_lowering_disallow_set = (
        set() if op_lowering_disallow_list is None else set(op_lowering_disallow_list)
    )
    chained_not_supported_ops = (
        []
        if allow_int_inputs
        else [
            ops.OpSupports.decline_if_input_dtype(torch.int64),
            ops.OpSupports.decline_if_input_dtype(torch.int32),
            ops.OpSupports.decline_if_input_dtype(torch.uint8),
        ]
    )
    chained_not_supported_ops += [
        ops.OpSupports.decline_if_node_in_names(op_lowering_disallow_set),
        # 1. We only support subgraphs with torch.Tensor inputs for now
        ops.OpSupports.decline_if_input_dtype(torch.float64),
        ops.OpSupports.decline_if_input_dtype(dict),
        # 2. Node is supported if it has AIT converter:
        supported_if_converter_registered,
        # 3. Decline nodes that would trigger extra copies. This can happen if
        # we have an output that is just a view of an input, for example.
        # Note that this is not required for correctness, it is merely an
        # optimization.
        _decline_if_would_trigger_extra_copies(supported_if_converter_registered),
    ]
    if allow_op_supports:
        return ops.any_chain(ops.chain(*chained_not_supported_ops), *allow_op_supports)
    return ops.chain(*chained_not_supported_ops)
Creates an `OperatorSupportBase` instance used for AIT splitting purpose.
fx2ait/fx2ait/ait_splitter.py