def gen_function(func_attrs):
    """Generates function body.

    Parameters
    ----------
    func_attrs : Dict[str, Any]
        Stores the operation attributes.

    Returns
    -------
    str
        Rendered function body.
    """
    # TODO: consider to profile elems_per_thread
    elems_per_thread = 8 if len(func_attrs["inputs"]) == 1 else 256
    output_accessor = func_attrs["output_accessors"][0]
    output_offset = output_accessor.offset
    return slice_common.gen_function(
        func_attrs,
        backend_spec=CUDASpec(),
        elems_per_thread=elems_per_thread,
        output_offset=output_offset,
        update_output_shape=False,
    )
Generates function body.

Parameters
----------
func_attrs : Dict[str, Any]
Stores the operation attributes.

Returns
-------
str
Rendered function body.
python/aitemplate/backend/cuda/tensor/slice_scatter.py