
    shg                         S SK JrJrJrJr  SS.S jrS r " S S\5      r " S S	\5      r " S
 S\5      r	 " S S\5      r
g)    )BinaryUfuncInfoOpInfoReductionOpInfoUnaryUfuncInfoNop_dbc                t    Uc  SSK Jn  U H)  nUR                  U :X  d  M  UR                  U:X  d  M'  Us  $    g)z@
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       w/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/torch/testing/_internal/opinfo/refs.py_find_referenced_opinfor   "   s4     }L;;/)f.F.F,.VM     c                 0   U US S S SS.nUR                  5       nSU;   a  UR                  US   5        US	 SU;   a  US	 SU;   a  US	 SU;   a  US	 SU;   a  US	 UR                  U5        UR                  U5        SUS'   SUS	'   SUS
'   SUS'   SUS'   U$ )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fX&'86Nf;&7Ov<  MM- 
MM)
 #(F"'F',F#$*/F&'$)F !Mr   c                   :   ^  \ rS rSrSrSSSSS.U 4S jjrSrU =r$ )	PythonRefInfo\   zE
An OpInfo for a Python reference of an OpInfo base class operation.
N Tr   r   torch_opinfo_variant_namevalidate_view_consistencyc                   > X@l         XPl        [        XEUS9U l        X`l        [        U R                  [        5      (       d   eU R                  R                  n[        XX5      n	[        T
U ](  " S0 U	D6  g Nr    )torch_opinfo_namer.   r   torch_opinfor/   
isinstancer   _original_opinfo_argsr(   super__init__r   r   r   r   r3   r.   r/   r   r%   ukwargsr   s             r   r8   PythonRefInfo.__init__a   sr     "3)B&3
 *C&$++V4444%%;;	+DiH#7#r   r4   r3   r.   r/   __name__
__module____qualname____firstlineno____doc__r8   __static_attributes____classcell__r   s   @r   r*   r*   \   s      "$"&$ $r   r*   c                   8   ^  \ rS rSrSrSSSS.U 4S jjrSrU =r$ )ReductionPythonRefInfoy   E
An OpInfo for a Python reference of an elementwise unary operation.
Nr,   r   r   r.   c                   > X@l         XPl        [        XEUS9U l        [	        U R                  [
        5      (       d   eU R                  R                  n[        XXv5      nSU l        [        T	U ](  " S0 UD6  g )Nr   Fr2   )r3   r.   r   r4   r5   r   _original_reduction_argsr(   r/   r7   r8   
r   r   r   r   r3   r.   r   r%   r:   r   s
            r   r8   ReductionPythonRefInfo.__init__~   su     "3)B&3
 $++_====%%>>	+DiH */&#7#r   r<   r=   rE   s   @r   rG   rG   y   s     "$$ $r   rG   c                   :   ^  \ rS rSrSrSSSSS.U 4S jjrSrU =r$ )	ElementwiseUnaryPythonRefInfo   rI   Nr,   Tr-   c                   > X@l         XPl        [        XEUS9U l        X`l        [        U R                  [        5      (       d   eU R                  R                  n[        XX5      n	[        T
U ](  " S0 U	D6  g r1   )r3   r.   r   r4   r/   r5   r   _original_unary_ufunc_argsr(   r7   r8   r9   s             r   r8   &ElementwiseUnaryPythonRefInfo.__init__   sr     "3)B&3
 *C&$++^<<<<%%@@	+DiH#7#r   r<   r=   rE   s   @r   rP   rP      s      "$"&$ $r   rP   c                   8   ^  \ rS rSrSrSSSS.U 4S jjrSrU =r$ )ElementwiseBinaryPythonRefInfo   zF
An OpInfo for a Python reference of an elementwise binary operation.
Nr,   rJ   c                   > X@l         XPl        [        XEUS9U l        [	        U R                  [
        5      (       d   eU R                  R                  n[        XXv5      n[        T	U ]$  " S0 UD6  g r1   )
r3   r.   r   r4   r5   r   _original_binary_ufunc_argsr(   r7   r8   rM   s
            r   r8   'ElementwiseBinaryPythonRefInfo.__init__   sk     "3)B&3
 $++_====%%AA	+DiH#7#r   )r4   r3   r.   r=   rE   s   @r   rV   rV      s     "$$ $r   rV   )#torch.testing._internal.opinfo.corer   r   r   r   r   r(   r*   rG   rP   rV   r2   r   r   <module>r\      sQ    > EI (V$F $:$_ $>$N $<$_ $r   