
    R j!                         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       t/root/GenerationalWealth/GenerationalWealth/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!  [        S[        U R                  5       35      eU R                  R                  n[        XX5      n	[        T
U ]0  " S0 U	D6  g )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   r2   r.   r/   r   r%   ukwargsr   s             r   r9   PythonRefInfo.__init__a   s     "3)B&3
 *C&$++V44 :4@Q@Q;R:ST  %%;;	+DiH#7#r   r3   r2   r.   r/   __name__
__module____qualname____firstlineno____doc__r9   __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$ )ReductionPythonRefInfo|   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!  [        S[        U R                  5       35      eU R                  R                  n[        XXv5      nSU l
        [        T	U ]0  " S0 UD6  g )Nr   z1Expected torch_opinfo to be ReductionOpInfo, got Fr1   )r2   r.   r   r3   r4   r   r5   r6   _original_reduction_argsr(   r/   r8   r9   
r   r   r   r   r2   r.   r   r%   r;   r   s
            r   r9   ReductionPythonRefInfo.__init__   s     "3)B&3
 $++_== CDIZIZD[C\]  %%>>	+DiH */&#7#r   r=   r>   rF   s   @r   rH   rH   |   s     "$$ $r   rH   c                   :   ^  \ rS rSrSrSSSSS.U 4S jjrSrU =r$ )	ElementwiseUnaryPythonRefInfo   rJ   Nr,   Tr-   c                ,  > X@l         XPl        [        XEUS9U l        X`l        [        U R                  [        5      (       d!  [        S[        U R                  5       35      eU R                  R                  n[        XX5      n	[        T
U ]0  " S0 U	D6  g )Nr   z0Expected torch_opinfo to be UnaryUfuncInfo, got r1   )r2   r.   r   r3   r/   r4   r   r5   r6   _original_unary_ufunc_argsr(   r8   r9   r:   s             r   r9   &ElementwiseUnaryPythonRefInfo.__init__   s     "3)B&3
 *C&$++^<< B4HYHYCZB[\  %%@@	+DiH#7#r   r=   r>   rF   s   @r   rQ   rQ      s      "$"&$ $r   rQ   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,   rK   c                   > X@l         XPl        [        XEUS9U l        [	        U R                  [
        5      (       d!  [        S[        U R                  5       35      eU R                  R                  n[        XXv5      n[        T	U ],  " S0 UD6  g )Nr   z1Expected torch_opinfo to be BinaryUfuncInfo, got r1   )r2   r.   r   r3   r4   r   r5   r6   _original_binary_ufunc_argsr(   r8   r9   rN   s
            r   r9   'ElementwiseBinaryPythonRefInfo.__init__   s     "3)B&3
 $++_== CDIZIZD[C\]  %%AA	+DiH#7#r   )r3   r2   r.   r>   rF   s   @r   rW   rW      s     "$$ $r   rW   )#torch.testing._internal.opinfo.corer   r   r   r   r   r(   r*   rH   rQ   rW   r1   r   r   <module>r]      sT    > EI (V$F $@$_ $D$N $B$_ $r   