
    ϑi                    T    S SK Jr  S SKJrJr  S SKJr    S           SS jjrg)    )annotations)Tensor_C_ops)in_dynamic_or_pir_modec                R    [        5       (       a  [        R                  " XX#U5      $ g)a  
Cluster launched gemm into one op, which can be further fused and optimized.

Args:
    lhs (Tensor): A tensor shaped in (total_seq_len, input_hidden_size), meant to be
    perform gemm operation according to batch range.
    rhs (Tensor): A tensor shaped in (num_batches, input_hidden_size, output_hidden_size).
    batch_sizes(list): A list of integers representing the number of rows in each batch.
    trans_lhs (bool): Whether view lhs matrix as last 2D-transposed. Default: False.
    trans_rhs (bool): Whether view rhs matrix as last 2D-transposed. Default: False.

Returns:
    tuple:
        - out (Tensor): The result of batched gemm operation.
N)r   r   batched_gemm)lhsrhsbatch_sizes	trans_lhs	trans_rhss        j/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddle/incubate/nn/functional/batched_gemm.pyr   r      s'    , ""3[YOO      N)FF)r	   r   r
   r   r   listr   boolr   r   returnztuple[Tensor])
__future__r   paddler   r   paddle.frameworkr   r    r   r   <module>r      s\    # ! 3 P	P	P P 	P
 P Pr   