def copy_src_op_attributes(dst, src):
    """
    Copy over all op attributes that need to be preserved. Inputs/outputs
    of the op are not handled by this function.
    """
    if len(dst.src_ops()) != 1 or len(src.src_ops()) != 1:
        return False
    dst_op = list(dst.src_ops())[0]
    src_op = list(src.src_ops())[0]
    attrs = ["alpha"]
    for attr in attrs:
        if attr in src_op._attrs:
            dst_op._attrs[attr] = src_op._attrs[attr]
    return True

    Copy over all op attributes that need to be preserved. Inputs/outputs
    of the op are not handled by this function.
    
python/aitemplate/compiler/transform/transform_utils.py