def ipex_sgmv_expand_for_nslices(
        nslices: int,
        hidden_size: int,
        inputs_tensor: torch.Tensor,
        lora_weights_lst: list[torch.Tensor],
        out_tensor: torch.Tensor,
        b_seq_start_loc: torch.Tensor,
        seq_len_tensor: torch.Tensor,
        prompt_lora_mapping: torch.Tensor,
        batches: int,
        max_seq_length: int,
        num_tokens: int,
        add_inputs: bool,
    ) -> None:
        """
        Wrapper around sgmv_expand that handles any nslices.
        """
        if nslices == 1:
            # Verify the torch's sgmv_expand op
            ipex_sgmv_expand(
                inputs_tensor[0],
                lora_weights_lst[0],
                out_tensor,
                b_seq_start_loc,
                seq_len_tensor,
                prompt_lora_mapping,
                batches,
                max_seq_length,
                num_tokens,
                add_inputs=add_inputs,
            )
        else:
            slice_offset = 0
            for index in range(nslices):
                lora_weights = lora_weights_lst[index]
                ipex_sgmv_expand_slice(
                    inputs_tensor[index],
                    lora_weights,
                    out_tensor,
                    b_seq_start_loc,
                    seq_len_tensor,
                    prompt_lora_mapping,
                    batches,
                    max_seq_length,
                    num_tokens,
                    slice_offset,
                    hidden_size,
                    add_inputs=add_inputs,
                )
                slice_offset += hidden_size

        Wrapper around sgmv_expand that handles any nslices.
        
tests/cpu/test_punica.py