def mem_eff_attention_gen_function(func_attrs: Dict[str, Any]) -> str:
    """the function for generating attention kernel"""
    backend_spec = ROCMSpec()
    elem_input_type = backend_spec.dtype_to_lib_type(
        func_attrs["inputs"][0]._attrs["dtype"]
    )
    is_causal = func_attrs["causal"]
    return FUNC_TEMPLATE.render(
        elem_input_type=elem_input_type,
        is_causal=is_causal,
        func_signature=FUNC_SIGNATURE.render(func_name=func_attrs["name"]),
    )
the function for generating attention kernel
python/aitemplate/backend/rocm/attention/mem_eff_attention.py