def bgmv_expand(
    input: torch.Tensor,
    lora_weights: torch.Tensor,
    output: torch.Tensor,
    token_lora_mapping: torch.Tensor,
    add_inputs: bool,
):
    r"""
    Args:
        inputs (torch.Tensor): The input tensor with shape of
            [batchsize, input_size1] or [1, input_size1] which input_size1  >= hidden_size.
        lora_b_weights (torch.Tensor):  LoRA weights tensor
            with shape of [num_lora, max_rank, hidden_size].
        output_tensor (torch.Tensor): The output tensor with shape of
            [batchsize, output_size1] which output_size1 >= max_rank
        lora_indices_tensor (torch.Tensor): The tensor mapping each input token
            to the lora-id related to that token with shape of [batchsize].
        add_inputs (bool): Whether to add to the output tensor.
    """
    f = _get_function_from_device(input.device.type, bgmv_expand)
    return f(input, lora_weights, output, token_lora_mapping, add_inputs)

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