def bgmv_shrink(
    input: torch.Tensor,
    lora_weights: torch.Tensor,
    output: torch.Tensor,
    token_lora_mapping: torch.Tensor,
    scaling: float,
):
    r"""
    Args:
        inputs (torch.Tensor): The input tensor with shape of [batchsize, hidden_size].
        lora_a_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].
        scaling (float): Scaling factor.
    """
    f = _get_function_from_device(input.device.type, bgmv_shrink)
    return f(input, lora_weights, output, token_lora_mapping, scaling)

    Args:
        inputs (torch.Tensor): The input tensor with shape of [batchsize, hidden_size].
        lora_a_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].
        scaling (float): Scaling factor.
    
intel_extension_for_pytorch/llm/functional/fusions.py