def _ops_have_same_num_inputs(op1: Operator, op2: Operator) -> bool:
    """Helper function to check whether op1 and op2 can be grouped together"""
    num_inputs_1 = len(op1._attrs["inputs"])
    num_inputs_2 = len(op2._attrs["inputs"])
    return num_inputs_1 > 0 and num_inputs_1 == num_inputs_2
Helper function to check whether op1 and op2 can be grouped together
python/aitemplate/compiler/transform/fuse_group_ops.py