def function_filter(cfg, func_attrs, offset):
    """Generates function filter.

    Parameters
    ----------
    cfg: str
        The filename generated for profiler.
    func_attrs : Dict
        Stores the operation attributes.
    offset: Int
        Offset of split(cfg,"_") to get conv2d specialization

    Returns
    -------
    bool
        If input cfg should be filtered.
    """
    from ck_lib.conv2d_operation import Conv2DSpecialization

    kh = func_attrs["KH"]
    kw = func_attrs["KW"]
    pad = func_attrs["pad"]
    stride = func_attrs["stride"]
    cond0 = kh == 1 and kw == 1 and pad == 0
    cond1 = stride == 1
    spec = int(cfg.split("_")[offset])
    if cond0 and cond1:  # 1x1, stride 1, pad 0
        return spec == Conv2DSpecialization.ConvFwd1x1S1P0.value
    if cond0 and not cond1:  # 1x1, pad 0
        return spec == Conv2DSpecialization.ConvFwd1x1P0.value
    return True
Generates function filter.

    Parameters
    ----------
    cfg: str
        The filename generated for profiler.
    func_attrs : Dict
        Stores the operation attributes.
    offset: Int
        Offset of split(cfg,"_") to get conv2d specialization

    Returns
    -------
    bool
        If input cfg should be filtered.
    
python/aitemplate/backend/rocm/conv2d/common.py