def layernorm_gen_function(func_attrs: Dict[str, Any]) -> str:
    """Generate function body.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.

    Returns
    -------
    str
        The rendered template of generated function body.
    """
    dim = -1
    shapes = func_attrs["inputs"][0]._attrs["shape"]

    assert isinstance(
        shapes[dim], IntImm
    ), "layernorm requires reduction dim to be static"

    return gen_function(
        func_attrs,
        SHAPE_EVAL_TEMPLATE,
        EXEC_TEMPLATE,
        EXTRA_HEADERS,
        get_func_signature,
    )
Generate function body.

    Parameters
    ----------
    func_attrs : Dict
        Operation attributes.

    Returns
    -------
    str
        The rendered template of generated function body.
    
python/aitemplate/backend/rocm/normalization/layernorm.py