def gen_function_decl(func_attrs) -> str:
    """
    Generate function declaration.

    Returns
    -------
    str
        The function declaration string
    """
    backend_spec = CUDASpec()
    x, mask = func_attrs["inputs"]
    input_type = cuda_common.dtype_to_cuda_type(x._attrs["dtype"])

    return FUNC_DECL_TEMPLATE.render(
        func_name=func_attrs["name"],
        input_type=input_type,
        index_type=backend_spec.index_type,
        need_broadcast=x._attrs["shape"] != mask._attrs["shape"],
        dynamic_dims_decl=gen_dynamic_dim_str(
            index_type=backend_spec.index_type,
            dynamic_dims=get_dynamic_dims(x.shape(), mask.shape()),
            has_type=True,
        ),
    )
Generate function declaration.

Returns
-------
str
The function declaration string
python/aitemplate/backend/cuda/tensor/masked_select.py