def bgmv_expand_slice(
    input: torch.Tensor,
    lora_weights: torch.Tensor,
    output: torch.Tensor,
    token_lora_mapping: torch.Tensor,
    slice_offset: int,
    slice_size: int,
    add_inputs: bool,
):
    r"""
    Args:
        inputs (torch.Tensor): The input tensor with shape of [batchsize, max_rank].
        lora_b_weights (torch.Tensor):  LoRA weights tensor with shape of [num_lora, hidden_size, max_rank].
        output_tensor (torch.Tensor): The output tensor with shape of [batchsize, output_size1]
            which output_size1 >= slice_offset + slice_size
        lora_indices_tensor (torch.Tensor): The tensor mapping each input token to
            the lora-id related to that token with shape of [batchsize].
        slice_offset (int): Slice offset start for output.
        slice_size (int): Slice length for output.
        add_inputs (bool): Whether to add to the output tensor.
    """
    f = _get_function_from_device(input.device.type, bgmv_expand_slice)
    return f(
        input,
        lora_weights,
        output,
        token_lora_mapping,
        slice_offset,
        slice_size,
        add_inputs,
    )

    Args:
        inputs (torch.Tensor): The input tensor with shape of [batchsize, max_rank].
        lora_b_weights (torch.Tensor):  LoRA weights tensor with shape of [num_lora, hidden_size, max_rank].
        output_tensor (torch.Tensor): The output tensor with shape of [batchsize, output_size1]
            which output_size1 >= slice_offset + slice_size
        lora_indices_tensor (torch.Tensor): The tensor mapping each input token to
            the lora-id related to that token with shape of [batchsize].
        slice_offset (int): Slice offset start for output.
        slice_size (int): Slice length for output.
        add_inputs (bool): Whether to add to the output tensor.
    
intel_extension_for_pytorch/llm/functional/fusions.py