Ë
    ÌÓ^j™!  ã                   ó†   — d dl mZmZmZmZ ddœd„Zd„ Z G d„ de«      Z G d„ d	e«      Z G d
„ de«      Z	 G d„ de«      Z
y)é    )ÚBinaryUfuncInfoÚOpInfoÚReductionOpInfoÚUnaryUfuncInfoN©Úop_dbc                óh   — |€ddl m} |D ]%  }|j                  | k(  sŒ|j                  |k(  sŒ#|c S  y)zH
    Finds the OpInfo with the given name that has no variant name.
    Nr   r   )Ú2torch.testing._internal.common_methods_invocationsr   ÚnameÚvariant_test_name)Úreferenced_nameÚvariant_namer   Úopinfos       ún/var/www/ramen.bs-engineer-server.com/venv/lib/python3.12/site-packages/torch/testing/_internal/opinfo/refs.pyÚ_find_referenced_opinfor   "   s9   € ð €}ÝLàò ˆØ�;‰;˜/Ó)¨f×.FÑ.FÈ,Ó.VØŠMñó    c                 ó  — | |d d d ddœ}|j                  «       }d|v r|j                  |d   «       |d= d|v r|d= d|v r|d= d|v r|d= d|v r|d= |j                  |«       |j                  |«       d|d<   d|d	<   d|d
<   d|d<   d|d<   |S )NF)r   ÚopÚaliasesÚmethod_variantÚinplace_variantÚsupports_scriptingÚkwargsÚselfÚ	__class__ÚskipsÚ
decoratorsÚsupports_autogradÚsupports_gradgradÚsupports_fwgrad_bwgradÚsupports_inplace_autogradÚsupports_forward_ad)ÚcopyÚupdate)r   r   Ú	inheritedÚ	overridesÚcommon_kwargsr   s         r   Ú_inherit_constructor_argsr(   1   sä   € ð ØØØØØ#ñ€Mð �^‰^Ó€Fð �6ÑØ�‰�f˜XÑ&Ô'Ø�8ÐØ�ÑØ�6ˆNØ�fÑØ�;ÐØ�&ÑØ�7ˆOØ�vÑØ�<Ð ð ‡M�M�-Ô Ø
‡M�M�)Ôð
 #(€FÐÑØ"'€FÐÑØ',€FÐ#Ñ$Ø*/€FÐ&Ñ'Ø$)€FÐ Ñ!à€Mr   c                   ó.   ‡ — e Zd ZdZdddddœˆ fd„
Zˆ xZS )ÚPythonRefInfozM
    An OpInfo for a Python reference of an OpInfo base class operation.
    NÚ T©r   r   Útorch_opinfo_variant_nameÚvalidate_view_consistencyc                ó2  •— || _         || _        t        |||¬«      | _        || _        t        | j                  t        «      s!t        dt        | j                  «      › �«      ‚| j                  j                  }t        ||||«      }	t        ‰
| �0  di |	¤Ž y )Nr   z(Expected torch_opinfo to be OpInfo, got © )Útorch_opinfo_namer-   r   Útorch_opinfor.   Ú
isinstancer   ÚAssertionErrorÚtypeÚ_original_opinfo_argsr(   ÚsuperÚ__init__©r   r   r   r   r1   r-   r.   r   r%   Úukwargsr   s             €r   r8   zPythonRefInfo.__init__a   s›   ø€ ð "3ˆÔØ)BˆÔ&Ü3ØÐ8Àô
ˆÔð *CˆÔ&Ü˜$×+Ñ+¬VÔ4Ü Ø:¼4À×@QÑ@QÓ;RÐ:SÐTóð ð ×%Ñ%×;Ñ;ˆ	Ü+¨D°"°iÀÓHˆÜ‰ÑÑ#˜7Ó#r   ©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r8   Ú__classcell__©r   s   @r   r*   r*   \   s    ø„ ñð Øà"$Ø"&÷$ò $r   r*   c                   ó,   ‡ — e Zd ZdZddddœˆ fd„
Zˆ xZS )ÚReductionPythonRefInfoúM
    An OpInfo for a Python reference of an elementwise unary operation.
    Nr+   ©r   r   r-   c                ó2  •— || _         || _        t        |||¬«      | _        t	        | j                  t
        «      s!t        dt        | j                  «      › �«      ‚| j                  j                  }t        ||||«      }d| _
        t        ‰	| �0  di |¤Ž y )Nr   z1Expected torch_opinfo to be ReductionOpInfo, got Fr0   )r1   r-   r   r2   r3   r   r4   r5   Ú_original_reduction_argsr(   r.   r7   r8   ©
r   r   r   r   r1   r-   r   r%   r:   r   s
            €r   r8   zReductionPythonRefInfo.__init__�   sœ   ø€ ð "3ˆÔØ)BˆÔ&Ü3ØÐ8Àô
ˆÔô ˜$×+Ñ+¬_Ô=Ü ØCÄDÈ×IZÑIZÓD[ÐC\Ð]óð ð ×%Ñ%×>Ñ>ˆ	Ü+¨D°"°iÀÓHˆð */ˆÔ&ä‰ÑÑ#˜7Ó#r   r;   rA   s   @r   rC   rC   |   s   ø„ ñð Øà"$÷$ò $r   rC   c                   ó.   ‡ — e Zd ZdZdddddœˆ fd„
Zˆ xZS )ÚElementwiseUnaryPythonRefInforD   Nr+   Tr,   c                ó2  •— || _         || _        t        |||¬«      | _        || _        t        | j                  t        «      s!t        dt        | j                  «      › �«      ‚| j                  j                  }t        ||||«      }	t        ‰
| �0  di |	¤Ž y )Nr   z0Expected torch_opinfo to be UnaryUfuncInfo, got r0   )r1   r-   r   r2   r.   r3   r   r4   r5   Ú_original_unary_ufunc_argsr(   r7   r8   r9   s             €r   r8   z&ElementwiseUnaryPythonRefInfo.__init__£   s›   ø€ ð "3ˆÔØ)BˆÔ&Ü3ØÐ8Àô
ˆÔð *CˆÔ&Ü˜$×+Ñ+¬^Ô<Ü ØBÄ4È×HYÑHYÓCZÐB[Ð\óð ð ×%Ñ%×@Ñ@ˆ	Ü+¨D°"°iÀÓHˆä‰ÑÑ#˜7Ó#r   r;   rA   s   @r   rJ   rJ   ž   s    ø„ ñð Øà"$Ø"&÷$ò $r   rJ   c                   ó,   ‡ — e Zd ZdZddddœˆ fd„
Zˆ xZS )ÚElementwiseBinaryPythonRefInfozN
    An OpInfo for a Python reference of an elementwise binary operation.
    Nr+   rE   c                ó$  •— || _         || _        t        |||¬«      | _        t	        | j                  t
        «      s!t        dt        | j                  «      › �«      ‚| j                  j                  }t        ||||«      }t        ‰	| �,  di |¤Ž y )Nr   z1Expected torch_opinfo to be BinaryUfuncInfo, got r0   )r1   r-   r   r2   r3   r   r4   r5   Ú_original_binary_ufunc_argsr(   r7   r8   rH   s
            €r   r8   z'ElementwiseBinaryPythonRefInfo.__init__Ä   s’   ø€ ð "3ˆÔØ)BˆÔ&Ü3ØÐ8Àô
ˆÔô ˜$×+Ñ+¬_Ô=Ü ØCÄDÈ×IZÑIZÓD[ÐC\Ð]óð ð ×%Ñ%×AÑAˆ	Ü+¨D°"°iÀÓHˆä‰ÑÑ#˜7Ó#r   r;   rA   s   @r   rN   rN   ¿   s   ø„ ñð Øà"$÷$ò $r   rN   )Ú#torch.testing._internal.opinfo.corer   r   r   r   r   r(   r*   rC   rJ   rN   r0   r   r   ú<module>rR      sT   ð÷ó ð> EIô ò(ôV$�Fô $ô@$˜_ô $ôD$ Nô $ôB$ _õ $r   