
    ёi                       S SK Jr  S SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  S SK
rS SKJr  S SKJr  S SKJr  S SKJr  S	S
KJr  \	(       a  S SKJr  S SKJrJrJr  Sq\R8                  \R:                  \R<                  \R>                  \R@                  \RB                  /r"0 SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SSSS .Er#/ S!Qr$S" r%\" \%5      r&S# r'S$ r(g)%    )annotationsN)reduce)TYPE_CHECKING)_C_ops)DataType)wrap_decorator)size_args_decorator_patch   )Value)Tensor)	DTypeLike	PlaceLike	ShapeLikeFfloat16halfbfloat16float32floatfloat64doubleint8charint16shortint32intint64longbool	complex64
complex128)r!   cfloatcdouble)__add____radd____sub____rsub____mul____rmul____mod____rmod____div____rdiv____truediv____rtruediv____floordiv____rfloordiv____pow____rpow____eq____ne____lt____le____gt____ge__c                   ^  U 4S jnU$ )Nc                 P   > [        STR                   STR                   S35      e)N'a  ' only can be called by `paddle.Tensor` in dynamic graph mode. Suggestions:
  1. If you are in static graph mode, you can switch to dynamic graph mode by turning off `paddle.enable_static()` or calling `paddle.disable_static()`.
  2. If you are using `@paddle.jit.to_static`, you can call `paddle.jit.enable_to_static(False)`. If you have to translate dynamic graph to static graph, please use other API to replace 'z'.)AssertionError__name__)argskwargsfuncs     X/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/paddle/pir/math_op_patch.py__impl__'_fake_interface_only_.<locals>.__impl__k   s:     h imhuhugvvxz
 	
     )rA   rC   s   ` rB   _fake_interface_only_rG   j   s    
 OrE   c           
        [        U [        5      (       d   e[        U5      nSn/ n[        U R                  5       HJ  u  pVUS:  a.  US:  a  UnUR                  U5        M&  UR                  S5        M9  UR                  U5        ML     US:w  d   eSSKJn  [        R                  " XX!X3UR                  5       5      nSUl        U$ )Nr   r
   )coreT)
isinstancer   r   	enumerateshapeappendpaddle.frameworkrJ   r   full_batch_size_likePlacestop_gradient)	ref_varvaluedtype	batch_dim	out_shapeidrJ   outs	            rB   create_tensor_with_batchsizer[   y   s    gu%%%%%LEII'--(q51}	  #  #Q ) ??%

%
%E)

C CJrE   c                   ^>^?^@ S m@S n SS jn[         S 5       n[         S 5       n[         S 5       nS nS	 n[         S
 5       nS nS n	SU?4S jjn
U?4S jm>U>4S jnU>4S jnS nU?4S jnU?4S jnU?4S jnU?4S jnU?4S jnU?4S jnU?4S jn  SU>U?U@4S jjn[         U?4S j5       n[         S 5       n[         S 5       nS S SSS.           SU?4S" jjjn[        S S SSS.         SU?4S# jjj5       n[        S S SSS.         SU?4S$ jjj5       n[        S S SSS.         SU?4S% jjj5       nS& nS' nS( nS) n U?4S* jn![        S+ 5       n"S, n#U?4S- jn$S. n%S/ n&S0 n'U?4S1 jn(S2 n)    SU?4S3 jjn*S4 n+U?4S5 jn,[        S6 5       n-[        S7 5       n.[        S8 5       n/[         SS9 j5       n0U0R                  SS: j5       n0SSS; jjn1[         SS< j5       n2S=S Km?SS> jn3/ S?U 4PS@U4PSAU4PS U4PSBU4PSCU4PSDU4PSEU
4PSFU	4PSGU4PSHU4PSIT>4PSJU4PSKU4PSLU4PSU4PSMU4PSNU4PSOU4PSPU4PSQU4PSRU4PS!U04PSSU14PSTU!4PSUU"4PSVU#4PSWU$4PSXU(4PSYU)4PSZU%4PS[U'4PS\U&4PS]U*4PS^U,4PS_U.4PS`U-4PSaU/4PSbU34PScU+4PSdU" SdT?R
                  R                  SU5      4PSeU" SeT?R
                  R                  SU5      4PSfU" SfT?R
                  R                  SU5      4PSgU" SgT?R
                  R                  SU5      4PShU" ShT?R
                  R                  SU5      4PSiU" SiT?R
                  R                  SU5      4PSjU" SjT?R
                  R                  SU5      4PSkU" SkT?R
                  R                  SU5      4PSlU" SlT?R
                  R                  SS 5      4PSmU" SmT?R
                  R                  SS 5      4PSnU" SnT?R
                  R                  SS 5      4PSoU" SoT?R
                  R                  SS 5      4PSpU" SpT?R
                  R                  SS 5      4PSqU" SqT?R
                  R                  SS 5      4PSrU" SrT?R
                  R                  SS 5      4PSsU" SsT?R
                  R                  SS 5      4PStU" StT?R
                  R                  SS 5      4PSuU" SuT?R
                  R                  SS 5      4PSvU4PSwU4PSxU" SxT?R
                  R                  SS 5      4PSyU" SyT?R
                  R                  SS 5      4PSzU" SzT?R
                  R                   SS 5      4PS{U" S{T?R
                  R"                  SS 5      4PS|U" S|T?R
                  R$                  SS 5      4PS}U" S}T?R
                  R&                  SS 5      4PS~U4PSU4PSU4PSU 4PSU24Pn4U" 5       n5U4R)                  U55        [*        (       d  U4 H  n6U6S=   n7U6S   n8[-        [.        U7U85        M      S=S Km?T?R
                  R2                   HK  n7[5        [.        U75      (       a  M  [7        T?R
                  U7S 5      n8U8(       d  M:  [-        [.        U7U85        MM     T?R
                  R8                   H7  u  n9n:[7        T?R
                  U:S 5      n;U;(       d  M&  [-        [.        U9U;5        M9     SSKJn<Jn=  U<[.        l         U=[.        l!        Sqg g )Nc                @     U R                   nU$ !   [        S5      e= f)NzCannot get data type from var)rU   
ValueError)varrU   s     rB   safe_get_dtype*monkey_patch_value.<locals>.safe_get_dtype   s*    	>IIE 	><==s    c                0    [         R                  " U S5      $ )a  
In dy2static, Tensor also needs cpu() and cuda() interface.
But, the underneath operator has only forward op but not backward one.

Returns:
    The tensor which has copied to cpu place.

Examples:
    In Static Graph Mode:

    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.static.data(name="x", shape=[2,2], dtype='float32')
        >>> y = x.cpu()
r   )r   memcpyselfs    rB   cpumonkey_patch_value.<locals>.cpu   s    * }}T1%%rE   Tc                    Ub  [         R                  " S5        USLa  [         R                  " S5        [        R                  " U S5      $ )a+  
In dy2static, Tensor also needs cpu() and cuda() interface.
But, the underneath operator has only forward op but not backward one.

Args:
    self(Tensor): The variable itself.
    device_id(int, optional): The destination GPU device id. Default: None, means current device.
        We add this argument for dy2static translation, please do not use it.
    blocking(bool, optional): Whether blocking or not, Default: True.
        We add this argument for dy2static translation, please do not use it.

Returns:
    The tensor which has copied to cuda place.

Examples:
    In Static Graph Mode:

    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.static.data(name="x", shape=[2,2], dtype='float32')
        >>> y = x.cpu()
        >>> z = y.cuda()
z3device_id is not supported, and it will be ignored.T2blocking is not supported, and it will be ignored.r
   )warningswarnr   rc   )re   	device_idblockings      rB   cuda monkey_patch_value.<locals>.cuda   s?    8  MMOP4MMNO }}T1%%rE   c                   [         R                  " S5        SSKJn  [	        U S5      (       a0  [        U R                  UR                  R                  5      (       a  gUR                  5       n[        X!R                  R                  5      $ )z
Tensor don't have 'is_cuda' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a warning here and return None.
zMTensor do not have 'is_cuda' interface for pir graph mode, try not to use it.r   )	frameworkplaceT)
rj   rk   paddlerq   hasattrrK   rr   rJ   	CUDAPlace_current_expected_place_)re   rq   expected_places      rB   is_cuda#monkey_patch_value.<locals>.is_cuda   sl     	[	
 	%4!!jJJ	00'
 '
 &??ANnnn.F.FGGrE   c                0    [         R                  " S5        g)z
Tensor don't have 'place' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a warning here and return None.
zbTensor do not have 'place' interface for pir graph mode, try not to use it. None will be returned.Nrj   rk   rd   s    rB   rr   !monkey_patch_value.<locals>.place   s     	p	
rE   c                0    [         R                  " S5        g)z
Tensor don't have 'device' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a warning here and return None.
zcTensor do not have 'device' interface for pir graph mode, try not to use it. None will be returned.Nr{   rd   s    rB   device"monkey_patch_value.<locals>.device   s     	q	
rE   c                2    [         R                  " S5        U $ )z
Tensor don't have 'contiguous' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a warning here and return None.
zjTensor do not have 'contiguous' interface for static graph mode, try not to use it. self will be returned.r{   rd   s    rB   
contiguous&monkey_patch_value.<locals>.contiguous   s     	x	
 rE   c                0    [         R                  " S5        g)z
Tensor don't have 'is_contiguous' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a warning here and return None.
zmTensor do not have 'is_contiguous' interface for static graph mode, try not to use it. True will be returned.Tr{   rd   s    rB   is_contiguous)monkey_patch_value.<locals>.is_contiguous  s     	{	
 rE   c                ,    [        U R                  5      $ )ab  
Returns the dimension of current Tensor

Returns:
    the dimension

Examples:
    .. code-block:: python

        >>> import paddle

        >>> paddle.enable_static()

        >>> # create a static Tensor
        >>> x = paddle.static.data(name='x', shape=[3, 2, 1])
        >>> # print the dimension of the Tensor
        >>> print(x.ndim)
        3
lenrM   rd   s    rB   _ndim!monkey_patch_value.<locals>._ndim  s    * 4::rE   c                ,    [        U R                  5      $ )aj  
Returns the dimension of current Tensor

Returns:
    the dimension

Examples:
    .. code-block:: python

        >>> import paddle

        >>> paddle.enable_static()

        >>> # create a static Tensor
        >>> x = paddle.static.data(name='x', shape=[3, 2, 1])
        >>> # print the dimension of the Tensor
        >>> print(x.ndimension())
        3
r   rd   s    rB   
ndimension&monkey_patch_value.<locals>.ndimension-      ( 4::rE   c                ,    [        U R                  5      $ )ac  
Returns the dimension of current Tensor

Returns:
    the dimension

Examples:
    .. code-block:: python

        >>> import paddle

        >>> paddle.enable_static()

        >>> # create a static Tensor
        >>> x = paddle.static.data(name='x', shape=[3, 2, 1])
        >>> # print the dimension of the Tensor
        >>> print(x.dim())
        3
r   rd   s    rB   dimmonkey_patch_value.<locals>.dimC  r   rE   c           
       > U R                  5       (       a  U R                  5       (       d  gSSKJn  U" U 5      n[	        U5      S:w  a  [        S U5      OSnSn[	        U5      S:X  a8  [        UT	R                  R                  5      (       d  US:w  a  [        S5      eU $ [	        U5      S:X  a@  Uu  n[        UT	R                  R                  5      (       d  XT:  a  [        SU SU 35      eO[	        U5      [	        U5      :w  a  [        S	5      eS/[	        U5      -  n[        S[	        U5      5       H  nXg*    X7*    -  Xg* S-
  '   M     [        [	        U5      5       H  nX   n[        U[        5      (       d  [        S
U S[        U5       35      e[        X7   T	R                  R                  5      (       d  XU   :  a  [        SU SU SX7    35      eXXXg   -  -  nM     U R                  5       U   $ )z
In order to be compatible with the item interface introduced by the dynamic graph, it does nothing but returns self.
It will check that the shape must be a 1-D tensor
Nr   )Shapec                    [        X-  5      $ N)r   )xys     rB   <lambda>3monkey_patch_value.<locals>._item.<locals>.<lambda>f  s
    CJrE   r
   zUonly one element tensors can be converted to Python scalars when no input coordinateszindex z is out of bounds for size z&incorrect number of indices for Tensorzargument (position z) must be long, but got z is out of bounds for axis z with size )is_dist_is_initializedpaddle.jit.dy2staticr   r   r   rK   pirr   r^   ranger   	TypeErrortypeflatten)
re   r?   r   dimsnumeloffsetstridesrX   indexrs   s
            rB   _item!monkey_patch_value.<locals>._itemY  s    <<>>$"6"6"8"8. T{9<Ta.5Qt9>eVZZ%5%5665A: 8 
 KY!^IVeVZZ%5%5666? VH$?wG  4yCI% !IJJ cCIoG1c'l+")"+R"8Q , 3t9%!%--#-aS0HeV  #47FJJ,<,<==a($ 'B1#[QUQXPYZ  '*,, & ||~f%%rE   c                   > [        U[        5      (       d%  TR                  R                  R	                  U5      nU R
                  U:X  a  U $ [        R                  " X5      $ )a@  
**Notes**:

Convert a value to a specified data type if it differs from the current dtype;
otherwise, return the original value.

Args:

    self(Tensor): The source Tensor

    dtype: The target data type

Returns:
    Tensor: Tensor with new dtype

Examples:
    In Static Graph Mode:

    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()
        >>> startup_prog = paddle.static.Program()
        >>> main_prog = paddle.static.Program()
        >>> with paddle.static.program_guard(startup_prog, main_prog):
        ...     original_value = paddle.static.data(name = "new_value", shape=[2,2], dtype='float32')
        ...     new_value = original_value.astype('int64')
        ...     print(f"new value's dtype is: {new_value.dtype}")
        ...
        new Tensor's dtype is: paddle.int64

)rK   r   r   rJ   convert_np_dtype_to_dtype_rU   r   cast)re   rU   rs   s     rB   astype"monkey_patch_value.<locals>.astype  sK    D %**JJOO>>uEE::K{{4''rE   c                   > U R                  5       (       a  T" U S5      nT" US5      $ U R                  5       (       a   T" U R                  5       S5      nT" US5      $ T" U S5      $ )Nr   uint8)is_floating_point
is_complexreal)re   tensorr   r   s      rB   byte monkey_patch_value.<locals>.byte  sd    !!##D&)F&'**__$))+v.D$(($((rE   c                    > / n [         R                  5        H9  u  pU4S jnU" U5      nXl        SU SU S3Ul        U R	                  X45        M;     U $ )z/
Batch create all data type conversion methods
c                   >^  UU 4S jnU$ )Nc                   > T" U T5      $ r   rF   )re   r   rU   s    rB   conversion_methodwmonkey_patch_value.<locals>._create_dtype_conversion_methods.<locals>.make_conversion_method.<locals>.conversion_method  s    !$..rE   rF   )rU   r   r   s   ` rB   make_conversion_method\monkey_patch_value.<locals>._create_dtype_conversion_methods.<locals>.make_conversion_method  s    / )(rE   z
            Cast a Tensor to z data type if it differs from the current dtype;
            otherwise, return the original Tensor.
            Returns:
                Tensor: a new Tensor with z dtype
            )_supported_dtype_conversionsitemsr>   __doc__rN   )methodsmethod_nametarget_dtyper   method_implr   s        rB    _create_dtype_conversion_methods<monkey_patch_value.<locals>._create_dtype_conversion_methods  su     )E)K)K)M%K) 1>K#. '*^ ,+ ,8. 9	#K NNK56! *N" rE   c                8    U R                  UR                  5      $ r   )r   rU   )re   others     rB   type_as#monkey_patch_value.<locals>.type_as  s    {{5;;''rE   c                *   > TR                  U SU5      $ N      ?scaler_   rT   rs   s     rB   _scalar_add_(monkey_patch_value.<locals>._scalar_add_  s    ||Ce,,rE   c                ,   > TR                  U SU* 5      $ r   r   r   s     rB   _scalar_sub_(monkey_patch_value.<locals>._scalar_sub_  s    ||Cuf--rE   c                *   > TR                  U SU5      $ )N      r   r   s     rB   _scalar_rsub_)monkey_patch_value.<locals>._scalar_rsub_  s    ||Cu--rE   c                (   > TR                  XS5      $ )N        r   r   s     rB   _scalar_mul_(monkey_patch_value.<locals>._scalar_mul_  s    ||C,,rE   c                0   > TR                  U SU-  S5      $ )Nr   r   r   r   s     rB   _scalar_div_(monkey_patch_value.<locals>._scalar_div_  s    ||Cuc22rE   c                *   > TR                  U SS5      $ )Nr   r   r   r_   rs   s    rB   _scalar_neg_(monkey_patch_value.<locals>._scalar_neg_  s    ||Cs++rE   c                &   > TR                  U 5      $ r   )absr   s    rB   _scalar_abs_(monkey_patch_value.<locals>._scalar_abs_  s    zz#rE   Fc                D   >^ ^^^ UU UUUUU4S jnSUl         T Ul        U$ )Nc                  > [        U[        5      (       a7  U R                  [        ;   a  T" U [        R
                  5      n Tb  T" X5      $ O[        U[        5      (       a  [        U5      nT	TR                  :X  a4  U R                  [        ;   a   TR                  U [        R
                  5      n U R                  TR                  :X  a   TR                  U [        R                  5      n Tb  T" X5      $ OUc  TS:X  a  gTS:X  a  gO T" U 5      n[        U[        5      (       d  T
(       aY  U R                   H  nUS:  d  M  [        XU5      n  O[   TR                  R                  R!                  U R                  UU5      nO'TR                  R                  R!                  / UU5      nT
(       a  U nUn UnT	" X5      nU$ )Nr4   Fr5   Tr   )rK   r   rU   _supported_int_dtype_r   FLOAT32r   divider   r   INT64r   rM   r[   r   creationfill_constant)re   	other_var	lhs_dtypeelemtmprZ   r   r   rs   
python_apireverser`   scalar_methods         rB   rC   >monkey_patch_value.<locals>._binary_creator_.<locals>.__impl__  s    )U++::!66!$(8(89D !,(99 -Is++ "),	 &--/

&;;!;;tX-=-=>D::,!;;tX^^<D !,(99 -"(*  H,  't,Ii// $

!8(D $)I " !+ %+MM$:$:$H$H JJ%%%	 !' 6 6 D D!!!I  	T-CJrE   z
            Args:
                self(Tensor): left hand Tensor
                other_var(Tensor|float|int): right hand Tensor

            Returns:
                Tensor
            )r   r>   )r   r   r   r   rC   r   rs   r`   s   ```` rB   _binary_creator_,monkey_patch_value.<locals>._binary_creator_  s)    M	 M	^ (rE   c                &   > TR                  U 5      $ )a  
Returns the number of elements for current Tensor, which is a int64 Tensor with shape [] .

Returns:
    Tensor, the number of elements for current Tensor

Examples:
    .. code-block:: pycon

        >>> import paddle
        >>> paddle.enable_static()
        >>> startup_prog = paddle.static.Program()
        >>> main_prog = paddle.static.Program()
        >>> with paddle.static.program_guard(startup_prog, main_prog):
        ...     x = paddle.assign(np.random.rand(2, 3, 4).astype("float32"))
        ...     (output_x,) = exe.run(main_program, fetch_list=[x.size])
        ...     print(f"value's size is: {output_x}")
        value's size is: 24
)r   re   rs   s    rB   _size_"monkey_patch_value.<locals>._size_W  s    * ||D!!rE   c           	         [        U R                  5      S:X  a  U $ [        [        [	        [        U R                  5      5      5      5      n[
        R                  " X5      $ )a  

Permute current Tensor with its dimensions reversed.

If `n` is the dimensions of `x` , `x.T` is equivalent to `x.transpose([n-1, n-2, ..., 0])`.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.ones(shape=[2, 3, 5])
        >>> x_T = x.T

        >>> exe = paddle.static.Executor()
        >>> x_T_np = exe.run(paddle.static.default_main_program(), fetch_list=[x_T])[0]
        >>> print(x_T_np.shape)
        (5, 3, 2)

r
   )r   rM   listreversedr   r   	transposere   perms     rB   _T_monkey_patch_value.<locals>._T_n  sF    . tzz?aKHU3tzz?345++rE   c                   [        U R                  5      S:  a"  [        S[        U R                  5       S35      e[        [	        [        U R                  5      5      5      nUS   US   sUS'   US'   [
        R                  " X5      $ )a  

Permute current Value with its last two dimensions reversed.

If `n` is the dimensions of `x` , `x.mT` is equivalent to `x.transpose([0, 1, ..., n-1, n-2])`.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.ones(shape=[2, 3, 5])
        >>> x_mT = x.mT

        >>> exe = paddle.static.Executor()
        >>> x_mT_np = exe.run(paddle.static.default_main_program(), fetch_list=[x_mT])[0]
        >>> print(x_mT_np.shape)
        (2, 5, 3)

   zTensor.ndim(z/) is required to be greater than or equal to 2.rI   )r   rM   r^   r   r   r   r  r  s     rB   _mT_ monkey_patch_value.<locals>._mT_  s}    . tzz?Qs4:://^_  E#djj/*+!"XtBxR$r(++rE   rU   r~   requires_grad
pin_memorysizer~   r  c          	     h   > Uc  U R                   nUc  U R                  nTR                  UUUUUUS9$ )a  

Returns a Tensor of size ``size`` filled with ``fill_value``.
By default, the returned Tensor has the same dtype and place as this tensor.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.ones(shape=[2, 3, 5])
        >>> x_new = x.new_full([2, 3], 3.14, dtype="float64", device="cpu")

        >>> exe = paddle.static.Executor()
        >>> x_new_np = exe.run(paddle.static.default_main_program(), fetch_list=[x_new])[0]
        >>> print(x_new_np.shape)
        (2, 5, 3)
        >>> print(str(x_new_np.dtype))
        'paddle.float64'
        >>> print(x_new_np.place)
        Place(cpu)
r  rU   rr   full)re   r  
fill_valuerU   r~   r  r  rs   s          rB   
_new_full_&monkey_patch_value.<locals>._new_full_  sJ    B =JJE>ZZF{{'!  
 	
rE   c               f   > Uc  U R                   nUc  U R                  nTR                  UUUUUS9$ )a  

Returns a Tensor of size ``size`` filled with uninitialized data.
By default, the returned Tensor has the same dtype and place as this tensor.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.ones(shape=[2, 3, 5])
        >>> x_new = x.new_empty([2, 3], dtype="float64", device="cpu")

        >>> exe = paddle.static.Executor()
        >>> x_new_np = exe.run(paddle.static.default_main_program(), fetch_list=[x_new])[0]
        >>> print(x_new_np.shape)
        (2, 3)
        >>> print(str(x_new_np.dtype))
        'paddle.float64'
        >>> print(x_new_np.place)
        Place(cpu)
r  )rU   rr   emptyre   r  rU   r~   r  r  rs   s         rB   _new_empty_'monkey_patch_value.<locals>._new_empty_  sG    B =JJE>ZZF||'!  
 	
rE   c          	     h   > Uc  U R                   nUc  U R                  nTR                  USUUUUS9$ )a  

Returns a Tensor of size ``size`` filled with ``1``.
By default, the returned Tensor has the same dtype and place as this tensor.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.ones(shape=[2, 3, 5])
        >>> x_new = x.new_ones([2, 3], dtype="float64", device="cpu")

        >>> exe = paddle.static.Executor()
        >>> x_new_np = exe.run(paddle.static.default_main_program(), fetch_list=[x_new])[0]
        >>> print(x_new_np.shape)
        (2, 3)
        >>> print(str(x_new_np.dtype))
        'paddle.float64'
        >>> print(x_new_np.place)
        Place(cpu)
r
   r  r  r  s         rB   
_new_ones_&monkey_patch_value.<locals>._new_ones_	  J    B =JJE>ZZF{{'!  
 	
rE   c          	     h   > Uc  U R                   nUc  U R                  nTR                  USUUUUS9$ )a  

Returns a Tensor of size ``size`` filled with ``0``.
By default, the returned Tensor has the same dtype and place as this tensor.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> paddle.enable_static()

        >>> x = paddle.ones(shape=[2, 3, 5])
        >>> x_new = x.new_zeros([2, 3], dtype="float64", device="cpu")

        >>> exe = paddle.static.Executor()
        >>> x_new_np = exe.run(paddle.static.default_main_program(), fetch_list=[x_new])[0]
        >>> print(x_new_np.shape)
        (2, 3)
        >>> print(str(x_new_np.dtype))
        'paddle.float64'
        >>> print(x_new_np.place)
        Place(cpu)
r   r  r  r  s         rB   _new_zeros_'monkey_patch_value.<locals>._new_zeros_8  r  rE   c                D    Sn[        [        R                  " U5      5      e)Na              int(Tensor) is not supported in static graph mode. Because it's value is not available during the static mode.
            It's usually triggered by the logging implicitly, for example:
                >>> logging.info("The value of x is: {int(x)}")
                                                          ^ `x` is Tensor, `int(x)` triggers int(Tensor)

                There are two common workarounds available:
                If you are logging Tensor values, then consider logging only at dynamic graphs, for example:

                    Modify the following code
                    >>> logging.info("The value of x is: {int(x)}")
                    to
                    >>> if paddle.in_dynamic_mode():
                    ...     logging.info("The value of x is: {int(x)}")

                If you need to convert the Tensor type, for example:
                    Modify the following code
                    >>> x = int(x)
                    to
                    >>> x = x.astype("int64")
        r   textwrapdedentre   	error_msgs     rB   _int_!monkey_patch_value.<locals>._int_g  s    	, 	233rE   c                D    Sn[        [        R                  " U5      5      e)Na              float(Tensor) is not supported in static graph mode. Because it's value is not available during the static mode.
            It's usually triggered by the logging implicitly, for example:
                >>> logging.info("The value of x is: {float(x)}")
                                                            ^ `x` is Tensor, `float(x)` triggers float(Tensor)

                There are two common workarounds available:
                If you are logging Tensor values, then consider logging only at dynamic graphs, for example:

                    Modify the following code
                    >>> logging.info("The value of x is: {float(x)}")
                    to
                    >>> if paddle.in_dynamic_mode():
                    ...     logging.info("The value of x is: {float(x)}")

                If you need to convert the Tensor type, for example:
                    Modify the following code
                    >>> x = float(x)
                    to
                    >>> x = x.astype("float64")
        r"  r%  s     rB   _float_#monkey_patch_value.<locals>._float_      	* 	233rE   c                D    Sn[        [        R                  " U5      5      e)Na              bool(Tensor) is not supported in static graph mode. Because it's value is not available during the static mode.
            If you haven't call bool(Tensor) explicitly, it's usually triggered by the control flow implicitly, for example:
                >>> if x > 0:
                       ^ `x` is Tensor, `x` > 0 is also a Tensor, `if x > 0` triggers bool(Tensor)
                ...     y = y + 1

            There are two common workarounds available:
            If you are checking for Tensor values, then consider checking only at dynamic graphs, for example:

                Modify the following code
                >>> if x > 0:
                ...     raise ValueError("x should be positive")
                to
                >>> if paddle.in_dynamic_mode() and x < 0:
                >>>     raise ValueError("x should be positive")

            If you need to control the flow of execution based on the value of the Tensor, then you need to rewrite the code as a control flow, for example:

                Modify the following code
                >>> if x < y:
                ...     y = y + 1
                ... else:
                ...     y = y - 1
                to
                >>> pred = paddle.less_than(x=x, y=y, name=None)
                >>> y = paddle.static.nn.cond(pred, lambda: y + 1, lambda: y - 1)
                For more info, please refer to https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/static/nn/cond_cn.html
            r"  r%  s     rB   _bool_"monkey_patch_value.<locals>._bool_  s    	: 	233rE   c                D    Sn[        [        R                  " U5      5      e)Na(              complex(Tensor) is not supported in static graph mode. Because it's value is not available during the static mode.
            It's usually triggered by the logging implicitly, for example:
                >>> logging.info("The value of x is: {complex(x)}")
                                                              ^ `x` is Tensor, `complex(x)` triggers complex(Tensor)

                There are two common workarounds available:
                If you are logging Tensor values, then consider logging only at dynamic graphs, for example:

                    Modify the following code
                    >>> logging.info("The value of x is: {complex(x)}")
                    to
                    >>> if paddle.in_dynamic_mode():
                    ...     logging.info("The value of x is: {complex(x)}")

                If you need to convert the Tensor type, for example:
                    Modify the following code
                    >>> x = complex(x)
                    to
                    >>> x = x.astype("complex64")
        r"  r%  s     rB   	_complex_%monkey_patch_value.<locals>._complex_  r,  rE   c                &   > TR                  U 5      $ )a$  
Returns a new static Tensor, which is the clone of the original static
Tensor. It remains in the current graph, that is, the cloned Tensor
provides gradient propagation. Calling ``out = tensor.clone()`` is same
as ``out = assign(tensor)`` .

Returns:
    Tensor, The cloned Tensor.

Examples:
    .. code-block:: python

        >>> import paddle

        >>> paddle.enable_static()

        >>> # create a static Tensor
        >>> x = paddle.static.data(name='x', shape=[3, 2, 1])
        >>> # create a cloned Tensor
        >>> y = x.clone()

)assignr   s    rB   clone!monkey_patch_value.<locals>.clone  s    . }}T""rE   c                    g)a  
**Notes**:
    **1. This API is ONLY available in Dygraph mode**

    **2. Use it only Tensor has gradient, normally we use this for Parameters since other temporal Tensor will be deleted by Python's GC**

Clear  (set to ``0`` ) the Gradient of Current Tensor

Returns:  None

Examples:
    .. code-block:: python

        >>> import paddle
        >>> import numpy as np

        >>> x = np.ones([2, 2], np.float32)
        >>> inputs2 = []
        >>> for _ in range(10):
        >>>     tmp = paddle.to_tensor(x)
        >>>     tmp.stop_gradient=False
        >>>     inputs2.append(tmp)
        >>> ret2 = paddle.add_n(inputs2)
        >>> loss2 = paddle.sum(ret2)
        >>> loss2.retain_grads()
        >>> loss2.backward()
        >>> print(loss2.gradient())
        >>> loss2.clear_gradient()
        >>> print("After clear {}".format(loss2.gradient()))
        1.0
        After clear 0.0
NrF   rd   s    rB   clear_gradient*monkey_patch_value.<locals>.clear_gradient  s    D 	rE   c                t    U R                  5       (       d  [        SU  35      eSSKJnJn  U" X" U 5      U S9  g)z5
Notes:
   The type of Tensor must be Tensor Array.

zHOnly Tensor with DenseTensorArray support `append` method, but received r   )array_lengtharray_write)r   rX   arrayN)is_dense_tensor_array_typer   paddle.tensor.arrayr;  r<  )re   r_   r;  r<  s       rB   rN   "monkey_patch_value.<locals>.append  sC     ..00Z[_Z`a  	Bc\$/t<rE   c                   > U R                  5       (       d  [        SU  35      e[        U5      S:X  a  SnOUS   nTR                  R	                  X5      $ )aQ  
The type of Tensor must be Tensor Array.
When self is TensorArray, calling pop is similar to Python's pop on list.
This interface is used to simplify dygraph to static graph operations.

Args:
    self(Tensor): The source variable, which must be DenseTensorArray
    *args: optional, a int means index.
Returns:
    Tensor: self[index]
zEOnly Tensor with DenseTensorArray support `pop` method, but received r   rI   )r>  r   r   _pir_ops	array_pop)re   r?   idxrs   s      rB   popmonkey_patch_value.<locals>.pop  s]     ..00WX\W]^  t9>Cq'C((33rE   c                .    [         R                  " U 5      $ r   )r   sparse_to_denserd   s    rB   to_dense$monkey_patch_value.<locals>.to_dense3  s    %%d++rE   c                .    [         R                  " U 5      $ r   )r   sparse_valuesrd   s    rB   values"monkey_patch_value.<locals>.values6  s    ##D))rE   c                .    [         R                  " U 5      $ r   )r   sparse_indicesrd   s    rB   indices#monkey_patch_value.<locals>.indices9  s    $$T**rE   c                Z  > TR                   R                  R                   R                  5       (       d   S5       eU R                  5       (       d  U R	                  5       (       a<  TR
                  R                  U R                  5       U5      nU R                  U5        g [        S5      e)Nz3We only support call 'set_shape' in to_static mode.zBCurrently, we can only set shape for dense and selected_row tensor)
basedygraphin_to_static_modeis_dense_tensor_typeis_selected_row_typer   create_shaped_typer   set_typer^   )re   rM   r   rs   s      rB   	set_shape%monkey_patch_value.<locals>.set_shape<  s    {{""''99;; 	
A	
; $$&&$*C*C*E*E::00eDDMM$T rE   c                *    [        [        U 5      5      $ r   )hashidrd   s    rB   
value_hash&monkey_patch_value.<locals>.value_hashI  s    BtH~rE   c                  >^  Uc  Uc  Uc  T $ Ub  [        U[        5      (       a  TR                  R                  U5      nOi[        UTR                  R
                  TR                  TR                  TR                  45      (       a  O![        S[        U5      R                  -   5      eUc  SnO[        U[        5      (       d   S5       eUU 4S jnU" T XX45      $ )Nzdevice value error, must be str, paddle.CPUPlace(), paddle.CUDAPlace(), paddle.CUDAPinnedPlace(), paddle.XPUPlace() or paddle.CustomPlace(), but the type of device is Tz5blocking value error, must be the True, False or Nonec                  > Uc  U R                   nU nX%R                   :w  aH  TR                  R                  R                  UR                  S9   UR                  US9nSnS S S 5        OUn[        UTR                  5      (       a  WR                  US9nSnO[        UTR                  5      (       a5  USLa  [        R                  " S5        [        R                  " T	S5      nSnO0[        UTR                  5      (       a  WR                  5       nSnOWnU(       a  [         R"                  " U5      $ U$ ! , (       d  f       N= f)N)rr   )rU   F)rm   Tri   r  )rU   rT  rq   _dygraph_place_guardrr   r   rK   ru   rn   CUDAPinnedPlacerj   rk   r   rc   CPUPlacerf   copydeepcopy)
tr~   rU   rm   copy_tensort_usedt_castednew_trs   re   s
           rB   	transform2monkey_patch_value.<locals>._to.<locals>.transformr  s"   }F $[[**?? ,, @   &{{{7H"'K	  " &&"2"233 x8#FF$:$:;;4'MML dA.#FFOO44 # }}U++L5 s   D88
E)rK   strr~   _convert_to_placerJ   rQ   rf  ru   re  r^   r   r>   r   )re   r~   rU   rm   rj  rn  rs   s   `     rB   _tomonkey_patch_value.<locals>._toL  s     >em0@K&#&&88@KK%%OO$$**	
 
   ~6l++, 
 Hh-- G-!	F vhDDrE   c                @    U R                  5       nX![        U 5      '   U$ r   )r5  r_  )re   memo
new_tensors      rB   __deepcopy__(monkey_patch_value.<locals>.__deepcopy__  s    ZZ\
#RXrE   c           
     ,  >^^^^^^^^^^ SU;   a  UR                  S5      nOSnSU;   a  UR                  S5      nOSn[        U5      n[        U5      nXV-   S:  d  XV-   S:X  a  [        S5      e1 Skn[        UR	                  5       5      U-
  n[        U5      S:w  a   [        S[        [        U5      5      -   5      eSS
 jmSS jmSS jm " S S5      mU4S jmU4S jmU4S jmSU4S jjmSU4S jjmU4S jmUUUUUUUUUU4
S jn	U	" U0 UD6nUR                  SS	5      n
U
b,  UR                  S5        U
R                  US'   U
R                    UR                  SS5      (       a  U(       a  SOSUS'   XAS'   U R                  " S0 UD6nU$ ) a  
Performs Tensor dtype and/or device conversion. A paddle.dtype and place
are inferred from the arguments of ``self.to(*args, **kwargs)``.There are
three ways to call `to`:

    1. to(dtype, blocking=True)
    2. to(device, dtype=None, blocking=True)
    3. to(other, blocking=True)

Returns:
    Tensor: self

Examples:
    .. code-block:: python

        >>> import paddle
        >>> x = paddle.to_tensor([1,2,3])
        >>> print(x)
        Tensor(shape=[3], dtype=int64, place=Place(gpu:0), stop_gradient=True,
            [1, 2, 3])

        >>> x = x.to("cpu")
        >>> print(x.place)
        Place(cpu)

        >>> x = x.to("float32")
        >>> print(x.dtype)
        paddle.float32

        >>> x = x.to("gpu", "int16")
        >>> print(x)
        Tensor(shape=[3], dtype=int16, place=Place(gpu:0), stop_gradient=True,
            [1, 2, 3])
        >>> y = paddle.to_tensor([4,5,6])
        >>> y
        Tensor(shape=[3], dtype=int64, place=Place(gpu:0), stop_gradient=True,
            [4, 5, 6])
        >>> y = y.to(x)
        >>> print(y)
        Tensor(shape=[3], dtype=int16, place=Place(gpu:0), stop_gradient=True,
            [4, 5, 6])
non_blockingFrg     r   a  to() received too many arguments - expected one of:
                  * (Union[str, paddle.CPUPlace(), paddle.CUDAPlace(), paddle.CUDAPinnedPlace(), paddle.XPUPlace(), paddle.CustomPlace()]                 device, Union[str, paddle.dtype, numpy.dtype] dtype, bool blocking)
                 * (Union[str, paddle.dtype, numpy.dtype] dtype, bool blocking)
                 * (paddle.Tensor other, bool blocking) >   rU   r   r~   rm   z(to() got an unexpected keyword argument Nc                    g r   rF   )rU   rm   s     rB   dtype_first_sig7monkey_patch_value.<locals>.to.<locals>.dtype_first_sig  s    3rE   c                    g r   rF   )r~   rU   rm   s      rB   device_first_sig8monkey_patch_value.<locals>.to.<locals>.device_first_sig  s    rE   c                    g r   rF   )r   rm   s     rB   tensor_like_first_sig=monkey_patch_value.<locals>.to.<locals>.tensor_like_first_sig  s    rE   c                      \ rS rSrSrg).monkey_patch_value.<locals>.to.<locals>._NoArgi  rF   N)r>   
__module____qualname____firstlineno____static_attributes__rF   rE   rB   _NoArgr    s    crE   r  c                   > / SQn[        U TR                  [        R                  45      =(       d*    [        U [        5      =(       a    U R	                  5       U;   $ )N)r   r   r   r   r   r   r   r   r   r    r!   r   )rK   rU   nprp  lower)argvalid_dtypesrs   s     rB   is_dtype0monkey_patch_value.<locals>.to.<locals>.is_dtype  sG    L cFLL"((#;< 3$D)DrE   c                f   > U S L =(       d&    [        U TR                  R                  [        45      $ r   )rK   rJ   rQ   rp  r  rs   s    rB   	is_device1monkey_patch_value.<locals>.to.<locals>.is_device   s(    $;K*S6;;3D3Dc2J"KKrE   c                D   > [        U TR                  R                  5      $ r   )rK   r   r   r  s    rB   	is_tensor1monkey_patch_value.<locals>.to.<locals>.is_tensor  s    c6::#3#344rE   c                   >^  UU 4S jnU$ )Nc                :   > [        U 5      T:  a  U T   $ T" 5       $ r   )r   )r?   r@   r  positions     rB   extract_positional_arggmonkey_patch_value.<locals>.to.<locals>.create_positional_arg_extractor.<locals>.extract_positional_arg  s     t9x'>)xrE   rF   )r  r  r  s   ` rB   create_positional_arg_extractorGmonkey_patch_value.<locals>.to.<locals>.create_positional_arg_extractor  s     
 *)rE   c                   >^ ^ UU U4S jnU$ )Nc                   > TU;   a4  [        U5      T:  a%  [        UR                  5       5      T   T:X  a  UT   $ T" 5       $ r   )r   r   keys)r?   r@   r  keyr  s     rB   extract_keyword_argamonkey_patch_value.<locals>.to.<locals>.create_keyword_arg_extractor.<locals>.extract_keyword_arg  s?    6MFh.V[[]+H5<!#;&xrE   rF   )r  r  r  r  s   `` rB   create_keyword_arg_extractorDmonkey_patch_value.<locals>.to.<locals>.create_keyword_arg_extractor  s      '&rE   c                    >^  UU 4S jnU$ )Nc                ^   > T H   n[        U" X5      =nT5      (       a  M  Us  $    T" 5       $ r   )rK   )r?   r@   	extractorr  r  
extractorss       rB   chainGmonkey_patch_value.<locals>.to.<locals>.chain_extractors.<locals>.chain  s2    !+I%Yt-D&DcfMM"
 ", xrE   rF   )r  r  r  s   ` rB   chain_extractors8monkey_patch_value.<locals>.to.<locals>.chain_extractors  s      LrE   c                   >
 TT	" T" SS9T
" SSS95      T4TT	" T" SS9T
" SSS95      T4TT	" T" SS9T
" SSS95      T40nUR                  5        Ht  u  nu  pE[        U" X5      =nT5      (       a  M#  U" U5      (       d  M2  [        R                  " U5      R                  " U 0 UD6nUR                  5         UR                  s  $    [        S5      e)Nr   )r  rU   )r  r  r~   r   zNo matching signature found.)r   rK   inspect	signaturebindapply_defaults	argumentsr^   )r?   r@   signature_mapsigr  	conditionr  
bound_argsr  r  r  r  r  r}  r  r  r  r  s           rB   dispatch_to_signature=monkey_patch_value.<locals>.to.<locals>.dispatch_to_signature$  s     $7C41M " !$7C4AN # &$7C41M (M0 0=/B/B/D++i!$T22CF nn!(!2!23!7!<!<d!Mf!MJ--/%/// 0E ;<<rE   r   rU   rm   Trj  r   )NN)r  r   )r  rp  r  r   rF   )rE  r   r   setr  nextitergetrU   rr   rr  )re   r?   r@   rz  rj  	size_argssize_kwargs
valid_keysinvalid_keysr  r   resr  r  r  r  r  r}  r  r  r  r  rs   s               @@@@@@@@@@rB   tomonkey_patch_value.<locals>.to  s   X V#!::n5L LV **V,KKI	&k"Q&)*AQ*F9  >
6;;=)J6|!:tL)*+ 
 	7D<	&	L	5	*
	'	!	= !	=F %d5f5$'HHW!KKDMKK*e44E$ 	Z *]hh
rE   c                    g)a  
**Notes**:
    **This API is ONLY available in Dygraph mode**
Returns a numpy array shows the value of current :ref:`api_guide_Variable_en`
Returns:
    ndarray: The numpy value of current Variable.
Returns type:
    ndarray: dtype is same as current Variable
Examples:
    .. code-block:: python

        >>> import paddle
        >>> import paddle.base as base
        >>> from paddle.nn import Linear
        >>> import numpy as np
        >>> data = np.random.uniform(-1, 1, [30, 10, 32]).astype('float32')
        >>> with base.dygraph.guard():
        ...     linear = Linear(32, 64)
        ...     data_tensor = paddle.to_tensor(data)
        ...     x = linear(data_tensor)
        ...     print(x.numpy())
NrF   rd   s    rB   numpy!monkey_patch_value.<locals>.numpyU      0 	rE   c                    g)a  
**Notes**:
    **This API is ONLY available in Dygraph mode**
Returns a Python list that contains the elements of current :ref:`api_guide_Variable_en`

Returns:
    list: The Python list containing the elements of current Variable.

Returns type:
    list: Elements have the same dtype as current Variable

Examples:
    .. code-block:: python

        >>> import paddle
        >>> import paddle.base as base
        >>> import numpy as np
        >>> data = np.random.uniform(-1, 1, [2, 3]).astype('float32')
        >>> with base.dygraph.guard():
        ...     x = paddle.to_tensor(data)
        ...     print(x.tolist())  # Convert tensor to Python list
NrF   rd   s    rB   tolist"monkey_patch_value.<locals>.tolisto  r  rE   c                    g)z
Value don't have 'register_hook' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a error here.
NrF   )re   hooks     rB   register_hook)monkey_patch_value.<locals>.register_hook  s     	rE   c                $    U R                   (       + $ )a  
Whether this Tensor requires gradient computation.

This is a convenience property that returns the opposite of stop_gradient.
Setting requires_grad=True is equivalent to setting stop_gradient=False.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> x = paddle.randn([2, 3])
        >>> print(x.requires_grad)  # False by default
        >>>
        >>> x.requires_grad = False
        >>> print(x.stop_gradient)  # True
)rR   rd   s    rB   r  )monkey_patch_value.<locals>.requires_grad  s    $ %%%%rE   c                t    [        U[        5      (       d  [        S[        U5       35      eU(       + U l        g)z
Set whether this Tensor requires gradient computation.

Args:
    value (bool): True to enable gradient computation, False to disable.
$requires_grad must be bool, but got NrK   r   r   r   rR   )re   rT   s     rB   r  r    s8     %&&6tE{mD  "'YrE   c                v    [        U[        5      (       d  [        S[        U5       35      eU(       + U l        U $ )z
Set whether this Tensor requires gradient computation.

Args:
    requires_grad (bool): True to enable gradient computation, False to disable.
r  r  )re   r  s     rB   requires_grad_*monkey_patch_value.<locals>.requires_grad_  s@     -..6tM7J6KL  "/.rE   c                "    U R                  5       $ )z
Returns the number of bytes allocated on the machine for a single element of the Tensor.

Examples:
    .. code-block:: python

        >>> import paddle
        >>> x = paddle.randn((2,3),dtype=paddle.float64)
        >>> x.itemsize
        8
)element_sizerd   s    rB   itemsize$monkey_patch_value.<locals>.itemsize  s       ""rE   r   c                0    [         R                  " S5        g)z
Tensor don't have 'get_device' interface in static graph mode
But this interface can greatly facilitate dy2static.
So we give a warning here and return None.
zgTensor do not have 'get_device' interface for pir graph mode, try not to use it. None will be returned.Nr{   rd   s    rB   
get_device&monkey_patch_value.<locals>.get_device  s     	u	
rE   rf   rn   rr   r   rx   r   itemr   r   ndimr   r   r   r   TmTnew_full	new_emptynew_ones	new_zerosr  r5  r8  rN   rE  r[  __hash__rI  rQ  rM  rr  r  r  r  r  r  rw  r$   r%   r&   r'   r(   r)   r,   r.   r-   r/   r2   r3   r0   r1   r*   r+   
__matmul____rmatmul____neg____abs__r4   r5   r6   r7   r8   r9   	__float____int____bool____complex__r  r
   r  )_getitem_static_setitem_static)NT)r?   r   )FN)r  r   r  zbool | float | paddle.TensorrU   DTypeLike | Noner~   PlaceLike | Noner  r   r  r   )
r  r   rU   r  r~   r  r  r   r  r   )NNNN)returnr   )rT   r   r  None)T)r  r   r  r   )r  r   )r  r  )"propertyr	   fake_interface_onlysetterrs   r   addsubtractmultiplyr   powfloor_divide	remaindermatmulequal	not_equal	less_than
less_equalgreater_thangreater_equalextend_already_patch_valuesetattrr   paddle.tensortensor_method_funcrt   getattrmagic_method_funcbase.variable_indexr  r  __getitem____setitem__)Arf   rn   rx   rr   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r	  r  r  r  r  r'  r*  r.  r1  r5  r8  rN   rE  rI  rM  rQ  r[  r`  rr  rw  r  r  r  r  r  r  r  r  value_methodsdtype_conversion_methodsmethodr   r   magic_methodorigin_methodimplr  r  r   rs   r`   sA                                                                 @@@rB   monkey_patch_valuer     sd   &."&H H H& 
 
 
 
		  ,,,7&r((T	)0(-..-3, 	^ ^@ " ", , ,8 , ,J #'#'# -
-
 1-

  -
 !-
 -
 -
 -
^ 
 #'#'# +
+
  	+

 !+
 +
 +
 +
Z 
 #'#'# ,
,
  	,

 !,
 ,
 ,
 ,
\ 
 #'#'# ,
,
  	,

 !,
 ,
 ,
 ,
\42404@40#2 ! !F=40,*+
 IEV
wr  2  2   & && ' ' # # 
h	h	h 
%h 
6	h
 
z"h 
Gh 
-(h 
h 
h 
z"h 
h 
6h 
h 
$h 
Gh  
!h" 
c
#h$ 
t%h& 
Z 'h( 
k")h* 
Z +h, 
k"-h. 
-(/h0 
>*1h2 
%3h4 
>*5h6 
67h8 
9h: 
i ;h< 
Z =h> 
X?h@ 
GAhB 
6ChD 
EhF 
r
GhH 
6IhJ 
%KhL 
-(MhN 
z"OhP 
&QhV Y(9(95,O	
Uh` FMM--ul	
_hl 6==115,	
khx FMM22D-	
whD 6==115,	
ChR FMM22E<	
Qh^ 6==//	
]hj v}}33UL	
ihv Z)=)=tTJ	
uh~ ^V]]-A-A4N	
}hF Y(9(95$G	
EhN Z):):D$G	
MhV  : :E4	
Uhb !;!;T4	
ahn Y(?(?M	
mhv Z)@)@$M	
uh~ \6==+?+?M	
}hF ]FMM,@,@$M	
EhL 
L!MhN 
L!OhT Xv}}':':E4H	
Sh\ Xv}}'>'>tL	
[hd Xv}}'>'>tL	
chl Xv}}'?'?M	
kht Xv}}'A'A5$O	
sh| &--55ud	
{hF 
gGhH 
EIhJ 
VKhL 
	"MhN 
XOhMR  @A12  #F )K )KE;4 $ 	!==;;Kuk**!&--dCK{{K8 < ,2==+J+J'L-6==->Dt|T2 ,K 	K++#9  rE   ))
__future__r   rg  r  r#  rj   	functoolsr   typingr   r  r  rs   r   paddle.base.libpaddler   paddle.base.wrapped_decoratorr   paddle.utils.decorator_utilsr	    r   r   paddle._typingr   r   r   r
  BOOLUINT8INT8INT16INT32r   r   r   SUPPORT_PROMOTION_OPSrG   r  r[   r  rF   rE   rB   <module>r(     s   #          * 8 >>   MMNNMMNNNNNN  y  I  
	 
 y  Y  y  i  F  F  W   W! " W# $ 
7% & W' ( G) , F- . / 0 5  : 4	 %%:; 4S$rE   