
    `i.K                    &H   U d dl Z d dlZd dlmZ d dlmZ d dlmZmZ d dl	m
Z
mZ d dl	Z	d dlZd dlmc mZ d dlmZ d dlmZ d dlmZ d d	lmZmZmZ d d
lmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$ d dl%m&Z& d dl'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5 d dl6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z= d dl>m?Z? d dl@Z@e j        jA        e jB        j        jC        jA        e jB        j        jD        jA        e jB        j        jE        jA        e jB        j        jE        jA        gZFeGe?         eHd<   e j        jI        e j        jJ        e j        jK        e jB        j        jE        jL        e jB        j        jE        jL        hZMeNeO         eHd<   g  e
jP        d eFD                       ZQeGeO         eHd<   d eQD             ZQi ZReSeOeTf         eHd<   eFD ]UZUeUjV        D ]KZW eXeUeW          ZYeUjZ        [                    dd          [                    dd          Z\eYeRvr
e\ deW eReY<   LV edd          Z] G d de          ZAd Z^ G d d          Z_ G d  d!          Z` G d" d#e          Za G d$ d%          Zb G d& d'          Zcd( Zdd) Zed* Zfd+ Zgd, Zhd- Zid. Zjd/ Zkd0 Zld1 Zmd2 Znd3 Zod4 Zpd5 Zqd6 Zrd7 Zsd8 Ztd9 Zud: Zvd; Zwd< Zxd= Zyd> Zzd? Z{d@ Z|dA Z}dB Z~dC ZdD ZdE ZdF ZdG ZdH ZdI ZdJ ZdK ZdL ZdM ZdN ZdO ZdP ZdQ ZdR ZdS ZdT ZdU ZdV ZdW ZdX ZdY ZdZ Zd[ Zd\ Zd] Zd^ Zd_ Zd` Zda Zdb Zdc Zdd Zde Zdf Zdg Zdh Zdi Zdj Zdk Zdl Zdm Zdn Zdo Zdp Zdq Zdr Zds Zdt Zdu Zdv Zdw Zdx Zdy Zdz Zd{ Zd| Zd} Zd~ Zd ZddZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z e&ej        ddeoe; d           e&ej        ddeoe; d           e&ej        ddeoe; d           e&ej        ddeoe;e j        fd          fZd Zd Zd Zd Zd Zd Ze j        j                                        oe j        j                            dd           Zg  ece j        j        et e&e$          f           ece j        j        e:eu e&e$           e&ej        dd e@j        d                    f           ece j        j        e:ev e& ej        d          dd           e&e$          f           ece j        j        ew           ece j        j        e:ex           ece j        j        e:ey e& ej        d          dd           e&e$          f           ece j        j        eq           ece j        j        er e&ej        dd e@j        d          d           e&e9de j        gd          f           ece j        j        ese: e& ej        d          dd           e&e$dd          f           ece j        j        dez e&ej        dd e@j        d                     e&ej        dd e@j        d                    f           ece j        j        de{ e&edd e@j        d                     e&ej        dd e@j        d                     e&ej        dd e@j        d                    f           ece j        j        de| e&e$           e&ej        dd e@j        d                     e&ej        dd e@j        d                    f           ece j        j        e e&ej        ddde j        g          f           ece j        j         ee}dd          e:d e&e!dde j        g           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd          f           ece j        j         ee}dd          e:d e&e!dde j        g           e&ej        ddde j        g           e&ej        ddde j        e j        g           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd          f           ece j        j         ee}dd          e:d e&e!dde j        g           e&e$d           e&ej        dd          f e& e"e j        di          dd          f           ece j        j         ee}ddd          e:d ee j                   e&e!dde j        g           e&ej        dde j        fd           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd           e& e"e j        di          dd          f           ece j        j         ee}ddd          e:d ee j                   e&e!dde j        g           e&ej        dde j        e j        e j        f           e&ej        ddde j        e j        g           e&ej        ddde j        e j        g           e&ej        dde j        fd           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd           e& e"e j        di          dd          f           ece j        j         ee}ddd           ee j                  e:d e&e!dde j        g           e&e$           e&ej        dd           e&ej        ddde j        e j        ge;           e&ej        dde j        fd          f e& e"e j        di          dd           e& e"e j        di          dd           e& e"e j        di          dd          f           ece j        j        e~ e& ej        d          dd          f           ece j        j        e e&ej        ddde j        g          f           ece j        j        ee: e&e$           e& ej        d          dd          f           ece j        j        ee: e&e$           e& ej        d          dd          f           ece j        j        e e& ej        d          dd          f           ece j        j        e e& ej        d          dd           e&e8dde j        gd          f           ece j        j         ee}dd          e:d e&e!dde j        g           e&e#           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd          f           ece j        j         ee}dd          e:d e&e!dde j        g           e&e#           e&ej        ddde j        g           e&ej        ddde j        e j        g           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd          f           ece j        j         ee}dd          e:d e&e!dde j        g           e&e#           e&e$           e&ej        dd          f e& e"e j        di          dd          f           ece j        j          ee}ddd          e:d e&e!dde j        g           e&e#           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd          f           ece j        j         ee}ddd          e:d e&e!dde j        g           e&e#           e&ej        ddde j        g           e&ej        ddde j        e j        g           e&e9ddde j        g           e&e9ddde j        g          f e& e"e j        di          dd          f           ece j        j         ee}ddd          e:d e&e!dde j        g           e&e#           e&e$           e&ej        dd          f e& e"e j        di          dd          f           ece j        j        ed e& ej        d          dd          f           ece j        j        ee e& ee j         e dd          e j         e dd          i          ddd¬          g e& ej        d          dd           e&ej        ddde j        g          fæ           ece j        j        e e& ej        d          dd           e& ej        d          dd          f           ece j        j        e e& ej        d          dd           e& ej        d          dd           e&ej        dd e@j        d          oe d          f           ece j        j        e e& ej        d          dd           e& ej        d          dd           e& ej        d          dd           e&e8d          f           ece j        j        e           ece j        jL        e           ece j        j	        ee:Ħ           ece j        j
        ef e& ej        d          dd           e& ej        d          dd           e& ej        d          dd           e& ej        d          dd          f           ece j        j        ej e& ej        d          dd           e&e9ddde j        g           e&ej        ddde j        g          f           ece j        j        e e& ej        d          dd          f           ece j        j        e e& ej        d          dd           e&e8dd           e& ej        d          dd          f           ece j        j        e e& ej        d          dd           e&e8dd           e& ej        d          dd          f           ece j        j        e e& ej        d          dd           e&ej        ddde j        g          f           ece j        j        e e& ej        d          dd          f           ece j        j        eg e& ej        d          dd           e&ej        ddde j        g          f           ece j        j        eh e& ej        d          dd          f           ece j        j        ei e& ej        d          dd          f           ece j        j        e e& ej        d          dd          f           ece j        j        e e& ej        d          dd           e&ej        ddde j        g          f           ece j        j        e e& ej        d          dd           e&e8de j        gd          f           ece j        j        e e& ej        d          dd           e&e8de j        gd          f           ece j        j        e eddŦ           e&ej        dd           e& ee j         e ddǬ          i          dde j        gd¬           e&ej        dde j        gd          fȦ           ece j        j        e e& ej        d          dd           e&e8dd           e& ej        d          dd           e& ej        d          dd           e& ej        d          dd          f           ece j        j        e e&ej        ddde j        g          f           ece j        j        e           ece j        j        e eddɦ           e& ej        d          dd           e& ee j         e dd          i          ddd¬           e& ej        d          ddd           e& ej        d          ddd           e& ej        d          dde;d          fʦ           ece j        j        e           ece j        j        ed˦           ece j        j        e           ece j        j          eed̦          d e& ej        d          dd          fͦ           ece j        j!         eed̦          d e& ej        d          dd          fͦ           ece j        j"         eed̦          d e&edd           e&edd           e&edd           e&eddϦ           e&eddЦ           e& ej        d          dd          fͦ           ece j        j#        e           ece j        j$        e e& ej        d          dd          f           ece j        j%        e           ece j        j&        de e& ej        d          ddd¬          g e& ej        d          dd           e&ej        ddѦ          fҦ           ece j        j'        de e& ee j         e dd          i          ddde<Ӧ           e& ee j         e ddԬ          i          ddd           e& ej        d          ddd¬          g e& ej        d          dd          fҦ           ece j        j(        e e& ej        d          ddd¬          g e& ej        d          dd          fæ           ece j        j)        ed e& ej        d          ddd¬          g e& ej        d          dd          fզ           ece j        j*        de e& ej        d          dd          f           ece j        j+        e e& ee j         e dd          i          ddd          g e& ej        d          dd          fæ           ece j        j,        eerdn# e&ej        dd e@j        d          d          f           ece j        j-        e           ece j        j.        e e&e$          f           ece j        j/        e e&e$          f           ece j        j0         eed֦          eЬצ           ece j        j1        eeЬצ           ece j        j2        eeѬצ           ece j        j3        eerdn# e&ej        dd e@j        d          d          f           ece j        j4        e e&ej        ddde j        g          f           ece j        j5        e           ece j        j6        e           ece j        j7        e e& ej        d          dd           e&ej        ddde j        g          f           ece j        j8        e e& ej        d          dd           e&ej        ddde j        g          f           ece j        j9        e e& ej        d          dd          f           ece j        j:        e e&e$          f           ece j        j;        e e&e$          f           ece j        j<        e           ece j        j=        eerdn# e&ej        dd e@j        d          d          f           ece j        j>        eerdn# e&ej        dd e@j        d          d          f           ece j        j?        e e&e$          f           ece j        j@        e e&e$          f           ece j        jA        d eed֦          eeϬئ           ece j        jB        d eed֦          eeϬئ           ece j        jC        dee e&e$          feϬ٦           ece j        jD        e           ece j        jE        ee: e& ej        d          ddd           e& ej        d          ddd          f           ece j        jF        ee: e& ej        d          ddd           e& ej        d          ddd          f           ece j        jG        e           ece j        jH        ee: e& ej        d          ddd           e& ej        d          ddd          f           ece j        jI        ee: e& ej        d          ddd           e& ej        d          ddd          f           ece j        jJ        e e&e$          f           ece j        jK        eĬ           ece j        jL        e e&ej        ddd          f           ece j        jM        e e&ej        ddd          f           ece j        jN        eeӬצ           ece j        jO        eeԬצ           ece j        jP        ee e&ej        dd          fڦ           ece j        jQ        eǬ           ece j        jR        e e&ej        ddd          f           ece j        jS        e e&ej        ddd          f          ZTeGec         eHd<   dS )    N)deepcopy)Enum)wrapspartial)chainproduct)pack_padded_sequence)make_tensor)
TEST_CUDNN)floating_typesfloating_and_complex_types_andget_all_fp_dtypes)	_TestParametrizer_update_param_kwargsexpectedFailureMPStoleranceOverridetolskipCUDAIfRocmprecisionOverrideskipMetaskipMPS)DecorateInfo)cosineembeddingloss_referencecross_entropy_loss_referencectcloss_referencehingeembeddingloss_referencehuberloss_referencekldivloss_referencemarginrankingloss_referencemultimarginloss_referencemultilabelmarginloss_referencenllloss_referencenlllossNd_referencesmoothl1loss_referencesoftmarginloss_referenceget_reduction)freeze_rng_state	skipIfMPSskipIfMPSOnMacOS13GRADCHECK_NONDET_TOLTEST_WITH_ROCM
IS_WINDOWSskipIfTorchDynamo)
ModuleTypeMODULE_NAMESPACESMODULES_TO_SKIPc                 6    g | ]fd j         D             S )c                 0    g | ]}t          |          S  )getattr).0module_name	namespaces     z/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/torch/testing/_internal/common_modules.py
<listcomp>z<listcomp>.<listcomp>4   s#    JJJWY$$JJJ    )__all__)r5   r7   s    @r8   r9   r9   3   sA     4( 4( 4( KJJJ	8IJJJ4( 4( 4(r:   MODULE_CLASSESc                 $    g | ]}|t           v|S r3   )r0   )r5   clss     r8   r9   r9   6   s"    NNN#3o3M3M#3M3M3Mr:   MODULE_CLASS_NAMESztorch. z.modules.TrainEvalMode)
train_only	eval_onlytrain_and_evalc                   6    e Zd ZdZdej        dfdZd Zd ZdS )moduleszQ PROTOTYPE: Decorator for specifying a list of modules over which to run a test. NTc                 z    t          |          | _        |t          |          nd | _        || _        || _        d S N)listmodule_info_listsetallowed_dtypestrain_eval_modeskip_if_dynamo)selfmodule_info_iterablerM   rN   rO   s        r8   __init__zmodules.__init__L   sD     $%9 : :5C5Oc.111UY.,r:   c                 (   g }| j         t          j        k    s| j         t          j        k    r|                    d           | j         t          j        k    s| j         t          j        k    r|                    d           |j        s
|d d         }|S )NTF   )rN   rB   rC   rE   appendrD   train_and_eval_differ)rP   module_infotraining_flagss      r8   _get_training_flagszmodules._get_training_flagsS   s     M$<<<$(DDD!!$''' M$;;;$(DDD!!%((( 0 	0+BQB/Nr:   c           
   #   ,  K   |t          d          | j        D ]v}t          |                    |j                            }| j        |                    | j                  }|                     |          }t          ||          D ]\  }}|j	        }	t          |          dk    r|	d|rdnd z  }	d|i}
t          |
d|           t          |
d|           	 t                    fd	            }| j        r3t          j        j        j        j        s t'          d
          |          }t)          |j        |j        j        |j        |          }||	|
|fV  # t.          $ r"}t1          d|	 d|j         d           |d }~ww xY wxd S )NzThe @modules decorator is only intended to be used in a device-specific context; use it with instantiate_device_type_tests() instead of instantiate_parametrized_tests()rT   _
train_mode	eval_moderW   dtypetrainingc                       | i |S rI   r3   )argskwargstests     r8   test_wrapperz/modules._parametrize_test.<locals>.test_wrapper}   s    #tT4V444r:   z/Policy: we don't run ModuleInfo tests w/ DynamozFailed to instantiate z for module !)RuntimeErrorrK   rL   supported_dtypesdevice_typerM   intersectionrY   r   formatted_namelenr   r   rO   torchtesting	_internalcommon_utilsTEST_WITH_TORCHINDUCTORr-   r   get_decorators__name__	Exceptionprintname)rP   rc   generic_cls
device_clsrW   dtypesrX   r_   r^   	test_nameparam_kwargsrd   decorator_fnexs    `            r8   _parametrize_testzmodules._parametrize_testc   s       B C C C  0 "	 "	K55j6LMMNNF".,,T-@AA!55kBBN%,^V%D%D  !5 (6	~&&**!PX%N\\;!P!PPI !.{;$\7EBBB$\:xHHH4[[5 5 5 5 ![5 * z5=3J3W3o z'k'89j'k'klx'y'y#*;+E{G[+/=*:PRW$Y $YL (L,OOOOO    ]9]]+JZ]]]^^^H3"	 "	s   BE##
F-F

F)	rr   
__module____qualname____doc__rB   rE   rR   rY   r}   r3   r:   r8   rG   rG   I   sW        [[<@!.!=d- - - -   ( ( ( ( (r:   rG   c                 <    | t           v rt           |          S | j        S rI   )r?   rr   )
module_clss    r8   get_module_common_namer      s"    '''!*--""r:   c                        e Zd ZdZddgZd ZdS )FunctionInputz: Contains args and kwargs to pass as input to a function. ra   rb   c                 "    || _         || _        d S rI   )ra   rb   )rP   ra   rb   s      r8   rR   zFunctionInput.__init__   s    	r:   Nrr   r~   r   r   	__slots__rR   r3   r:   r8   r   r      s3        DD"I    r:   r   c                   "    e Zd ZdZg dZddZdS )ModuleInputzA Contains args / kwargs for module instantiation + forward pass. constructor_inputforward_inputdescreference_fnNr@   c                     || _         || _        || _        | _        #t	                    fd            }|| _        d S d S )Nc                     t          |          t          |          }} | t          |                                           g|R i |S rI   )r   rJ   
parameters)mra   rb   r   s      r8   copy_reference_fnz/ModuleInput.__init__.<locals>.copy_reference_fn   sP      (~~x/?/?f $|AtALLNN';';MdMMMfMMMr:   )r   r   r   r   r   )rP   r   r   r   r   r   s       ` r8   rR   zModuleInput.__init__   sq    !2*	(#<  N N N N ! N !2D $#r:   )Nr@   Nr   r3   r:   r8   r   r      s9        KKNNNI2 2 2 2 2 2r:   r   c                       e Zd ZdZdZdZdS )ModuleErrorEnumz7 Enumerates when error is raised when testing modules. r   rT   N)rr   r~   r   r   CONSTRUCTION_ERRORFORWARD_ERRORr3   r:   r8   r   r      s        AAMMMr:   r   c                   2    e Zd ZdZg dZej        eddZdS )ErrorModuleInputzw
    A ModuleInput that will cause the operation to throw an error plus information
    about the resulting error.
    module_error_inputerror_on
error_typeerror_regex)r   r   c                >    || _         || _        || _        || _        d S rI   r   )rP   r   r   r   r   s        r8   rR   zErrorModuleInput.__init__   s(     #5 $&r:   N)	rr   r~   r   r   r   r   r   rf   rR   r3   r:   r8   r   r      sP         
 POOI
 *<(		' 	' 	' 	' 	' 	' 	'r:   r   c                       e Zd ZdZdd e            ej        ej        fej        ej        fddddddddZ	d	 Z
d
 Zed             Zed             ZdS )
ModuleInfoz+ Module information to be used in testing. r3   NT        F)skips
decoratorsrx   dtypesIfMPSdtypesIfHpusupports_gradgradgradcheck_nondet_tolmodule_memformat_affects_outrV   module_error_inputs_funcgradcheck_fast_modec                $   || _         || _        g |r|ng |r|ng R | _        || _        || _        || _        || _        |	| _        |
| _        || _	        || _
        || _        t          |t          j        j        j        j                  | _        d S rI   )r   module_inputs_funcr   rx   r   r   r   r   r   rV   r   r   
issubclassrl   nnrG   lazyLazyModuleMixinis_lazy)rP   r   r   r   r   rx   r   r   r   r   r   rV   r   r   s                 r8   rR   zModuleInfo.__init__   s    & %"4Z:=ZZ2Z5BX%%VXZZ&&!2$8!,H)%:"(@%#6 !*eh.>.C.STTr:   c                     g }| j         D ]`}t          |t                    r4|                    |||||          r|                    |j                    K|                    |           a|S rI   )r   
isinstancer   	is_activeextendrU   )rP   
test_classry   devicer^   rz   result	decorators           r8   rq   zModuleInfo.get_decorators   sx     	) 	)I)\22 )&&z9fe\ZZ 8MM)"6777i((((r:   c                 D    |dk    r| j         S |dk    r| j        S | j        S )Nmpshpu)r   r   rx   )rP   rh   s     r8   rg   zModuleInfo.supported_dtypes   s2    %##E!!##;r:   c                 *    t          | j                  S rI   )r   r   rP   s    r8   ru   zModuleInfo.name  s    %do666r:   c                 8    | j                             dd          S )NrA   r[   )ru   replacer   s    r8   rj   zModuleInfo.formatted_name  s    y  c***r:   )rr   r~   r   r   r   rl   float16float32bfloat16rR   rq   rg   propertyru   rj   r3   r:   r8   r   r      s        55  &((#mU]<#nem=#'&).3',*.%)U U U U UB     7 7 X7 + + X+ + +r:   r   c           
         t          t          |||          }t          t          dd          t           |d                    d           t          t          ddd	          t           |d                    d
d           t          t          dd          t           |d                    dd           g}|S )Nr   r^   requires_grad
         r   )inputc                     t          j        ||d                                                   |d                             dd                              dd          z   S )Nr   rT   r   r   )rl   mmtviewexpand)r   pr   s      r8   <lambda>z/module_inputs_torch_nn_Linear.<locals>.<lambda>  sN    UXeQqTVVXX5N5NQRSTQUQZQZ[\^`QaQaQhQhijlmQnQn5n r:   r   r   r   Fbiasno_biasc                 \    t          j        ||d                                                   S )Nr   )rl   r   r   r   r   is      r8   r   z/module_inputs_torch_nn_Linear.<locals>.<lambda>  s    !QqTVVXX1F1F r:   r         no_batch_dimc                     t          j        |                    dd          |d                                                                       d          |d         z   S )NrT   r   r   )rl   r   r   r   r   s      r8   r   z/module_inputs_torch_nn_Linear.<locals>.<lambda>  sE    !&&B--11R1R1W1WXZ1[1[^_`a^b1b r:   r   r
   r   r   )rW   r   r^   r   r_   rb   
make_inputmodule_inputss           r8   module_inputs_torch_nn_Linearr     s    V5P]^^^J 	mB&:&:"/jj6I6I"J"J"J!n!n	p 	p 	p 	mB&F&F&F"/

70C0C"D"D"!F!F	H 	H 	H 	mAq&9&9"/

1">">'!b!b	d 	d 	dM r:   c                    t          t          |||          }ddt          t          ddd          t           |d           |d                    	          t          t          dddd
          t           |d           |d                    dfd          t          t          ddd          t           |d           |d                    dfd          g}|S )Nr   Tc                 B   t          j        d||d         |          }|r|j        d         dk    r|                    d          |d         z   }nO||d                             dd                              |j        d         |d         j        d                   z   }|S )Nzbn,anm,bm->bar   rT   r   )rl   einsumshaper   r   )r   r   x1x2r   r   s         r8   bilinear_reference_fnz>module_inputs_torch_nn_Bilinear.<locals>.bilinear_reference_fn%  s    or1Q4<< 	Vx{aR1Q4/!A$))Ar"2"2"9"9"(1+qtzRS}"U"UUr:      r   r   )r   r   )r   r   r   Fr   r   c                 $     | |||d          S )NFr   r3   r   r   r   r   r   s       r8   r   z1module_inputs_torch_nn_Bilinear.<locals>.<lambda>5  s!    6K6KAqRTVX_d6e6e6e r:   r   r   c           	      p     | ||                     dd          |                     dd                    S )NrT   r   )r   r   s       r8   r   z1module_inputs_torch_nn_Bilinear.<locals>.<lambda>9  s?    6K6KAqRTRYRYZ[]_R`R`bdbibijkmobpbp6q6q r:   )Tr   )	rW   r   r^   r   r_   rb   r   r   r   s	           @r8   module_inputs_torch_nn_Bilinearr   "  s.   V5P]^^^J    	mAq!&<&<"/

60B0BJJvDVDV"W"W!6	8 	8 	8 	mAq!%&H&H&H"/

60B0BJJvDVDV"W"W"!e!e!e!e	g 	g 	g 	mAq!&<&<"/

1zz!}}"M"M'!q!q!q!q	s 	s 	sM r:   c           
         t          t          |||          }di fdddifdddifddd	ifd
d
difg}g }|D ]@\  }	}
|
fd} |d                                          }|                    d
d          r |d          n |d                                          }|                    t          t          di |
t          ||          |	|                      |d                                          }|                    d
d          r |d          n |d                                          }|                    t          t          di |
t          ||          d|	z   |                     B|S )Nr   r@   reduction_sum	reductionsumreduction_batchmean	batchmeanreduction_nonenone
log_targetTc                     t          ||fi |S rI   )r   r   r   r   r   constructor_kwargss        r8   r   z6module_inputs_torch_nn_KLDivLoss.<locals>.reference_fnL      &q!BB/ABBBr:   r   r   Fr   r3   scalar_)r   r
   loggetrU   r   r   )rW   r   r^   r   r_   rb   r   casesr   r   r   r   r   targetscalar_inputscalar_targets                   r8    module_inputs_torch_nn_KLDivLossr  ?  s   V5P]^^^J 
R	;./	k :;	K01	d+,%E M$) 
 
  8J 	C 	C 	C 	C 
8$$((**)/L%)H)HhH%%%jjYaNbNbNfNfNhNh-*M*M:L*M*M&3E6&B&B!%13 3 3	
 	
 	
 "z"~~))++ %jju==WJJrNNN::b>>CUCUCWCW 	 	-*M*M:L*M*M&3L,&O&O&-%13 3 3	
 	
 	
 	
 r:   c                    |||fd}t          t          ||d          }di fdddifddd	ifd
d
difdd |d                                          ifd |d                                          ddfd |d                                          ddfg}g }	|D ]\  }
}|fd}|	                    t	          t          d i |t           |d          t          j        d|                                          	                    d          
                                                                          |
|                     |fd}|	                    t	          t          d i |t           |d          t          j        ddd|                                          	                    d          
                                                                          d|
 |                     |	                    t	          t          d i |t           |d          t          j        ddddd|                                          	                    d          
                                                                          d|
 |                     |	                    t	          t          d i |t           |d          t          j        dd|                                          	                    d          
                                                                          d|
 |                     |	S )!Nc                 v    t          | ||d                              d                              |          S )NFr   rT   dim)r
   log_softmaxrequires_grad_)r   r   r^   r   s       r8   r   z2module_inputs_torch_nn_NLLLoss.<locals>.make_inputh  s?    5u).0 0 00;0B0B>>R_C`C`	ar:   Fr   r@   r   r   r   r   r   ignore_indexr   weightsweightr   weights_ignore_index)r  r  weights_ignore_index_negr   c                     t          ||fi |S rI   )r"   r   s        r8   r   z4module_inputs_torch_nn_NLLLoss.<locals>.reference_fn~  s    $Q@@-?@@@r:   )   r   r  r   r   c                     t          ||fi |S rI   )r#   r   s        r8   nd_reference_fnz7module_inputs_torch_nn_NLLLoss.<locals>.nd_reference_fn  r   r:   )r   r   r   r   r   nd_)r   r   r   r   r   r   higher_dim_)r   r   r   3d_r3   )r   r
   absrU   r   r   rl   emptyuniform_mulfloorlong)rW   r   r^   r   r_   rb   r   make_weightr  r   r   r   r   r  s                 r8   module_inputs_torch_nn_NLLLossr"  g  s   !'uM a a a a +fEQVWWWK 
R	;./	K01	.!,-	X{{1~~113345	KKNN,>,>,@,@RS!T!TU	#A0B0B0D0DVX%Y%YZ%E M$) )
 )
  8J 	A 	A 	A 	A 	-*M*M:L*M*M&3JJw4G4G49K64R4R4R4[4[4]4]4a4abc4d4d4j4j4l4l4q4q4s4s'u 'u!%1	3 3 3	
 	
 	
 <N 	C 	C 	C 	C 	-*M*M:L*M*M&3&J|44!K1a???HHJJNNqQQWWYY^^``'b 'b *4\\%46 6 6	
 	
 	
 	-*M*M:L*M*M&3&J'9::!K1aAfEEENNPPTTUVWW]]__ddff'h 'h 2411%46 6 6	
 	
 	
 	-*M*M:L*M*M&3&Jy11!K1V<<<EEGGKKANNTTVV[[]]'_ '_ *4\\%46 6 6	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          ||d          }di fdddifdddifd	dd
ifg}g }	|D ]v\  }
}|	                    t          t	          di |t	           |d           |d           |d                                                    |
t                               w|	S )Nr   Fr@   r   r   r   reduction_meanmeanr   r   r   rT   r   r3   )r   r
   rU   r   r   r  no_batch_dim_reference_fn)rW   r   r^   r   r_   rb   r   make_targetr  r   r   r   s               r8   &module_inputs_torch_nn_GaussianNLLLossr(    s   V5P]^^^J+fEQVWWWK 
R	;./	K01	K01	%E M$) 
 
  -*M*M:L*M*M&3JJqMM4?KNN4>JqMM4E4E4G4G'I 'I "%>@ @ @	
 	
 	
 	
 r:   c                 V   t          t          |||          }t          t          ||d          }di fdddifdddifd	dd
ifdddifdddifddddfg}ddg }	|D ]\  }
}|ffd	}|                    dd          }|r |d          n/ |d                                                              d          }|	                    t          t          di |t          | |d                                          	                                          |
|                     |	S )Nr   Fr@   r   r   r   r$  r%  r   r   fullTno_log_input	log_inputfull_no_log_input)r*  r,  :0yE>c                 *   |r+|                                  |                    |           z
  }n-| |                    | |z                                             z
  }|rm||                    |                                          |z
  ddt          j        z  |z                                  z  z                       |dk    d          z  }|dk    r|S |dk    r)|                                |                                 z  S |                                S )N      ?       @rT   r   r   r%  )expr  r  mathpimasked_fillr   numel)r   r   r,  r*  r   epsr   s          r8   poissonnllloss_reference_fnzJmodule_inputs_torch_nn_PoissonNLLLoss.<locals>.poissonnllloss_reference_fn  s     	0UUWWquuQxx'FFC}}///F 	cquuQUUWW~~)C2<!3C2H2H2J2J,JJWWXY]^X^`abbbFM&  ::<<!''))++::<<r:   c                      ||fi |S rI   r3   )r   r   r   r   r   r8  s        r8   r   z;module_inputs_torch_nn_PoissonNLLLoss.<locals>.reference_fn  s    ..q!JJ7IJJJr:   r   r   r   r   MbP?r   )TFr%  r.  r3   )
r   r
   r  r  addrU   r   r   floor_abs_)rW   r   r^   r   r_   rb   r   r'  r  r   r   r   r   r,  r   r8  s                  @r8   %module_inputs_torch_nn_PoissonNLLLossr?    s   V5P]^^^J+fEQVWWWK 
R	;./	K01	K01	&$ 	+u-.	t%@@A%E         M$) 
 
  8J 	K 	K 	K 	K 	K 	K '**;==	,5d

<(((::l;S;S;W;W;Y;Y;];]^c;d;d-*M*M:L*M*M&3E4?K4M4M4T4T4V4V4[4[4]4]'_ '_!%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          ||d          }di fdddifdddifd	dd
ifg}dd}	g }
|D ]\  }}|
                    t          t	          di |t	           |d           |d                    |t          |	fi |                     |
                    t          t	          di |t	           |d           |d                    | dt          |	fi |                     |
S )Nr   Fr@   r   r   r   r$  r%  r   r   c                    |dk    r||z
                       d          S |dk    r?||z
                       d                                          |                                z  S ||z
                       d                                          S )Nr   r   r%  )powr   r6  )r   r   r   r   r   s        r8   mse_loss_reference_fnz=module_inputs_torch_nn_MSELoss.<locals>.mse_loss_reference_fn  sy    E;;q>>!&  E;;q>>%%''!''))33E;;q>>%%'''r:   r:  r   r3   _scalar)r%  r   r
   rU   r   r   )rW   r   r^   r   r_   rb   r   r'  r  rC  r   r   r   s                r8   module_inputs_torch_nn_MSELossrF    s   V5P]^^^J+fEQVWWWK 
R	;./	K01	K01	%E( ( ( ( M$) 
 
  -*M*M:L*M*M&3JJ|4L4L4?K4M4M'O 'O!%,-B%Y%YFX%Y%Y	[ [ [	
 	
 	
 	-*M*M:L*M*M&3JJrNN4?KOO'E 'E $---%,-B%Y%YFX%Y%Y	[ [ [	
 	
 	
 	
 r:   c                    fd} |dd          rdnd |dd          } |dd	          }|Wt          |t                    sJ                                 D ]+\  }}||v r"| ||         }	|                    |	          |<   ,fd
|D             }
t	                      5   | |
i                               }ddd           n# 1 swxY w Y   |r*t          |           }|dk    r|                    d          S |S )a  Reference function for modules supporting no batch dimensions.

    Unbatched inputs are unsqueezed to form a
    single batch input before passing them to the module.
    The output is squeezed to compare with the
    output of unbatched input to the module.

    Currently it only supports modules which return a single Tensor as output.
    You can bind the following kwargs.
    Kwargs:
        batch_first[bool] : If True, all the Tensors in `args` while be unsqueezed at dim `0` .
                        and output will be squeezed at dim `0` else dim `1` for both.
        kwargs_to_batchify[dict] : Dictionary specifying the name of the argument and dimension to unsqueeze.
                               Useful if there are few arguments whose batch dimension are different
                               from the ones selected by `batch_first`.
        is_criterion[bool] : Specify if the module is a criterion and handle the reduction for output accordingly.
    c                 f                         | |          }| v r                    |            |S rI   )r  pop)keydefaultvrb   s      r8   get_and_popz.no_batch_dim_reference_fn.<locals>.get_and_pop,  s3    JJsG$$&==JJsOOOr:   batch_firstTr   rT   kwargs_to_batchifyNis_criterionFc                 :    g | ]}|                               S r3   	unsqueezer5   r   	batch_dims     r8   r9   z-no_batch_dim_reference_fn.<locals>.<listcomp>=  %    LLLeuy99LLLr:   r   )r   dictitemsrS  r'   squeezer&   )r   r   ra   rb   rM  rO  rP  krL  bdimsingle_batch_input_argsoutputr   rU  s      `         @r8   r&  r&    s   $     ![55<1I$%94@@;~u55L%,d33333LLNN 	. 	.DAq&&&1=)!,KK--q	LLLLtLLL			 J J+6v66>>yIIJ J J J J J J J J J J J J J J  %!!$$	>>!$$$Ms   %CCCc                    |                     dd          rdndd|v r|                    d           d|v r&|d         |d                             d          |d<   fd|D             }t                      5   | |i |}|d                                       |d                             d          fcddd           S # 1 swxY w Y   dS )a  Reference function for MultiheadAttention supporting no batch dimensions.

    Unbatched inputs are unsqueezed to form a
    single batch input before passing them to the module.
    The output is squeezed to compare with the
    output of unbatched input to the module.
    rN  Tr   rT   key_padding_maskNc                 :    g | ]}|                               S r3   rR  rT  s     r8   r9   z.no_batch_dim_reference_mha.<locals>.<listcomp>U  rV  r:   )r  rI  rS  r'   rY  )r   r   ra   rb   r\  r]  rU  s         @r8   no_batch_dim_reference_mhara  H  sR    ZZt44;!I

=!!!V##/A(B(N%+,>%?%I%I!%L%L!"LLLLtLLL			 D D+6v66q	!!),,fQi.?.?.B.BCD D D D D D D D D D D D D D D D D Ds   ;>CC
C
c                    t          |          dk    r|\  }d}n-t          |          dk    r|\  }}|                    d          }|d         rdnd}|                    d           |                    |          }||f}t                      5   | |i |}|d                             |          |d                             d          fcddd           S # 1 swxY w Y   dS )a  Reference function for RNN and GRU supporting no batch dimensions.

    Unbatched inputs are unsqueezed to form a
    single batch input before passing them to the module.
    The output is squeezed to compare with the
    output of unbatched input to the module.
    rT   Nr   rN  r   rk   rS  rI  r'   rY  	r   r   ra   rb   inphrU  r\  r]  s	            r8   no_batch_dim_reference_rnn_grurg  [  sM    4yyA~~	TaQKKNNM*1I
JJ}
--	
"
"C"Ah			 D D+6v66q	!!),,fQi.?.?.B.BCD D D D D D D D D D D D D D D D D Ds   >CC"Cc                 `   t          |          dk    r|\  }d}nNt          |          dk    r;|\  }}|d                             d          |d                             d          f}|d         rdnd}|                    d           |                    |          }||f}t                      5   | |i |}|d                             |          |d         d                             d          |d         d                             d          ffcddd           S # 1 swxY w Y   dS )a  Reference function for LSTM supporting no batch dimensions.

    Unbatched inputs are unsqueezed to form a
    single batch input before passing them to the module.
    The output is squeezed to compare with the
    output of unbatched input to the module.
    rT   Nr   r   rN  rc  rd  s	            r8   no_batch_dim_reference_lstmri  s  s    4yyA~~	TaQqT^^A!q 1 12M*1I
JJ}
--	
"
"C"Ah			 b b+6v66q	!!),,vay|/C/CA/F/Fq	RSH\H\]^H_H_.`ab b b b b b b b b b b b b b b b b bs   1A%D##D'*D'c                 \   |\  }\  }}|                     d          |                     d          |                     d          ff}t                      5   | |i |}|d                             d          |d                             d          fcddd           S # 1 swxY w Y   dS )zReference function for LSTMCell supporting no batch dimensions.

    The module is passed the input and target in batched form with a single item.
    The output is squeezed to compare with the no-batch input.
    r   rT   N)rS  r'   rY  )	r   r   ra   rb   re  rf  cr\  r]  s	            r8   no_batch_dim_reference_lstmcellrl    s     KC!Q"}}Q//!++a..!++a..1QR			 < <+6v66q	!!!$$fQi&7&7&:&:;< < < < < < < < < < < < < < < < < <s   >B!!B%(B%c                        fddD             S )Nc                     g | ]Z}t          t          |           t           d           d                    t          t          d          d|           [S ))r   r   r   TrP  no_batch_dim_r   r   r   r   )r   r   r   r&  )r5   r   r   s     r8   r9   z8generate_regression_criterion_inputs.<locals>.<listcomp>  s     4 4 4  	+i@@@'

5(9(9::a>>JJ !:NNN,,,		
 	
 	
4 4 4r:   )r   r%  r   r3   )r   s   `r8   $generate_regression_criterion_inputsrs    s0    4 4 4 4 34 4 4 4r:   c                    t          t          |||          }t          t          d          t           |d                    dt                    t          t          d          t           |d                              t          t          d	d	          t           |d                    d
          t          t          ddd          t           |d                    d          gS )Nr   r   )kernel_size)r      r   r   )r   r   rv  r   r   r   strider   r   r   rT   
stride_padr   r
   r   r   r&  rW   r   r^   r   r_   rb   r   s          r8    module_inputs_torch_nn_AvgPool1dr~    s   V5P]^^^J 	m&B&B&B"/

60B0B"C"C'!:	< 	< 	< 	mA&6&6"/

90E0E"F"F	H 	H 	HmD$&?&?"/

90E0E"F"F!	# 	# 	# 	mAq!&<&<"/

90E0E"F"F%	' 	' 	'( (r:   c                 0   t          t          |||          }t          t          d          t           |d                    dt                    t          t          d          t           |d                              t          t          dd          t           |d                    d	          t          t          ddd
          t           |d                    d	          t          t          dd          t           |d                    d	          t          t          ddd          t           |d                    d	          t          t          ddd
d          t           |d                    d	          gS )Nr   r   r   r   rv  rv  r   r   r   r   rv  rv  rw  ry  rz  rT   rT   r{  rT   divisor_overridedivisordivisor_stridedivisor_stride_padr|  r}  s          r8    module_inputs_torch_nn_AvgPool2dr    s   V5P]^^^J 	mF&;&;"/

90E0E"F"F'!:	< 	< 	< 	mF&;&;"/

<0H0H"I"I	K 	K 	KmFF&C&C"/

<0H0H"I"I!	# 	# 	# 	mFFF&K&K"/

<0H0H"I"I%	' 	' 	' 	mFQ&O&O&O"/

<0H0H"I"I"	$ 	$ 	$ 	mFFUV&W&W&W"/

<0H0H"I"I)	+ 	+ 	+ 	mFFF]^&_&_&_"/

<0H0H"I"I-	/ 	/ 	/'0 0r:   c                    t          t          |||          }t          t          d          t           |d                    dt                    t          t          d          t           |d                              t          t          dd          t           |d	                    d
          t          t          ddd          t           |d	                    d          t          t          ddd          t           |d	                    d          t          t          ddd          t           |d                    d          t          t          ddd          t           |d                    d          t          t          ddd          t           |d                    d          t          t          dd          t           |d                    d          t          t          ddd          t           |d	                    d          t          t          dddd          t           |d	                    d          t          t          dddd          t           |d	                    d          t          t          dddd          t           |d                    d          t          t          dddd          t           |d                    d           t          t          dddd          t           |d                    d!          gS )"Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rw  r   r   r   r   r   r   ry  rz  rT   rT   rT   r{  r   )rT   r   rT   stride_pad_gpu_fixedkw_output)r   r   r   rT   )rT   rT   r   )r   r   r   r   r   stride_pad_gpu_general_outputr   r   stride1_pad0_gpu_inputstride_pad_gpu_input_nooverlapr  r  r  r  %divisor_stride_pad_gpu_fixedkw_output%divisor_stride_pad_gpu_general_outputdivisor_stride1_pad0_gpu_input&divisor_stride_pad_gpu_input_nooverlapr|  r}  s          r8    module_inputs_torch_nn_AvgPool3dr    s   V5P]^^^J 	mI&>&>"/

<0H0H"I"I'!:	< 	< 	< 	mI&>&>"/

?0K0K"L"L	N 	N 	NmAy&A&A"/

?0K0K"L"L!	# 	# 	# 	mAq)&D&D"/

?0K0K"L"L%	' 	' 	' 	mAq)&D&D"/

?0K0K"L"L8	: 	: 	: 	mIq)&L&L"/

?0K0K"L"L8	: 	: 	: 	mAq!&<&<"/

?0K0K"L"L1	3 	3 	3 	mAq)&D&D"/

?0K0K"L"L9	; 	; 	; 	mIPQ&R&R&R"/

?0K0K"L"L"	$ 	$ 	$ 	mAyST&U&U&U"/

?0K0K"L"L)	+ 	+ 	+ 	mAq)VW&X&X&X"/

?0K0K"L"L-	/ 	/ 	/ 	mAq)VW&X&X&X"/

?0K0K"L"L@	B 	B 	B 	mIq)^_&`&`&`"/

?0K0K"L"L@	B 	B 	B 	mAq!a&P&P&P"/

?0K0K"L"L9	; 	; 	; 	mAq)VW&X&X&X"/

?0K0K"L"LA	C 	C 	CW-D -Dr:   c           
      z   t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    t          d          t          t          d	          t           |d                    d
          gS )Nr   r   rT   r   r   singlerz  r   r   r   rr  rT   
one_outputr|  r}  s          r8   (module_inputs_torch_nn_AdaptiveAvgPool1dr    s    V5P]^^^J 	mA&7&7"/

90E0E"F"F!	# 	# 	# 	mA&7&7"/

60B0B"C"C!:'	) 	) 	) 	mA&7&7"/

90E0E"F"F%	' 	' 	'
( 
(r:   c                 J   t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    t          d          t          t          d	          t           |d                    d
          t          t          d          t           |d                    d          t          t          d          t           |d                    d          gS )Nr   r   rT   r   r   rv  r  rz  r   r   rv  r   rr  rT   single_1x1outputr   r   tupler   N
tuple_noner|  r}  s          r8   (module_inputs_torch_nn_AdaptiveAvgPool2dr    s4   V5P]^^^J 	mA&7&7"/

<0H0H"I"I!	# 	# 	# 	mA&7&7"/

90E0E"F"F!:'	) 	) 	) 	mA&7&7"/

<0H0H"I"I+	- 	- 	- 	mF&;&;"/

<0H0H"I"I 	" 	" 	" 	mI&>&>"/

<0H0H"I"I%	' 	' 	'( (r:   c                 J   t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    t          d          t          t          d	          t           |d
                    d          t          t          d          t           |d
                    d          t          t          d          t           |d                    d          gS )Nr   r   )r   r   r   r      r  rz  )r   r   r   r  r   rr  r   r   r   )r   r   r   r   r  r  )Nr   r   r  )r   r   r   )rT   rT   r   r   rv  last_dimr|  r}  s          r8   (module_inputs_torch_nn_AdaptiveAvgPool3dr  )  s4   V5P]^^^J 	mA&7&7"/

?0K0K"L"L!	# 	# 	# 	mA&7&7"/

<0H0H"I"I!:'	) 	) 	) 	mI&>&>"/

?0K0K"L"L 	" 	" 	" 	mL&A&A"/

?0K0K"L"L%	' 	' 	' 	mI&>&>"/

?0K0K"L"L#	% 	% 	%& &r:   c           	         t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    t          d          gS )	Nr   r   r  r  rz  r  r   rr  r|  r}  s          r8   (module_inputs_torch_nn_AdaptiveMaxPool1dr  ?  s    V5P]^^^J 	mA&7&7"/

90E0E"F"F!	# 	# 	# 	mA&7&7"/

60B0B"C"C!:'	) 	) 	)	* *r:   c                    t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    t          d          t          t          d	          t           |d                    d
          t          t          d          t           |d                    d          gS )Nr   r   r  r  rz  r  r   rr  r  r  r  r  r|  r}  s          r8   (module_inputs_torch_nn_AdaptiveMaxPool2dr  L  s    V5P]^^^J 	mA&7&7"/

<0H0H"I"I!	# 	# 	# 	mA&7&7"/

90E0E"F"F!:'	) 	) 	) 	mF&;&;"/

<0H0H"I"I 	" 	" 	" 	mI&>&>"/

<0H0H"I"I%	' 	' 	'( (r:   c                    t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    t          d          t          t          d	          t           |d                    d
          t          t          d          t           |d                    d          t          t          d          t           |d                    d          t          t          d	          t           |d                    d          gS )Nr   r   )r   r   r   rv  r  r  rz  )r   r   rv  r  r   rr  r  r  )r   Nr   r  )r   r      	   r   single_nonatomic)r   r   rv  r   r   tuple_nonatomicr|  r}  s          r8   (module_inputs_torch_nn_AdaptiveMaxPool3dr  _  sl   V5P]^^^J 	mA&7&7"/

?0K0K"L"L!	# 	# 	# 	mA&7&7"/

<0H0H"I"I!:'	) 	) 	) 	mI&>&>"/

?0K0K"L"L 	" 	" 	" 	mL&A&A"/

?0K0K"L"L%	' 	' 	' 	mA&6&6"/

;K0L0L"M"M+	- 	- 	- 	mI&>&>"/

;K0L0L"M"M*	, 	, 	,#- -r:   c                 ,   t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    d          t          t          dd	d           t           |d                    d
          t          t          dd	dd          t           |d                    d          t          t          dd	ddd          t           |d                    d          t          t          dd	dd          t           |d                    d          t          t          dd	dd          t           |d                    d          gS )Nr   r   r   affinerz  r   )r   r   r   3d_inputr;  affine_simple_average333333?F
not_affineTnot_tracking_stats3d_input_not_affine)r   r   r  
zero_batchr   r}  s          r8   "module_inputs_torch_nn_BatchNorm1dr  x  s   V5P]^^^J 	mB&8&8"/

70C0C"D"D!	# 	# 	# 	mA&7&7"/

90E0E"F"F#	% 	% 	% 	mBd&C&C"/

70C0C"D"D0	2 	2 	2 	mBc5&I&I"/

70C0C"D"D%	' 	' 	' 	mBc4&O&O"/

70C0C"D"D-	/ 	/ 	/ 	mAtS%&H&H"/

90E0E"F"F.	0 	0 	0 	mAtS%&H&H"/

90E0E"F"F%	' 	' 	''( (r:   c                    t          t          |||          }t          t          d          t           |d                              t          t          ddd           t           |d                    d          t          t          ddd          t           |d                    d	          t          t          dddd
          t           |d                    d          t          t          ddddd
          t           |d                    d          t          t          dddd
          t           |d                    d          gS )Nr   r   r  rw  r;  2d_simple_averagerz  g?momentumFr  Tr  r   r  )r   r   r   r   r  r   r}  s          r8   "module_inputs_torch_nn_BatchNorm2dr    s   V5P]^^^J 	mA&7&7"/

<0H0H"I"I	K 	K 	KmAtT&B&B"/

<0H0H"I"I,	. 	. 	. 	mAtS&A&A"/

<0H0H"I"I#	% 	% 	% 	mAtS%&H&H"/

<0H0H"I"I%	' 	' 	' 	mAtS$&N&N"/

<0H0H"I"I-	/ 	/ 	/ 	mAtS%&H&H"/

<0H0H"I"I%	' 	' 	'( (r:   c                    t          t          |||          }t          t          d          t           |d                              t          t          ddd           t           |d                    d          t          t          ddd          t           |d                    d	          t          t          dddd
          t           |d                    d          t          t          ddddd
          t           |d                    d          t          t          dddd
          t           |d                    d          gS )Nr   r   r  rw  r;  3d_simple_averagerz  ffffff?r  Fr  Tr  r   r  )r   r   r   r   r   r  r   r}  s          r8   "module_inputs_torch_nn_BatchNorm3dr    s   V5P]^^^J 	mA&7&7"/

?0K0K"L"L	N 	N 	NmAtT&B&B"/

?0K0K"L"L,	. 	. 	. 	mAtS&A&A"/

?0K0K"L"L#	% 	% 	% 	mAtS%&H&H"/

?0K0K"L"L%	' 	' 	' 	mAtS$&N&N"/

?0K0K"L"L-	/ 	/ 	/ 	mAtS%&H&H"/

?0K0K"L"L%	' 	' 	'( (r:   c                 z  	
 |d         }|                     dd          |                     dd          }t          t          |||          |ri gni ddig}d\  	
	ft          d	 t	          |          D                       z   d
z   	
fdt          j        ddg|          D             S )NNr   F
transposedr   paddingsamer  c              3       K   | ]	}|d z   V  
dS r  r3   )r5   r   s     r8   	<genexpr>z0module_inputs_torch_nn_ConvNd.<locals>.<genexpr>  s&      *C*CQ1q5*C*C*C*C*C*Cr:   rx  c           
          g | ]\\  }}t          rt          fi |nt          fi |t           	|rn                    |rd nd|rdnt                    ]S )r@   r   Nr   )r   r   r&  )
r5   
with_batchconv_kwargsC_inC_outinput_batch_shapeinput_no_batch_shaperu  r   r   s
      r8   r9   z1module_inputs_torch_nn_ConvNd.<locals>.<listcomp>  s        $J 	[_ (^}UK'W'W;'W'W'W'4T5+']']Q\']']"/

-7Q))=Q1S 1S #T #T *>""*4"S$$:S	V 	V 	V  r:   T)r  r   r
   r  range	itertoolsr   )rW   r   r^   r   r_   rb   r  r  conv_kwargs_listr  r  r  r  ru  r   r   s            @@@@@@@r8   module_inputs_torch_nn_ConvNdr    s	   sA::fe$$DL%00JV5P]^^^J)HttY4G/H&Ku 7U*C*C%((*C*C*C%C%CC33          (1'8$HX'Y'Y   r:   c                    t          t          |||          }t          t          ||d          }di fdddifdddifd	dd
ifdddifg}g }	|D ]v\  }
}|fd}|	                    t          t	          di |t	           |d           |d           |d                                                    |
|                     w|	S )Nr   Fr@   r   r   r   r$  r%  r   r   marginr  c                      t          |||fi |S rI   )r   r   r   i1i2r   r   s         r8   r   z@module_inputs_torch_nn_CosineEmbeddingLoss.<locals>.reference_fn  s    0RQQ>PQQQr:   r  r   )r  r   r3   r   r
   rU   r   r   signrW   r   r^   r   r_   rb   r   r'  r  r   r   r   r   s                r8   *module_inputs_torch_nn_CosineEmbeddingLossr    s;   V5P]^^^J+fEQVWWWK 
R	;./	K01	K01	Hc?#%E M$) 

 

  =O 	R 	R 	R 	R 	-*M*M:L*M*M&3JJx4H4H**U]J^J^4?K4F4F4K4K4M4M'O 'O!%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          d          t           |d                    d           t          t          d          t           |d                    d	          t          t                      t           |d
                    dt                    t          t          d          t           |d                    d	          gS )Nr   r1  alphar   r   r   c                 f    t          j        |dk    |d|                                dz
  z            S )Nr   r   rT   rl   wherer2  r   s      r8   r   z,module_inputs_torch_nn_ELU.<locals>.<lambda>  s*    Q!VQQUUWWWX[HY1Z1Z r:   r   r3   scalarrz  r   r   r   r   r   r   r   4d_inputr|  r}  s          r8   module_inputs_torch_nn_ELUr    s   V5P]^^^J 	m"&=&=&="/

90E0E"F"F!Z!Z	\ 	\ 	\ 	m"&=&=&="/

2"?"?!	# 	# 	# 	moo"/

40@0@"A"A'!:	< 	< 	< 	m"&=&=&="/

<0H0H"I"I#	% 	% 	%& &r:   c           
         t          t          |||          }t          t          d          t           |d                    d           t          t          d          t           |d                    d d	
          t          t          d          t           |d                    dt                    gS )Nr   r1  r  r  c                 l    t          j        |dk    |dd|z                                  dz
  z            S Nr   r1  r0  rT   r  r   s      r8   r   z-module_inputs_torch_nn_CELU.<locals>.<lambda>
  0    Q!VQrTUvllnn_`N`Ha1b1b r:   r   r3   c                 l    t          j        |dk    |dd|z                                  dz
  z            S r  r  r   s      r8   r   z-module_inputs_torch_nn_CELU.<locals>.<lambda>  r  r:   r  rr  r  r   r   r|  r}  s          r8   module_inputs_torch_nn_CELUr    s    V5P]^^^J 	m"&=&=&="/

90E0E"F"F!b!b	d 	d 	d 	m"&=&=&="/

2"?"?!b!b!	# 	# 	# 	m"&=&=&="/

40@0@"A"A'!:	< 	< 	<= =r:   c           
      t   t          t          |||          }t          t                      t           |d                              t          t          d          t           |d                    d          t          t                      t           |d                    d	t          
          gS )Nr   )r   rv  rw  rT   r   rv  r  r  rz  ro  r   r   r|  r}  s          r8   module_inputs_torch_nn_GLUr    s    V5P]^^^J 	moo"/

60B0B"C"C	E 	E 	EmA&6&6"/

90E0E"F"F	  	  	  	moo"/

40@0@"A"A'!:	< 	< 	<	= 	=r:   c           
      ~   t          t          |||          }t          t          d          t           |d                    d d          t          t          d          t           |d                    d 	          t          t                      t           |d
                    dt                    gS )Nr   r   r3   c                 f    |dz  dt          j        |t          j        d          z            z   z  S Nr0        ?r1  rl   erfr3  sqrtr   r   xr[   s       r8   r   z-module_inputs_torch_nn_GELU.<locals>.<lambda>*  1    QWeiPQTXT]^aTbTbPbFcFc@c5d r:   r  rr  r  c                 f    |dz  dt          j        |t          j        d          z            z   z  S r  r  r  s       r8   r   z-module_inputs_torch_nn_GELU.<locals>.<lambda>.  r  r:   r   r  r   r   r|  r}  s          r8   module_inputs_torch_nn_GELUr  $  s    V5P]^^^J 	mF&;&;"/

2"?"?!d!d!	# 	# 	# 	mF&;&;"/

90E0E"F"F!d!d	f 	f 	f 	moo"/

40@0@"A"A'!:	< 	< 	<= =r:   c                    t          t          |||          }t          t                      t           |d                    d          t          t                      t           |d                    t          d          t          t                      t           |d                    d	          t          t                      t           |d
                    d          gS Nr   r3   r  rz  r   r   rr  r:  channels_last_mem_format)r   r   r   r   r   channels_last_3d_mem_formatr|  r}  s          r8   module_inputs_torch_nn_ReLUr  5      V5P]^^^J 	moo"/

2"?"?!	# 	# 	# 	moo"/

1">">!:'	) 	) 	) 	moo"/

<0H0H"I"I3	5 	5 	5 	moo"/

?0K0K"L"L6	8 	8 	89 9r:   c                    t          t          |||          }t          t                      t           |d                    d          t          t                      t           |d                    t          d          t          t                      t           |d                    d	          t          t                      t           |d
                    d          gS r  r|  r}  s          r8   module_inputs_torch_nn_ReLU6r  H  r  r:   c                 D   t          t          |||          }t          t                      t           |d                              t          t                      t           |d                    t          d          t          t          d          t           |d                    d	          t          t          d
          t           |d                    d	          t          t          d          t           |d                    d	          gS )Nr   r  rw  r   r   rr  r0  with_negvalrz  r   r   with_zero_negvalr3   with_negval_scalarr|  r}  s          r8    module_inputs_torch_nn_LeakyReLUr  [  s&   V5P]^^^J 	moo"/

90E0E"F"F	H 	H 	Hmoo"/

1">">!:'	) 	) 	) 	mC&8&8"/

90E0E"F"F&	( 	( 	( 	mC&8&8"/

80D0D"E"E+	- 	- 	- 	mC&8&8"/

2"?"?-	/ 	/ 	/0 0r:   c                    t          t          |||          }t          t                      t           |d                    d          t          t                      t           |d                    t          d          t          t                      t           |d                    d	 d
          t          t          d          t           |d                    d d          t          t                      t           |d                    d d          t          t          d          t           |d                    d d          t          t                      t           |d                    d d          t          t          d          t           |d                    d d          gS )Nr   r3   r  rz  r   r   rr  r   r   r   c                 z    t          j        |d          t          j        |d          |d         d         z  z   S Nr   min)maxrl   clampr   s      r8   r   z.module_inputs_torch_nn_PReLU.<locals>.<lambda>}  =    QA1F1F1FUV\]I^I^I^abcdaefgahIh1h r:   1dr   c                 z    t          j        |d          t          j        |d          |d         d         z  z   S r  r  r   s      r8   r   z.module_inputs_torch_nn_PReLU.<locals>.<lambda>  r  r:   1d_multiparamr:  c                 z    t          j        |d          t          j        |d          |d         d         z  z   S r  r  r   s      r8   r   z.module_inputs_torch_nn_PReLU.<locals>.<lambda>  r  r:   2dc                 z    t          j        |d          t          j        |d          |d         d         z  z   S r  r  r   s      r8   r   z.module_inputs_torch_nn_PReLU.<locals>.<lambda>  r  r:   2d_multiparam)r   r   r   r   rv  c                 z    t          j        |d          t          j        |d          |d         d         z  z   S r  r  r   s      r8   r   z.module_inputs_torch_nn_PReLU.<locals>.<lambda>  r  r:   3dc                 z    t          j        |d          t          j        |d          |d         d         z  z   S r  r  r   s      r8   r   z.module_inputs_torch_nn_PReLU.<locals>.<lambda>  r  r:   3d_multiparamr|  r}  s          r8   module_inputs_torch_nn_PReLUr)  p  s   V5P]^^^J 	moo"/

2"?"?!	# 	# 	# 	moo"/

1">">!:'	) 	) 	) 	moo"/

90E0E"F"F!h!h	 	 	 	mA&6&6"/

90E0E"F"F!h!h(	* 	* 	* 	moo"/

<0H0H"I"I!h!h	 	 	 	mA&6&6"/

<0H0H"I"I!h!h(	* 	* 	* 	moo"/

?0K0K"L"L!h!h	 	 	 	mA&6&6"/

?0K0K"L"L!h!h(	* 	* 	*9+ +r:   c           
      r   t          t          |||          }t          t                      t           |d                              t          t                      t           |d                    t          d          t          t                      t           |d                    d	          gS )
Nr   r  rw  r   r   rr  r3   r  rz  r|  r}  s          r8   module_inputs_torch_nn_SELUr+    s    V5P]^^^J 	moo"/

90E0E"F"F	H 	H 	Hmoo"/

1">">!:'	) 	) 	) 	moo"/

2"?"?!	# 	# 	#	$ 	$r:   c           
      z   t          t          |||          }t          t                      t           |d                    d d          t          t                      t           |d                    t          d          t          t                      t           |d                    d	 
          gS )Nr   r3   c                 0    |t          j        |          z  S rI   rl   sigmoidr  s       r8   r   z-module_inputs_torch_nn_SiLU.<locals>.<lambda>      Qq9I9I5I r:   r  rr  r   r   r  c                 0    |t          j        |          z  S rI   r.  r  s       r8   r   z-module_inputs_torch_nn_SiLU.<locals>.<lambda>  r0  r:   r   r|  r}  s          r8   module_inputs_torch_nn_SiLUr2    s    V5P]^^^J 	moo"/

2"?"?!I!I!	# 	# 	# 	moo"/

1">">!:'	) 	) 	) 	moo"/

90E0E"F"F!I!I	K 	K 	KL Lr:   c           
         t          t          |||          }t          t          d          t           |d                    d           t          t          d          t           |d                    d d	
          t          t          d          t           |d                    t          d
          gS )Nr   rT   r      c                     t          j        |                              t          j        |                              dd                              dd                    S NrT   Tr   r5  )rl   r2  divr   r   r   s      r8   r   z0module_inputs_torch_nn_Softmax.<locals>.<lambda>  sH    11A1A%)A,,BRBRSTVZB[B[BbBbcegiBjBj1k1k r:   r   r   r3   c                     t          j        |                              t          j        |                              dd                    S )Nr   Trl   r2  r8  r   r   s      r8   r   z0module_inputs_torch_nn_Softmax.<locals>.<lambda>  s6    11A1A%)A,,BRBRSTVZB[B[1\1\ r:   r  rr  r   r   r   r   r|  r}  s          r8   module_inputs_torch_nn_Softmaxr<    s    V5P]^^^J 	mA&6&6"/

80D0D"E"E!k!k	m 	m 	m 	mA&6&6"/

2"?"?!\!\!	# 	# 	# 	mB&7&7"/

60B0B"C"C!:'	) 	) 	)* *r:   c           	         t          t          |||          }t          t                      t           |d                    d           t          t                      t           |d                    t          d          gS )Nr   rT   r   r   r5  c                     t          j        |                              t          j        |                              dd                    S NrT   Fr:  r   s      r8   r   z2module_inputs_torch_nn_Softmax2d.<locals>.<lambda>  s6    11A1A%)A,,BRBRSTV[B\B\1]1] r:   r   r  r   rr  r|  r}  s          r8    module_inputs_torch_nn_Softmax2drA    s    V5P]^^^J 	moo"/

>0J0J"K"K!]!]	_ 	_ 	_ 	moo"/

90E0E"F"F!:'	) 	) 	)	* *r:   c                    t          t          |||          }t          t          d          t           |d                    d           t          t          d          t           |d                    d d	          t          t          d
          t           |d                    d d	          t          t          d          t           |d                    t          d	          gS )Nr   rT   r4  c                     t          j        |                              t          j        |                              dd                              dd                                                    S r7  )rl   r2  div_r   r   log_r   s      r8   r   z3module_inputs_torch_nn_LogSoftmax.<locals>.<lambda>  sT    11B1B59Q<<CSCSTUW[C\C\CcCcdfhjCkCk1l1l1q1q1s1s r:   r   r>  c                     t          j        |                              t          j        |                              dd                                                    S r@  rl   r2  rD  r   rE  r   s      r8   r   z3module_inputs_torch_nn_LogSoftmax.<locals>.<lambda>  B    11B1B59Q<<CSCSTUW\C]C]1^1^1c1c1e1e r:   
multiparamrr  r   r3   c                     t          j        |                              t          j        |                              dd                                                    S )Nr   FrG  r   s      r8   r   z3module_inputs_torch_nn_LogSoftmax.<locals>.<lambda>  rH  r:   multiparam_scalarr   r;  r   r|  r}  s          r8   !module_inputs_torch_nn_LogSoftmaxrL    s   V5P]^^^J 	mA&6&6"/

80D0D"E"E!s!s	u 	u 	u 	mA&6&6"/

>0J0J"K"K!e!e%	' 	' 	' 	mA&6&6"/

2"?"?!e!e,	. 	. 	. 	mB&7&7"/

60B0B"C"C!:'	) 	) 	)* *r:   c                    t          t          |||          }t          t          d          t           |d                              t          t          d          t           |d                    d          t          t          d          t           |d	                    d
          t          t          d          t           |d                    t          d          gS )Nr   rT   r4  rw  )r   r   r   r   multidimrz  r   r3   r  r   )r   r   r   r   rr  r|  r}  s          r8   module_inputs_torch_nn_SoftminrO    s    V5P]^^^J 	mA&6&6"/

80D0D"E"E	G 	G 	GmA&6&6"/

=0I0I"J"J#	% 	% 	% 	mA&6&6"/

2"?"?!	# 	# 	# 	mB&7&7"/

:0F0F"G"G!:'	) 	) 	)* *r:   c                 X   t          t          |||          }t          t                      t           |d                    d           t          t          d          t           |d                    d d          t          t          dd	          t           |d                    d
 d          t          t          dd	          t           |d                    d d          t          t                      t           |d                    t          d          gS )Nr   r4  c                 N    t          j        t          j        |                    S rI   rl   log1pr2  r   s      r8   r   z1module_inputs_torch_nn_Softplus.<locals>.<lambda>   s    UYq\\1J1J r:   r   r   c                 Z    dt          j        t          j        d|z                      z  S )Nr0  r   rR  r   s      r8   r   z1module_inputs_torch_nn_Softplus.<locals>.<lambda>  s&    5;uyQRUVQVGWGW;X;X1X r:   betarr  c                     |dz  dk                         |          |z  |dz  dk                         |          dz  dz  t          j        t          j        d|z                      z  z   S Nr   rV  r  r1  type_asrl   rS  r2  r   s      r8   r   z1module_inputs_torch_nn_Softplus.<locals>.<lambda>  j    !a%4(@(@(C(Ca(GEd?33A66;b@5;uyYZ]^Y^O_O_C`C``)a r:   beta_thresholdr3   c                     |dz  dk                         |          |z  |dz  dk                         |          dz  dz  t          j        t          j        d|z                      z  z   S rX  rY  r   s      r8   r   z1module_inputs_torch_nn_Softplus.<locals>.<lambda>  r[  r:   beta_threshold_scalarr   r   r|  r}  s          r8   module_inputs_torch_nn_Softplusr_    sP   V5P]^^^J 	moo"/

80D0D"E"E!J!J	L 	L 	L 	mA&6&6"/

80D0D"E"E!X!X	! 	! 	! 	mAt&<&<"/

80D0D"E"Ea a)	+ 	+ 	+ 	mAt&<&<"/

2"?"?a a0	2 	2 	2 	moo"/

1">">!:'	) 	) 	))* *r:   c                    t          t          |||          }t          t                      t           |d                              t          t          d          t           |d                    d          t          t          d          t           |d                    d          t          t                      t           |d	                    t          d
          gS )Nr   r  rw  rT   lambdarz  r3   lambda_scalarr   r   rr  r|  r}  s          r8   !module_inputs_torch_nn_Softshrinkrc    s    V5P]^^^J 	moo"/

90E0E"F"F	H 	H 	HmA&7&7"/

90E0E"F"F!	# 	# 	# 	mA&7&7"/

2"?"?(	* 	* 	* 	moo"/

1">">!:'	) 	) 	)* *r:   c           
      z   t          t          |||          }t          t                      t           |d                    d           t          t                      t           |d                    d d          t          t                      t           |d	                    t          d
          gS )Nr   r  c                 V    |                     dt          j        |          z             S NrT   r8  rl   r  r   s      r8   r   z1module_inputs_torch_nn_Softsign.<locals>.<lambda>/      q59Q<<7G1H1H r:   r   r3   c                 V    |                     dt          j        |          z             S rf  rg  r   s      r8   r   z1module_inputs_torch_nn_Softsign.<locals>.<lambda>2  rh  r:   r  rr  r   r   r|  r}  s          r8   module_inputs_torch_nn_Softsignrj  )  s    V5P]^^^J 	moo"/

90E0E"F"F!H!H	J 	J 	J 	moo"/

2"?"?!H!H!	# 	# 	# 	moo"/

1">">!:'	) 	) 	)* *r:   c           
      r   t          t          |||          }t          t                      t           |d                              t          t                      t           |d                    d          t          t                      t           |d                    t          d	          gS 
Nr   r:  rw  r3   r  rz  r   r   rr  r|  r}  s          r8   module_inputs_torch_nn_Tanhrm  :      V5P]^^^J 	moo"/

<0H0H"I"I	K 	K 	Kmoo"/

2"?"?!	# 	# 	# 	moo"/

1">">!:'	) 	) 	)	* 	*r:   c           
      r   t          t          |||          }t          t                      t           |d                              t          t                      t           |d                    d          t          t                      t           |d                    t          d	          gS rl  r|  r}  s          r8   !module_inputs_torch_nn_Tanhshrinkrp  J  rn  r:   c                    t          t          |||          }t          t          dd          t           |d                    d          t          t          dd          t           |d                    d          t          t          dd          t           |d	                    d
          t          t          dd          t           |d                    t          d          gS )Nr   r1  r  r:  threshold_valuerz  g      $@large_valuer3   threshold_value_scalarr   r   rr  r|  r}  s          r8    module_inputs_torch_nn_Thresholdru  Y  s   V5P]^^^J 	mB&;&;"/

<0H0H"I"I*	, 	, 	, 	mB&<&<"/

<0H0H"I"I&	( 	( 	( 	mB&;&;"/

2"?"?1	3 	3 	3 	mB&;&;"/

1">">!:'	) 	) 	)* *r:   c           
      z   t          t          |||          }t          t                      t           |d                    d           t          t                      t           |d                    d d          t          t                      t           |d	                    t          d
          gS )Nr   r  c                 T    |t          j        t          j        |                    z  S rI   rl   tanhFsoftplusr   s      r8   r   z-module_inputs_torch_nn_Mish.<locals>.<lambda>r      UZ
15N5N1N r:   r   r3   c                 T    |t          j        t          j        |                    z  S rI   rx  r   s      r8   r   z-module_inputs_torch_nn_Mish.<locals>.<lambda>u  r|  r:   r  rr  r   r   r|  r}  s          r8   module_inputs_torch_nn_Mishr~  l  s    V5P]^^^J 	moo"/

90E0E"F"F!N!N	P 	P 	P 	moo"/

2"?"?!N!N!	# 	# 	# 	moo"/

1">">!:'	) 	) 	)* *r:   c           
      P   t          t          |||          }t          t                      t           |d           |d                    d           t          t                      t           |d           |d                    d d          gt	          |          z   S )	Nr   r  c                     d|                                 z  t          d t          ||          D                       z  S )Nr  c              3   n   K   | ]0\  }}||z
                                                                   V  1d S rI   )r  r   )r5   abs      r8   r  zBmodule_inputs_torch_nn_L1Loss.<locals>.<lambda>.<locals>.<genexpr>  se       I` I`MQQPQ KLa%IZIZI\I\ I` I` I` I` I` I`r:   )r6  r   zipr   r   r   r   s       r8   r   z/module_inputs_torch_nn_L1Loss.<locals>.<lambda>  sZ    BNS I` I`UXYZ\]U^U^I` I` I` F` F` 5` r:   r   r3   c                     d|                                 z  ||z
                                                                  z  S )Nr  )r6  r  r   r  s       r8   r   z/module_inputs_torch_nn_L1Loss.<locals>.<lambda>  s/    BNa!e[[]]EVEVEXEX4X r:   r  rr  )r   r
   r   r   rs  r}  s          r8   module_inputs_torch_nn_L1Lossr  }  s    V5P]^^^J 	moo"/

90E0E0:
90E0E#G #G"` "`	a 	a 	a
 	moo"/

2

2"O"O!X!X!	# 	# 	#	$ 'K:&V&V	W 	Wr:   c                    t          t          |||          }di fdddifdddifddd	ifg}g }|D ]\  }	}
|
fd
}|                    t          t	          di |
t	           |d           |d                    |	|                     |                    t          t	          di |
t	           |d           |d                    d|	 |                     |S )Nr   r@   r   r   r   r$  r%  r   r   c                     t          ||fi |S rI   )r$   r   s        r8   r   z9module_inputs_torch_nn_SmoothL1Loss.<locals>.reference_fn  s    )!QEE2DEEEr:   r   r   r   r3   r   rE  rW   r   r^   r   r_   rb   r   r  r   r   r   r   s               r8   #module_inputs_torch_nn_SmoothL1Lossr    sn   V5P]^^^J 
R	;./	K01	K01	%E M$) 
 
  8J 	F 	F 	F 	F 	-*M*M:L*M*M&3JJw4G4G4>Jw4G4G'I 'I!%1	3 3 3	
 	
 	
 	-*M*M:L*M*M&3JJrNN4>JrNN'D 'D-t--%1	3 3 3	
 	
 	
 	
 r:   c                 ,   t          t          |||          }t          t          ||d          }t          t          ||d          }di fdddifdddifd	dd
ifdd |d          ifg}	dd}
g }|	D ]\  }}|                    t          t	          di |t	           |ddd           |d                              d                              |                    |t          |
fi |                      |d          }|                    t          t	          |          t	           |ddd           |d                              d                              |                    dt          |
|                               |S )Nr   Fr@   r   r   r   r$  r%  r   r   r  r  r   c                    ||                                 z  d|z
  d|z
                                   z  z    }|||z  }|dk    r|S |dk    r)|                                |                                z  S |                                S )NrT   r   r%  )r  r   r6  r   r   r   r   r   r  r   s          r8   bce_loss_reference_fnz=module_inputs_torch_nn_BCELoss.<locals>.bce_loss_reference_fn  s    quuww;!a%AE;;==!889f_FM&  ::<<!''))++::<<r:   r  {Gz?Gz?lowhighr   r   r3   )r  scalar_weightr%  Nr   r
   rU   r   r   gtto)rW   r   r^   r   r_   rb   r   r'  r!  r  r  r   r   r   r  s                  r8   module_inputs_torch_nn_BCELossr    s   V5P]^^^J+fEQVWWWK+fEQVWWWK 
R	;./	K01	K01	X{{51123%E        M$) 
 
  -*M*M:L*M*M&3JJxTX`4a4a4a4?K4I4I4L4LQ4O4O4R4RSX4Y4Y'[ '[!%,-B%Y%YFX%Y%Y	[ [ [	
 	
 	
 	
  KOOMm=&I&I&I"/

24h0W0W0W0;B0B0B10E0E0H0H0O0O#Q #Q(!()>}!U!U!U		W 	W 	W   r:   c                    t          t          |||          }t          t          ||d          }t          t          ||d          }di fdddifdddifd	dd
ifdd |d          ifdd |d          ifg}	dd}
g }|	D ]\  }}|                    t          t	          di |t	           |ddd           |d                              d                              |                    |t          |
fi |                     |S )Nr   Fr@   r   r   r   r$  r%  r   r   r  r  r  scalar_weightsr3   c                    |                      d          }d|z
                      |                              |                              |                                                     | |z
                                                                                      }|||z  }|dk    r|S |dk    r)|                                |                                z  S |                                S )Nr   r  rT   r   r%  )r  mul_add_exp_rE  r   r6  )r   r   r   r   r   r  max_valr   s           r8   bce_withlogitsloss_reference_fnzQmodule_inputs_torch_nn_BCEWithLogitsLoss.<locals>.bce_withlogitsloss_reference_fn  s    2***##a%a%%g..33gXOO4E4E4J4JQBQXLK^K^K`K`4a4a4f4f4h4hiif_FM&  ::<<!''))++::<<r:   r  r  r  r  r   r   r  r  )rW   r   r^   r   r_   rb   r   r'  r!  r  r  r   r   r   s                 r8   (module_inputs_torch_nn_BCEWithLogitsLossr    s   V5P]^^^J+fEQVWWWK+fEQVWWWK 
R	;./	K01	K01	X{{51123	Hkk"oo67%E        M$) 
 
  -*M*M:L*M*M&3JJxTX`4a4a4a4?K4I4I4L4LQ4O4O4R4RSX4Y4Y'[ '[!%,-L%c%cPb%c%c	e e e	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          |t          j        d          }t          t          ||d          }g d}	di fdd |d          ifddd	ifd
d
difdd	ddfg}
g }t	          |	|
          D ]\  }\  }}||fd}|                    t          t          d)d|i|t           |d           |ddd                    d| d| |                     |                    t          t          d)d|i|t           |d           |ddd                    d| d| |                     |                    t          t          d)d|i|t           |d           |ddd                    d| d| |                     |                    t          t          d)d|i|t           |d           |ddd                    d | d| |                     |                    dd           |                    t          t          d)d|i|t           |d!           |d!          	                    d	"                    d#| d| |                     |                    t          t          d)d|i|t           |d$           |d$          	                    d	"                    d%| d| |                     |                    t          t          d)d|i|t           |d&           |d&          	                    d	"                    d'| d| |                     |                    t          t          d)d|i|t           |d           |d          	                    d	"                    d(| d| |                     |                    t          t          d)d|i|t           |d           |d)dd                    d*| d| t          t          d+,                               |S )-Nr   F)r%  r   r   r@   r  r  r  r  rT   label_smoothingg333333?ignore_index_label_smoothing)r  r  c                 "    t          ||fd|i|S )Nr   )r   )r   r   r   r   r   r   s         r8   r   z=module_inputs_torch_nn_CrossEntropyLoss.<locals>.reference_fn  s     /1``	`M_```r:   r   )r   r   r   r   )r   r   r   r   r   r  4d_r[   r   )r   r   r   )r   r   r  r   r   r   2d_)r   r   r   r   r   r   )r   r   r   r   r   r  )r   r   r   r   r
  4d_prob_target_)r   r   r   3d_prob_target_)r   r   2d_prob_target_higher_dim_prob_target_r3   rq  Trp  )r   r
   rl   r   r   rU   r   r   r  softmaxr&  )rW   r   r^   r   r_   rb   r   r'  r!  
reductionsr  r   r   r   r   r   s                   r8   'module_inputs_torch_nn_CrossEntropyLossr  	  s   V5P]^^^J+fEJV[\\\K+fEQVWWWK333J	R	X{{40012	.!,-	.56	'!PT)U)UV%E M18U1K1K D D-	-D,/8M_ 	a 	a 	a 	a 	-*b*b)*bOa*b*b&3JJ|4L4L4?K	qWX4Y4Y4Y'[ '[5455)55%1	3 3 3	
 	
 	
 	-*b*b)*bOa*b*b&3JJy4I4I4?KATU4V4V4V'X 'X5455)55%1	3 3 3	
 	
 	
 	-*b*b)*bOa*b*b&3JJv4F4F4?KQR4S4S4S'U 'U5455)55%1	3 3 3	
 	
 	
 	-*b*b)*bOa*b*b&3JJ?Q4R4R4?KUV]^4_4_4_'a 'a=4==)==%1	3 3 3	
 	
 	
 !!.$77?  m.f.fi.fSe.f.f*7

<8P8P8B
<8P8P8X8X]^8X8_8_+a +a!E4!E!E)!E!E)5	7 7 7     m.f.fi.fSe.f.f*7

98M8M8B
98M8M8U8UZ[8U8\8\+^ +^!E4!E!E)!E!E)5	7 7 7     m.f.fi.fSe.f.f*7

68J8J8B
68J8J8R8RWX8R8Y8Y+[ +[!E4!E!E)!E!E)5	7 7 7     m.f.fi.fSe.f.f*7

CU8V8V8B
CU8V8V8^8^cd8^8e8e+g +g!M4!M!M)!M!M)5	7 7 7     m.f.fi.fSe.f.f*7

48H8H8CBATU8V8V8V+X +X!C!C!C	!C!C)01JY])^)^)^	` ` `   r:   c                 ^   t          t          |||          }t          t          |d          }di fdddifddd	ifd
ddifdddifg}t          j        t          j        g}	g }
t          |	|          D ]8\  }\  }}|fd}|                    dd          }|dk    rdnd}|dk    rdnd}|
                    t          t          di |t           |d          
                    d           |d|||          dd          | d|                     |
                    t          t          di |t           |d          
                    d           |d|||          t          j        d|          t          j        d|                    | d|                     |
                    t          t          di |t           |d          
                    d           |d|||          dd          | d|                     |
                    t          t          di |t           |d          
                    d           |d|||          t          j        d|          t          j        d|                    | d|                     :|
S ) Nr   F)r   r   r@   r   r   r   r$  r%  r   r   blank   c                 "    t          ||||fi |S rI   )r   )r   r   r   r   iltlr   s          r8   r   z4module_inputs_torch_nn_CTCLoss.<locals>.reference_fnq  s    $Q2rHH5GHHHr:   r   rT   r  )2   r   r  r   )r      )r^   r  r  )r  r  r  )r     r5  _lengths_intlistsr   r  _lengths_tensors)K   _1d_target_lengths_intlists_1d_target_lengths_tensorsr3   )r   r
   rl   intr   r   r  rU   r   r   r  tensor)rW   r   r^   r   r_   rb   r   r'  r  target_dtypesr   target_dtyper   r   r   r  r  r  s                     r8   module_inputs_torch_nn_CTCLossr  b  s   V5P]^^^J+fEJJJK 
R	;./	K01	K01	7B- %E Y
+MM4;M54Q4Q -
 -
00t/@R 	I 	I 	I 	I #&&w22B;;aaAb[[rrb"/"E"E2D"E"E+JJ{,C,C,O,OPQ,R,R,7K|Y\cg,h,h,h,8,H H ///)+ + +	
 	
 	
 	"/"E"E2D"E"E+JJ{,C,C,O,OPQ,R,R,7K|Y\cg,h,h,h,1Lf,U,U,U,1Lf,U,U,UW W ...)+ + +		
 		
 		
 	"/"E"E2D"E"E+JJ{,C,C,O,OPQ,R,R,7K|adko,p,p,p,8,H H 999)+ + +	
 	
 	
 	"/"E"E2D"E"E+JJ{,C,C,O,OPQ,R,R,7K|adko,p,p,p,1Lf,U,U,U,1Lf,U,U,UW W 888)+ + +		
 		
 		
 		
 r:   c                    t          t          |||          }t          t          ddd          t           |d                    d          t          t          ddd          t           |d	                    d
          t          t          ddd          t           |d                    d          t          t          dddd          t           |d                    d          t          t          dddd          t           |d                    d          t          t          ddd          t           |d                    d          t          t          dddd          t           |d                    d          t          t          dddd          t           |d                    d          gS )Nr   r   rv  r;  )r   rv  r   	1d_affinerz  r  )r   r  1d_affine_GNrT   )   rv  1d_affine_large_batchr   Fr   r   r   1d_no_affine_INr   r   1d_no_affine_LN)r   rv  r   r   	2d_affine)r   r   r   r   2d_no_affine_IN2d_no_affine_LNr   r}  s          r8    module_inputs_torch_nn_GroupNormr    s   V5P]^^^J 	+Aq$77'

9(=(=>>	 	 	 	+Ar488'

7(;(;<<	! 	! 	! 	+Aq$77'

8(<(<==(	* 	* 	* 	+Aq$>>'

9(=(=>>"	$ 	$ 	$ 	+Ar4??'

7(;(;<<"	$ 	$ 	$ 	+Aq$77'

<(@(@AA	 	 	 	+Aq$>>'

<(@(@AA"	$ 	$ 	$ 	+Aq$>>'

<(@(@AA"	$ 	$ 	$;! !r:   c           
      v   t          t          |||          }t          t          d          t           |d                              t          t          d          t           |d                    d          t          t                      t           |d                    t          d	
          gS )Nr   r1  )r   r   r   r   rw  r3   r  rz  r   r   rr  r|  r}  s          r8   !module_inputs_torch_nn_Hardshrinkr    s    V5P]^^^J 	+B//'

<(@(@AA	
 	
 	
 	+B//'

277	
 	
 	

 	+oo'

1662		
 	
 	
 r:   c           	         t          t          |||          }t          t                      t           |d                    t          d          t          t                      t           |d                    d          gS )Nr   r   r   rr  r  r  rz  r|  r}  s          r8    module_inputs_torch_nn_Hardswishr    s    V5P]^^^J 	+oo'

1662		
 	
 	
 	+oo'

<(@(@AA	 	 	 r:   c           
      z   t          t          |||          }t          t                      t           |d                    d           t          t                      t           |d                    d d          t          t                      t           |d	                    t          d
          gS )Nr   r  c                 .    |                     dd          S Nr   rT   r  r   s      r8   r   z1module_inputs_torch_nn_Hardtanh.<locals>.<lambda>      Q r:   r   r3   c                 .    |                     dd          S r  r  r   s      r8   r   z1module_inputs_torch_nn_Hardtanh.<locals>.<lambda>  r  r:   r  rr  r   r   r|  r}  s          r8   module_inputs_torch_nn_Hardtanhr    s    V5P]^^^J 	+oo'

9(=(=>>77	
 	
 	

 	+oo'

27777		
 	
 	
 	+oo'

1662		
 	
 	
 r:   c                 0   t          t          |||          }t          t          ||d          }di fdddifdddifd	dd
ifdddifg}g }	|D ]F\  }
}|fd}|	                    t          t	          di |t	           |d           |d                              d                              |                              d                              d                    |
|                     |	                    t          t	          di |t	           |d           |d                              d                              |                              d                              d                    d|
 |                     H|	S )Nr   Fr@   r   r   r   r$  r%  r   r   r  r0  c                     t          ||fi |S rI   )r   r   s        r8   r   z?module_inputs_torch_nn_HingeEmbeddingLoss.<locals>.reference_fn  s    /1KK8JKKKr:   r  r   r   rT   r   r3   r   )	r   r
   rU   r   r   r  r  r  sub_r  s                r8   )module_inputs_torch_nn_HingeEmbeddingLossr    s   V5P]^^^J+fEQVWWWK 
R	;./	K01	K01	Hc?#%E M$) 
 
  8J 	L 	L 	L 	L 	-*M*M:L*M*M&3JJu4E4E4?K4F4F4I4I!4L4L4O4OPU4V4V4[4[\]4^4^4c4cde4f4f'h 'h!%1	3 3 3	
 	
 	
 	-*M*M:L*M*M&3JJrNN4?KOO4F4Fq4I4I4L4LU4S4S4X4XYZ4[4[4`4`ab4c4c'e 'e-t--%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }di fdddifdddifddd	ifg}g }|D ]Z\  }	}
|
fd
}|                    t          t	          di |
t	           |d           |d                    |	|                     [|S )Nr   r@   r   r   r   r$  r%  r   r   c                     t          ||fi |S rI   )r   r   s        r8   r   z6module_inputs_torch_nn_HuberLoss.<locals>.reference_fn7  r   r:   r  r   r3   rE  r  s               r8    module_inputs_torch_nn_HuberLossr  +  s    V5P]^^^J 
R	;./	K01	K01	%E M$) 

 

  8J 	C 	C 	C 	C 	-*M*M:L*M*M&3JJw4G4G4>Jw4G4G'I 'I!%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }|                    dd          }|d         }d\  }	}
}}}dddd	}||         }d
|z   }t          |rt	          |
|          nt	          |	|
|          t	           ||                              t          |rt	          |
|||          nt	          |	|
|||          t	           ||                    d          t          |rt	          |
|          nt	          |	|
|          t	           ||                    t
          d          t          |rt	          |
|||          nt	          |	|
|||          t	           ||                    t
          d          gS )Nr   r   Fr  )r   r;  r  FT)r   r  r  r  rT   r   r   ro  rw  tracking_statsrz  tracking_stats_no_batch_dimrr  r   )r   r
   r  r   r   r&  )rW   r   r^   r   r_   rb   r   r   r  num_featuresr7  r  r  track_running_statsinput_no_batch_shape_dictr  r  s                    r8   %module_inputs_torch_nn_InstanceNormNdr  E  s   V5P]^^^J::fe$$DsA?X<L#x)<$+	l K K4Q733 	04dc8,,,-VY[c:d:d'

3D(E(EFF		H 	H 	H
 	MQ Xc8V5HIIIlC6CVWW'

3D(E(EFF!	# 	# 	# 	04dc8,,,-VY[c:d:d'

3G(H(HII2.	0 	0 	0 	MQ Xc8V5HIIIlC6CVWW'

3G(H(HII2	! 	! 	!) r:   c                 :   t          t          |||          }t          t          dgd          t           |d                    d          t          t          dgd          t           |d                    d          t          t          dgdd	          t           |d                    d
          t          t          g dd          t           |d                    d          t          t          g ddd	          t           |d                    d          t          t          dgd          t           |d                    d          t          t          g dddd	          t           |d                    d          gS )Nr   r   r;  r  1d_elementwise_affinerz     r   r   !1d_elementwise_affine_large_batchF1d_no_elementwise_affiner   r   r   r   r   r   r   3d_elementwise_affine3d_no_elementwise_affiner   r   1d_empty_elementwise_affineT)elementwise_affiner   3d_elementwise_affine_no_biasr   r}  s          r8    module_inputs_torch_nn_LayerNormr  l  s   V5P]^^^J 	+QC66'

9(=(=>>(	* 	* 	* 	+QC66'

;(?(?@@4	6 	6 	6 	+QCu=='

9(=(=>>+	- 	- 	- 	+IIIt<<'

<(@(@AA(	* 	* 	* 	+IIItUCC'

<(@(@AA+	- 	- 	- 	+QC66'

6(:(:;;.	0 	0 	0 	+IIItPT[`aaa'

<(@(@AA0	2 	2 	23 r:   c                    t          t          |||          }d }t          t          dgd          t           |d                    d|          t          t          dgd          t           |d                    d	|          t          t          dgdd
          t           |d                    d|          t          t          g dd          t           |d                    d|          t          t          g ddd
          t           |d                    d|          t          t          dgd          t           |d                    d|          gS )Nr   c                   	 | j         }|t          j        |j                  j         }|j        	| j        }| j        }	fdt          t          |                    D             }|	                                }|t          j
        |                    d                              |d          | j         z             z  }|||z  }|                    |          S )Nc                      g | ]
}|z
  d z
  S )rT   r3   )r5   r   ndims     r8   r9   zQmodule_inputs_torch_nn_RMSNorm.<locals>.rms_norm_reference_fn.<locals>.<listcomp>  s!    CCCq1CCCr:   r   T)r  keepdim)r7  rl   finfor^   r  normalized_shaper  r  rk   floatrsqrtrB  r%  rZ  )
r   r   r   r7  r  r  dims
upcasted_ir   r  s
            @r8   rms_norm_reference_fnz=module_inputs_torch_nn_RMSNorm.<locals>.rms_norm_reference_fn  s    e;+ag&&*Cv-CCCCeC0@,A,A&B&BCCCWWYY
ek*..*;*;*@*@TSW*@*X*X[\[`*`aaafF~~a   r:   r   r;  r  r  r   r  r  Fr  r  r  r  r  r  r  r   )rW   r   r^   r   r_   rb   r   r  s           r8   module_inputs_torch_nn_RMSNormr    s   V5P]^^^J! ! ! 	+QC66'

9(=(=>>(.		0 	0 	0
 	+QC66'

;(?(?@@4.		0 	0 	0
 	+QCu=='

9(=(=>>+.		0 	0 	0
 	+IIIt<<'

<(@(@AA(.		0 	0 	0
 	+IIItUCC'

<(@(@AA+.		0 	0 	0
 	+QC66'

6(:(:;;..		0 	0 	05 r:   c           
      t   t          t          |||          }t          t          d          t           |d                    d          t          t          d          t           |d                    d          t          t          d	d
dd          t           |d                    d          gS )Nr   r   )rT   r   r  r  rz  r   )rT   r   r  r  2d_uneven_padrT   r  r0  r1  )rT   r   r  r  r  3d_custom_paramsr   r}  s          r8   (module_inputs_torch_nn_LocalResponseNormr    s    V5P]^^^J 	+A//'

9(=(=>>	 	 	 	+A//'

<(@(@AA 	" 	" 	" 	+Ar3;;'

?(C(CDD#	% 	% 	% r:   c           
         t          t          |||          }t          t          dd          t           |d                    d          t          t          ddd          t           |d                              t          t          ddd          t           |d	                    t          d
          gS )Nr         ?r   )rT   r   r  normrz  r   rw  )r   r  r   rr  r|  r}  s          r8   module_inputs_torch_nn_LPPool1dr    s    V5P]^^^J 	+C33'

9(=(=>>	 	 	 	+Aq!44'

9(=(=>>	@ 	@ 	@ 	+Aq!44'

6(:(:;;2		! 	! 	! r:   c           
         t          t          |||          }t          t          ddd          t           |d                              t          t          ddd          t           |d                    t          d          t          t          dd          t           |d                    d	
          gS )Nr   r   rT   r   r  r  rw  r   r  r  r   rr  r  r  rz  r|  r}  s          r8   module_inputs_torch_nn_LPPool2dr    s    V5P]^^^J 	+Aq!44'

<(@(@AA	C 	C 	C 	+Aq!44'

9(=(=>>2		! 	! 	!
 	+C33'

<(@(@AA	 	 	 r:   c           
         t          t          |||          }t          t          ddd          t           |d                              t          t          ddd          t           |d                    t          d          t          t          dd          t           |d                    d	
          gS )Nr   r   )rT   r   r  r  r  rw  )r   r  r  r  r   rr  r  r  rz  r|  r}  s          r8   module_inputs_torch_nn_LPPool3dr    s    V5P]^^^J 	+Aq!44'

?(C(CDD	F 	F 	F 	+Aq!44'

<(@(@AA2		! 	! 	!
 	+C33'

?(C(CDD	 	 	 r:   c           
      t   t          t          |||          }t          t          d          t           |d                    d          t          t          dd          t           |d                    d          t          t          dd          t           |d                    d	          gS )
Nr   r   )r   r   r   r  rz  ry  Treturn_indicesr  r   r}  s          r8    module_inputs_torch_nn_MaxPool1dr    s    V5P]^^^J 	+A..'

:(>(>??	 	 	 	+Aq11'

:(>(>??	 	 	 	+AdCCC'

:(>(>??!	# 	# 	# r:   c           
      ~   t          t          |||          }t          t          ddd          t           |d                    d          t          t          ddd          t           |d                    d	          t          t          dddd
          t           |d                    d          gS )Nr   r   r   r  r  r  r  rz  r  r  Tr  r  r   r}  s          r8    module_inputs_torch_nn_MaxPool2dr  !  s    V5P]^^^J 	+FFFCC'

9(=(=>>	 	 	 	+FFFCC'

<(@(@AA	 	 	 	+FFFSWXXX'

<(@(@AA!	# 	# 	# r:   c                    t          t          |||          }t          t          d          t           |d                              t          t          dd          t           |d                    d          t          t          ddd          t           |d                    d	          t          t          dddd
          t           |d                    d          gS )Nr   r  r  rw  r   ry  rz  r  stride_paddingTr  r  r   r}  s          r8    module_inputs_torch_nn_MaxPool3dr   3  s   V5P]^^^J 	+I66'

?(C(CDD	F 	F 	F 	+Ay99'

?(C(CDD	 	 	 	+Aq)<<'

?(C(CDD!	# 	# 	# 	+Aq)DQQQ'

?(C(CDD!	# 	# 	# r:   c                    t          t          ||          }fd}t          t          dd |                      t           |d                    d          t          t          d	d
 |                      t           |d                    d          t          t          dd |            d          t           |d                    d          t          t          dd |                      t           |d                    t          d          t          t          d	d
 |                      t           |d                    t          d          gS )Nr   c                  j    t          j        dt           j                                                   S )N)rT   r   r   r^   r   rl   r  doubler  r  s   r8   make_random_sampleszGmodule_inputs_torch_nn_FractionalMaxPool2d.<locals>.make_random_samplesL  (    {9ELHHHQQSSSr:   r   r0  output_ratio_random_samples)rT   r   r   r  ratiorz  r  )r   r   output_sizer*  )rT   r   r  rv  sizeTr)  r*  r  ratio_return_indices)r   r   r  ratio_no_batch_dimrr  )r   r  rv  size_no_batch_dimr|  rW   r   r^   r   r_   rb   r   r&  s    `      r8   *module_inputs_torch_nn_FractionalMaxPool2dr4  I  s   V5P]^^^JT T T T T 	+ACQdQdQfQfggg'

<(@(@AA	 	 	 	+FXkXkXmXmnnn'

<(@(@AA	 	 	 	+5H5H5J5J[_   (

<(@(@AA'	) 	) 	) 	+ACQdQdQfQfggg'

9(=(=>>2%		' 	' 	'
 	+FXkXkXmXmnnn'

9(=(=>>2$		& 	& 	&) r:   c                 P   t          t          ||          }fd}t          t          dd |                      t           |d                    d          t          t          d	d
 |                      t           |d                    d          t          t          dd |                      t           |d                    d          t          t          dd |            d          t           |d                    d          t          t          dd |                      t           |d                    t          d          t          t          d	d
 |                      t           |d                    t          d          gS )Nr   c                  j    t          j        dt           j                                                   S )N)r   r   r   r#  r$  r  s   r8   r&  zGmodule_inputs_torch_nn_FractionalMaxPool3d.<locals>.make_random_samplesn  r'  r:   r   r0  r(  )r   r   r   r   r   r+  rz  r  )r   r   r   r,  )r   r   r  r  r  r.  )r   r   r   )r   r   r   )r   r      r  r   asymsizeTr/  r0  )r   r   r   r   r1  rr  )r   r  r  r  r2  r|  r3  s    `      r8   *module_inputs_torch_nn_FractionalMaxPool3dr9  k  s   V5P]^^^JT T T T T 	+ACQdQdQfQfggg'

?(C(CDD	 	 	 	+I9^q^q^s^sttt'

?(C(CDD	 	 	 	+I:_r_r_t_tuuu'

3C(D(DEE	 	 	 	+5H5H5J5J[_   (

?(C(CDD'	) 	) 	) 	+ACQdQdQfQfggg'

<(@(@AA2%		' 	' 	'
 	+I9^q^q^s^sttt'

<(@(@AA2$		& 	& 	&1 r:   c                    t          t          |||          }t          t                      t           |d                    d          t          t                      t           |d                    t          d          t          t                      t           |d                    d	          t          t                      t           |d
                    d          gS r  r|  r}  s          r8   module_inputs_torch_nn_Sigmoidr;    s    V5P]^^^J 	+oo'

277	
 	
 	

 	+oo'

1662		
 	
 	
 	+oo'

<(@(@AA+	
 	
 	

 	+oo'

?(C(CDD.	
 	
 	
# r:   c           
      z   t          t          |||          }t          t                      t           |d                    d d          t          t                      t           |d                    d           t          t                      t           |d	                    t          d
          gS )Nr   r3   c                 N    |                                                                 S rI   r/  r  r   s      r8   r   z3module_inputs_torch_nn_LogSigmoid.<locals>.<lambda>      ):): r:   r  rr  r  c                 N    |                                                                 S rI   r>  r   s      r8   r   z3module_inputs_torch_nn_LogSigmoid.<locals>.<lambda>  r?  r:   r   r   r   r|  r}  s          r8   !module_inputs_torch_nn_LogSigmoidrA    s    V5P]^^^J 	+oo'

277::		
 	
 	
 	+oo'

9(=(=>>::	
 	
 	

 	+oo'

1662		
 	
 	
 r:   c                    t          t          |||          }t          t          |t          j        d          }di fdddifdddifd	dd
ifdddifg}g }	|D ]v\  }
}|fd}|	                    t          t          di |t           |d           |d           |d                                                    |
|                     w|	S )Nr   Fr@   r   r   r   r$  r%  r   r   r  r0  c                      t          |||fi |S rI   )r   r  s         r8   r   z>module_inputs_torch_nn_MarginRankingLoss.<locals>.reference_fn  s    .r2qOO<NOOOr:   )r  r   r3   )r   r
   rl   r   rU   r   r   r  r  s                r8   (module_inputs_torch_nn_MarginRankingLossrD    s=   V5P]^^^J+fEJV[\\\K 
R	;./	K01	K01	Hc?#%E M$) 

 

  =O 	P 	P 	P 	P 	-*M*M:L*M*M&3JJu4E4EzzRWGXGX4?K4F4F4K4K4M4M'O 'O!%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          |t          j        d          }di fdddifdddifd	dd
ifg}g }	|D ]\  }
}|fd}|	                    t          t          di |t           |d           |ddd                    d|
 |                     |	                    t          t          di |t           |d           |ddd                    |
|                     |	S )Nr   Fr@   r   r   r   r$  r%  r   r   c                     t          ||fi |S rI   )r!   r   s        r8   r   zAmodule_inputs_torch_nn_MultiLabelMarginLoss.<locals>.reference_fn  s    1!QMM:LMMMr:   r  r   r   r  1d_r   r  r3   r   r
   rl   r   rU   r   r   r  s                r8   +module_inputs_torch_nn_MultiLabelMarginLossrI    s   V5P]^^^J+fEJV[\\\K 
R	;./	K01	K01	%E M$) 
 
  8J 	N 	N 	N 	N 	-*M*M:L*M*M&3JJu4E4E4?K!RT4U4U4U'W 'W)4\\%1	3 3 3	
 	
 	
 	-*M*M:L*M*M&3JJw4G4G4?KQUW4X4X4X'Z 'Z!%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          |t          j        d          }t          t          ||d          }di fdddifdddifd	dd
ifdddifdddifdd |d          ifg}	g }
|	D ]]\  }}|fd}|
                    t          t          di |t           |d           |ddd                    ||                     ^|
S )Nr   Fr@   r   r   r   r$  r%  r   r   r   r   r  r0  r  r  r   c                     t          ||fi |S rI   )r    r   s        r8   r   z<module_inputs_torch_nn_MultiMarginLoss.<locals>.reference_fn	  s    ,QHH5GHHHr:   r  r   r   r  r   r3   rH  )rW   r   r^   r   r_   rb   r   r'  r!  r  r   r   r   r   s                 r8   &module_inputs_torch_nn_MultiMarginLossrL  	  sc   V5P]^^^J+fEJV[\\\K+fEQVWWWK 
R	;./	K01	K01	sAh	Hc?#	X{{2/0%E M$) 

 

  8J 	I 	I 	I 	I 	-*M*M:L*M*M&3JJw4G4G4?KQS4T4T4T'V 'V!%1	3 3 3	
 	
 	
 	
 r:   c                    t          t          |||          }t          t          |t          j        d          }t          t          ||d          }di fdddifdddifd	dd
ifdd |d          ifg}	dd}
g }|	D ]c\  }}|                    t          t          di |t           |d           |ddd                    |t          |
fi |                     d|S )Nr   Fr@   r   r   r   r$  r%  r   r   r  r   c                    ||                                                                 z  d|z
  |                                                                  z  z   }|||z  }|                     |                                dz
            |                    d          z  }|dk    r|S |dk    r|                                S |                                S )NrT   r   r   r%  )r/  r  r   r  r.  r%  r  s          r8   &multilabelsoftmargin_loss_reference_fnz_module_inputs_torch_nn_MultiLabelSoftMarginLoss.<locals>.multilabelsoftmargin_loss_reference_fn0	  s    QYY[[__&&&!a%QB<<>>3E3E3G3G)GGfF'quuww{++affRjj8M&  ;;== ::<<r:   r  r   r   r  r   r  r3   rH  )rW   r   r^   r   r_   rb   r   r'  r!  r  rO  r   r   r   s                 r8   /module_inputs_torch_nn_MultiLabelSoftMarginLossrP  #	  sX   V5P]^^^J+fEJV[\\\K+fEQVWWWK 
R	;./	K01	K01	Hkk"oo./%E        M$) 
 
  -*M*M:L*M*M&3JJw4G4G4?KQUV4W4W4W'Y 'Y!%,-S%j%jWi%j%j	l l l	
 	
 	
 	
 r:   c                 p   t          t          |||          }t          t          ||d          }di fdddifdddifd	dd
ifg}g }	|D ]l\  }
}|fd}|	                    t          t	          di |t	           |d           |d                                                    |
|                     m|	S )Nr   Fr@   r   r   r   r$  r%  r   r   c                     t          ||fi |S rI   )r%   r   s        r8   r   z;module_inputs_torch_nn_SoftMarginLoss.<locals>.reference_fnW	  s    +AqGG4FGGGr:   )r   r   r   r3   r  r  s                r8   %module_inputs_torch_nn_SoftMarginLossrS  J	  s"   V5P]^^^J+fEQVWWWK 
R	;./	K01	K01	%E M$) 

 

  8J 	H 	H 	H 	H 	-*M*M:L*M*M&3JJv4F4F4?K4G4G4L4L4N4N'P 'P!%1	3 3 3	
 	
 	
 	
 r:   c           	      t   g }t          d ||||          D ]}|j        j        |j        j        }	}||	d<   ||	d<   t	          j        j        |i |	}
d}|j        }d|j        v r|j        d         |j        d<   |j        d= |                    t          t          |
|          ||j                             |S )Nr   r^   r   src_maskmaskrz  ).module_inputs_torch_nn_TransformerEncoderLayerr   ra   rb   rl   r   TransformerEncoderLayerr   rU   r   r   r   )rW   r   r^   r   r_   rb   sampleslayer_module_inputl_argsl_kwargsencoder_layer
num_layersr   s                r8   )module_inputs_torch_nn_TransformerEncoderr_  e	  s    GL&%: :   /@E.@G #!8&MHMM
 +8---+8+?
+KM ($Z0{+M:FF'#(
 
 
 	 	 	 	
 Nr:   c                 h   t          t          |||          }t          t          dddd          t           |d                    d          t          t          ddd	dt          j                  t           |d                    d
          t          t          ddd	dd          t           |d                    d          g}d t          j        g d|t          j                  f}d t          j        g d|t          j                  	                    d          f}	t          j        |	|ddd          D ]u\  }
}}}}|                    t          t          ddd	d|||          t           |d          |
|          t          t          |ddi          d|                      vd }|rut          j        dd          D ]_\  }}|                    t          t          ddd	dd||          t           |d                    |r|nd d| d|                      `|S )Nr   r   r   r7  r   r  relu_activationrz  r   gelu_activationFr   r   FFTr   r^   r  TFd_modelnheaddim_feedforwarddropoutrN  
norm_firstr   r  )rU  src_key_padding_maskrl  r   rN  rO  no_batch_dim_batch_first_rr  c                     | j         sJ |                     d           t          j                    5   | |i |}d d d            n# 1 swxY w Y   |                     d           |S )NFT)r_   trainrl   no_grad)moduler   ra   rb   r]  s        r8   fast_path_reference_fnzNmodule_inputs_torch_nn_TransformerEncoderLayer.<locals>.fast_path_reference_fn	  s    U]__ 	- 	-VT,V,,F	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	-Ts   	AAAT)rj  rN  rk  r   	fastpath__norm_first_)r   r
   r   r   rz  gelurl   r  boolr   r  r   rU   r&  )rW   r   r^   r   r_   rb   r   rY  key_padding_masks
attn_masksrU  rl  rk  rN  r   rs  s                   r8   rW  rW  ~	  s   V5P]^^^J 	+Aq"c::'
9%%  #	
 	
 	
 	+Aq!S!&AA'
9%%  #	
 	
 	
 	+Aq!SuEEE'
9%%  	
 	
 	
G0 u|,@,@,@W\Wabbbc%9%9%9&PUPZ[[[bbcijjkJj*;]M[hii E&
K"/TU8;;ED#R #R #R ,Jv&&Pd   %%>1<RhjkQln n n>>>
 
 
	 	 	 	      ) 1- O O 	 	JNN&31a$:\`' ' ' #0"
9--# # <@!I!7!7TCTCCzCC
 
 
    Nr:   c                 F   t          t          |||          }t          t          dddd          t           |d           |d                    d          t          t          ddd	dt          j                  t           |d           |d                    d
          t          t          ddd	dd          t           |d           |d                    d          g}d t          j        g d|t          j                  f}d t          j        g d|t          j                  	                    d          f}	t          j        |	|ddd          D ]?\  }
}}}}|
}|}|                    t          t          ddd	d|||          t           |d           |d          |
|||          t          t          |ddd          d|                       |d           |d          }}|s,|                    dd          |                    dd          }}||	                    dd          fdz  \  }}|                    t          t          ddd	d|||          t          |||
|||          d| d| d|                      A|S )Nr   r   r   r7  r   r  ra  rz  r   rb  Fr   r   rc  rd  r  re  rf  r  )tgt_maskmemory_masktgt_key_padding_maskmemory_key_padding_maskr   )r}  r~  rm  rn  rr  rT   r   norm_first__batch_first__bias_)r   r
   r   r   rz  rv  rl   r  rw  r   r  r   rU   r&  	transpose)rW   r   r^   r   r_   rb   r   rY  rx  ry  r{  r}  rk  r   rN  r|  r~  srctgts                      r8   .module_inputs_torch_nn_TransformerDecoderLayerr  	  s   V5P]^^^J 	+Aq"c::'
9%%zz)'<'<  #	
 	
 	
 	+Aq!S!&AA'
9%%zz)'<'<  #	
 	
 	
 	+Aq!SuEEE'
9%%zz)'<'<  	
 	
 	
G. u|,@,@,@W\Wabbbc%9%9%9&PUPZ[[[bbcijjkJj*;]M[hii" "E&
D+ "6"/TU8;;ED#R #R #R ,Jv&&

6(:(:X[f)=Wn   %%>1<QRop8q8qs s s ?>>  	 	 	 :i((**Y*?*?S 	@}}Q**CMM!Q,?,?C+=Q=X=XYZ\]=^=^<`cd<d9#%9"/TU8;;ED#R #R #R ,x[)=Wn   V:UUKUUtUU	 	 	
	 
	 
	 
	 Nr:   c                    t          t          |||          }g }d t          j        g d|t          j                  f}d t          j        g d|t          j                                      d          f}	t          j        |	|ddd          D ]G\  }
}}}}|
fdz  \  }}|fdz  \  }}|                    t          t          dddd	d	d
|||	  	        t           |d           |d          ||||          t          t          |ddd          d|                       |d           |d          }}|s,|                    dd	          }|                    dd	          }||                    dd          fdz  \  }}|                    t          t          dddd	d	d
|||	  	        t          ||||||                               I|S )Nr   rc  rd  r  re  r   r   r   rT   r   )	rg  rh  ri  num_encoder_layersnum_decoder_layersrj  rN  rk  r   r  )r{  rU  r}  rl  r   )r}  rl  rm  rn  rr  r  r   rw  )r   r
   rl   r  rw  r   r  r   rU   r   r   r&  r  )rW   r   r^   r   r_   rb   r   rY  rx  ry  rV  r_  rk  r   rN  rU  r{  rl  r}  r  r  s                        r8   "module_inputs_torch_nn_Transformerr  
  s   V5P]^^^JGu|,@,@,@W\Wabbbc%9%9%9&PUPZ[[[bbcijjkJj*;]M[hii$ $=
D+  $gk86F5H15L22"/TUCDYZ8;akrv#x #x #x ,Jv&&

6(:(:XX`)=Th   %%>1<QRlm8n8np p p ?>>  	 	 	 :i((**Y*?*?S 	&--1%%C--1%%C':J:Q:QRSUV:W:W9Y\]9]6 "6"/TUCDYZ8;akrv#x #x #x ,x()=Th  	  		 		 		 		 Nr:   c           
         t          t          j        |t          j        d          }t	          t          dd          t           |dd                              d                              t	          t          dd          t           |dd	                              d                              d
d	                    d          gS )NFr   r   r   )num_embeddingsembedding_dimr   rw  rT   i   r  discontiguousrz  )r   rl   r  r   r   r   random_r   )rW   r   r^   r   r_   rb   
make_emptys          r8    module_inputs_torch_nn_Embeddingr  9
  s    V5:UZ[[[J+1ANNN'

1a(8(8(@(@(C(CDD	
 	
 	
 	+1ANNN'

1c(:(:(B(B1(E(E(L(LQPS(T(TUU 	
 	
 	

 
r:   c                    t          t          |||          }g }d}d t          j        g d|t          j                  f}	d t          j        g d|t          j                                      d          f}
t          j        ||||	|
          }|D ]\  }}}}}|                    t          t          ddd|||          t           |d	           |d	           |d	          ||
          t                               |                    t          t          ddd|||          t           |d	           |d	           |d	          ||
          t          t          d                               |S )Nr   re  rc  rd  )r   r   r   r   T)	embed_dim	num_headsrN  r   add_bias_kvadd_zero_attnr  )r_  	attn_maskr   FrN  )r   r
   rl   r  rw  r   r  r   rU   r   r   ra  )rW   r   r^   r   r_   rb   r   rY  	bool_valsrx  ry  productsr   r  r  r_  r  s                    r8   )module_inputs_torch_nn_MultiheadAttentionr  H
  s   V5P]^^^JGIu|,@,@,@W\Wabbbc%9%9%9&PUPZ[[[bbclmmnJ IyBSU_``HIQ 
 
Ek=*:I"/!qVZ59{bo#q #q #q+JJv,>,>

6@R@RT^T^_eTfTf=MYbd d d7  	
 	
 	
 	"/!qV[59{bo#q #q #q+JJv,>,>

6@R@RT^T^_eTfTf=MYbd d d$%?USSS  	
 	
 	
 	
 Nr:   c                 4   t          t          |||          }t          t          dd          t           |d           |d                    t                    t          t          ddd          t           |d           |d                    t                    g}|                    dd          }|r[|                    t          t          dddd	
          t           |d           |d                    t                               |S )Nr   r   r   r   Tr   is_rnnFrelu)r   nonlinearity)r   r
   r   r   r&  r  rU   )	rW   r   r^   r   r_   rb   r   rY  r  s	            r8   #module_inputs_torch_nn_RNN_GRU_Cellr  g
  s'   V5P]^^^J+Ar22'

1zz"~~FF2	
 	
 	

 	+Ar==='

1zz"~~FF2	
 	
 	
G ZZ%((F 	
 	"/2Dv"V"V"V+JJqMM::b>>JJ6  	
 	
 	
 Nr:   c                 z   t          t          |||          }t          t          dd          t           |d           |d           |d          f          t                    t          t          ddd          t           |d           |d           |d          f          t                    f}|S )Nr   r   r   r   Tr   )r   r
   r   r   rl  rW   r   r^   r   r_   rb   r   rY  s           r8   module_inputs_torch_nn_LSTMCellr  
  s    V5P]^^^J+Ar22'

1

2

SU7WXX8	
 	
 	

 	+Ar==='

1

2

SU7WXX8	
 	
 	
G Nr:   c                     | j         }|                     d           t          | |          }|j                            |           |S )NF)r   r  r	   data)re  batch_sizesrequired_gradseqs       r8   make_packed_sequencer  
  sH    %Mu
sK
0
0CHM***Jr:   Fc                    t          t          |||          }|d         }d}	d}
d}d}g }|rt          |	|
||          }nt          |
||          }|D ]}|r|\  }}}}n|\  }}}ddd|||d}ddd|||d}|r
||d<   ||d<   |                    t	          t          di |t           |d	                    t          t          |
                               |                    t	          t          di |t           |d	           ||rdnddf                    t          t          |
                               |r|                    t	          t          di |t          t           |d          t          j	        ddg                              t          t          |
                               |                    t	          t          di |t          t           |d          t          j	        g d                              t          t          |
                               |S )Nr   r  )r  ry  FTr   )
input_sizehidden_sizer^  rN  r   bidirectionalr   r  r   r   r  r   r   )r   r   r   r   )r   r   r   )r   r   r   r   r   r3   )
r   r
   r   rU   r   r   rg  r  rl   r  )rW   r   r^   r   r_   with_packed_sequencerb   r   r  r  r   rN  r  rY  prod_genra   nlr  b_fbidir	cons_argscons_args_hiddens                         r8   module_inputs_torch_nn_RNN_GRUr  
  s   V5P]^^^JHF#LDK!MG =<{MJJ4m<< * * 	! $B3 MAsE#$Qa$'UL L	*+AQ+.ES S  	2(*In%/1^,"/"<"<)"<"<+JJv,>,>??$%CQTUUU  	
 	
 	
 	"/"C"C2B"C"C+JJv,>,>

QVL]AA\]_`Ka@b@bcc$%CQTUUU  	
 	
 	
   	NN&3&@&@i&@&@"/0DZZPYEZEZ\a\hjkmnio\p\p0q0q"r"r!()GUX!Y!Y!Y     NN&3&@&@i&@&@"/0DZZPYEZEZ\a\hixixix\y\y0z0z"{"{!()GUX!Y!Y!Y     Nr:   c                 p   t          t          |||          }d}d}d}	d}
g }t          |||	|
          }|D ]}|\  }}}}d}d|d||||d}d|d||||d}|                    t	          t          di |t           |d                    t          t          |          	                     |d
k    r|n|} ||rdnd|f           ||rdnd|f          f}|                    t	          t          di |t           |d          |          t          t          |          	                     |S )Nr   r  )r   r   r   r   )r  r  r^  	proj_sizerN  r   r  r  r  r   r   r   r  r3   )r   r
   r   rU   r   r   ri  )rW   r   r^   r   r_   rb   r   r   rN  r  
proj_sizesrY  r  ra   r  r  r  r  r  r  r  h_outhxs                          r8   module_inputs_torch_nn_LSTMr  
  s   V5P]^^^JDK!MJGt[-DDH 
 
#' 3y#$[PQ`i$'UL L	*+KWXgp+.ES S 	"/"<"<)"<"<+JJv,>,>??$%@cRRR  	
 	
 	
 ']]		ju+!!!U344jjuBS!!RSU`Aa6b6bc"/"C"C2B"C"C+JJv,>,>CC$%@cRRR  	
 	
 	
 	
 Nr:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS )Nr   rT   r  r   rT   r   r  rw  r|  r}  s          r8   &module_inputs_torch_nn_ReflectionPad1dr        V5P]^^^J 	+A..'

6(:(:;;2	
 	
 	

 	+F33'

9(=(=>>	
 	
 	

 
r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS Nr   rT   r  r   rT   r   r   r   r   r   r   rv  rw  r|  r}  s          r8   &module_inputs_torch_nn_ReflectionPad2dr        V5P]^^^J 	+A..'

9(=(=>>2	
 	
 	

 	+L99'

<(@(@AA	
 	
 	

 
r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS )Nr   rT   r:  r   rT   r   rT   r   rT   r   )r   r   r   r   r   rw  r|  r}  s          r8   &module_inputs_torch_nn_ReflectionPad3dr  &      V5P]^^^J 	+A..'

<(@(@AA2	
 	
 	

 	+,>??'

?(C(CDD	
 	
 	

 
r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS Nr   rT   r  r   r  r  rw  r|  r}  s          r8   'module_inputs_torch_nn_ReplicationPad1dr  5  r  r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS r  r|  r}  s          r8   'module_inputs_torch_nn_ReplicationPad2dr  D  r  r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS )Nr   rT   r  r   rT   r   r   r   r   rv  )r   r   r   rv  r  rw  r|  r}  s          r8   'module_inputs_torch_nn_ReplicationPad3dr  S  r  r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS r  r|  r}  s          r8    module_inputs_torch_nn_ZeroPad1dr  b  r  r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS )Nr   rT   r  r   r  rw  r|  r}  s          r8    module_inputs_torch_nn_ZeroPad2dr  q  r  r:   c           	         t          t          |||          }t          t          d          t           |d                    t                    t          t          d          t           |d                              gS )Nr   rT   r  r   r  )rT   r   r   r   r   rw  r|  r}  s          r8    module_inputs_torch_nn_ZeroPad3dr    r  r:   c           	         t          t          |||          }t          t          dd          t           |d                    t                    t          t          dd          t           |d                    	          gS )
Nr   rT   r   r  r   r  r   r  rw  r|  r}  s          r8   $module_inputs_torch_nn_ConstantPad1dr    s    V5P]^^^J 	+Aq11'

6(:(:;;2	
 	
 	

 	+FA66'

9(=(=>>	
 	
 	

 
r:   c           	         t          t          |||          }t          t          dd          t           |d                    t                    t          t          dd          t           |d                              gS )	Nr   rT   r   r  r   r  r   rw  r|  r}  s          r8   $module_inputs_torch_nn_ConstantPad2dr    s    V5P]^^^J 	+Aq11'

9(=(=>>2	
 	
 	

 	+L!<<'

<(@(@AA	
 	
 	

 
r:   c           	         t          t          |||          }t          t          dd          t           |d                    t                    t          t          dd          t           |d                    	          gS )
Nr   rT   r   r  r   r  r  )rT   r   rT   r   rT   rw  r|  r}  s          r8   $module_inputs_torch_nn_ConstantPad3dr    s    V5P]^^^J 	+Aq11'

<(@(@AA2	
 	
 	

 	+,>BB'

?(C(CDD	
 	
 	

 
r:   c                    t          t          |||          }d t          t          d          t           |d                    t                    t          t          d          t           |d                    fd          t          t          d	          t           |d                    fd
          t          t          d          t           |d                    fd          gS )Nr   c           
          t          j        | dddd|d          df         | | ddddd|d         f         gd          S )z input:
                [[[0., 1., 2.],
                  [3., 4., 5.]]]
                pad: (1, 2)
                output:
                    [[[2., 0., 1., 2., 0., 1.],
                      [5., 3., 4., 5., 3., 4.]]]
            Nr   rT   r   r
  rl   catre  pads     r8   padding1d_circular_refzDmodule_inputs_torch_nn_CircularPad1d.<locals>.padding1d_circular_ref  sX     y#aaaSVGHHn-sC111gs1vg4FGQOOOOr:   rT   r  r   r  r  c                 &     || j                   S rI   r  r   r   r   r  s      r8   r   z6module_inputs_torch_nn_CircularPad1d.<locals>.<lambda>      )?)?19)M)M r:   )r   rT   c                 &     || j                   S rI   r  r  s      r8   r   z6module_inputs_torch_nn_CircularPad1d.<locals>.<lambda>  r  r:   r  c                 &     || j                   S rI   r  r  s      r8   r   z6module_inputs_torch_nn_CircularPad1d.<locals>.<lambda>  r  r:   r|  )rW   r   r^   r   r_   rb   r   r  s          @r8   $module_inputs_torch_nn_CircularPad1dr    s-   V5P]^^^J	P 	P 	P 	+A..'

6(:(:;;2	
 	
 	

 	+F33'

9(=(=>>MMMM	
 	
 	

 	+F33'

9(=(=>>MMMM	
 	
 	

 	+F33'

9(=(=>>MMMM	
 	
 	
! r:   c                    t          t          |||          }d t          t          d          t           |d                    t                    t          t          d          t           |d                    fd          t          t          d	          t           |d                    fd
          t          t          d          t           |d                    fd          gS )Nr   c                    t          j        | dddd|d          df         | | ddddd|d         f         gd          } t          j        | dddddd|d          df         | | ddddddd|d         f         gd          S )aS  input:
                [[[[0., 1., 2],
                   [3., 4., 5.]]]]
                pad: (1, 2, 2, 1)
        output:
            [[[[2., 0., 1., 2., 0., 1.],
               [5., 3., 4., 5., 3., 4.],
               [2., 0., 1., 2., 0., 1.],
               [5., 3., 4., 5., 3., 4.],
               [2., 0., 1., 2., 0., 1.]]]]
        Nr   r   r
  r   rT   r  r  s     r8   padding2d_circular_refzDmodule_inputs_torch_nn_CircularPad2d.<locals>.padding2d_circular_ref  s     iQQQCF788^,c3qqq!!!Wc!fW}3EFANNNy#aaaAAAAwxx/0#s111aaaGSVG;K7LMSTUUUUr:   rT   r  r   )rT   r   r   rT   )rT   rT   r   r   c                 &     || j                   S rI   r  r   r   r   r  s      r8   r   z6module_inputs_torch_nn_CircularPad2d.<locals>.<lambda>  r  r:   )r   r   r   r   c                 &     || j                   S rI   r  r  s      r8   r   z6module_inputs_torch_nn_CircularPad2d.<locals>.<lambda>  r  r:   )r   r   r   rT   )rT   rT   r   r   c                 &     || j                   S rI   r  r  s      r8   r   z6module_inputs_torch_nn_CircularPad2d.<locals>.<lambda>  r  r:   r|  )rW   r   r^   r   r_   rb   r   r  s          @r8   $module_inputs_torch_nn_CircularPad2dr    s-   V5P]^^^JV V V  	+A..'

9(=(=>>2	
 	
 	

 	+L99'

<(@(@AAMMMM	
 	
 	

 	+L99'

<(@(@AAMMMM	
 	
 	

 	+L99'

<(@(@AAMMMM	
 	
 	
! r:   c                    t          t          |||          }d t          t          d          t           |d                    t                    t          t          d          t           |d                    fd          t          t          d	          t           |d                    fd
          t          t          d          t           |d                    fd          gS )Nr   c                    t          j        | dddd|d          df         | | ddddd|d         f         gd          } t          j        | dddddd|d          df         | | ddddddd|d         f         gd          } t          j        | dddddddd|d          df         | | ddddddddd|d         f         gd          S )	aN  input:
                [[[[[ 0.,  1.,  2.],
                    [ 3.,  4.,  5.]],
                   [[ 6.,  7.,  8.],
                    [ 9., 10., 11.]]]]]
            pad: (1, 2, 2, 1, 1, 2)
            output: [[[[[ 8.,  6.,  7.,  8.,  6.,  7.],
                        [11.,  9., 10., 11.,  9., 10.],
                        [ 8.,  6.,  7.,  8.,  6.,  7.],
                        [11.,  9., 10., 11.,  9., 10.],
                        [ 8.,  6.,  7.,  8.,  6.,  7.]],

                       [[ 2.,  0.,  1.,  2.,  0.,  1.],
                        [ 5.,  3.,  4.,  5.,  3.,  4.],
                        [ 2.,  0.,  1.,  2.,  0.,  1.],
                        [ 5.,  3.,  4.,  5.,  3.,  4.],
                        [ 2.,  0.,  1.,  2.,  0.,  1.]],

                       [[ 8.,  6.,  7.,  8.,  6.,  7.],
                        [11.,  9., 10., 11.,  9., 10.],
                        [ 8.,  6.,  7.,  8.,  6.,  7.],
                        [11.,  9., 10., 11.,  9., 10.],
                        [ 8.,  6.,  7.,  8.,  6.,  7.]],

                       [[ 2.,  0.,  1.,  2.,  0.,  1.],
                        [ 5.,  3.,  4.,  5.,  3.,  4.],
                        [ 2.,  0.,  1.,  2.,  0.,  1.],
                        [ 5.,  3.,  4.,  5.,  3.,  4.],
                        [ 2.,  0.,  1.,  2.,  0.,  1.]],

                       [[ 8.,  6.,  7.,  8.,  6.,  7.],
                        [11.,  9., 10., 11.,  9., 10.],
                        [ 8.,  6.,  7.,  8.,  6.,  7.],
                        [11.,  9., 10., 11.,  9., 10.],
                        [ 8.,  6.,  7.,  8.,  6.,  7.]]]]]
        Nr   r   r   r
  r   r   rT   r  r  s     r8   padding3d_circular_refzDmodule_inputs_torch_nn_CircularPad3d.<locals>.padding3d_circular_ref  s)   J iQQQCF788^,c3qqq!!!Wc!fW}3EFANNNiQQQ111s1vghh./c!!!QQQ7CF7:J6KLRSTTTy#aaaAAAqqq3q6'((23S#aaaAAAqqq'3q6'>Q:RSYZ[[[[r:   rT   r  r   r  )rT   rT   r   r   r   c                 &     || j                   S rI   r  r   r   r   r  s      r8   r   z6module_inputs_torch_nn_CircularPad3d.<locals>.<lambda>@  r  r:   )r   r   r   rT   rT   r   c                 &     || j                   S rI   r  r  s      r8   r   z6module_inputs_torch_nn_CircularPad3d.<locals>.<lambda>E  r  r:   )r   r   r   rT   r   r   c                 &     || j                   S rI   r  r  s      r8   r   z6module_inputs_torch_nn_CircularPad3d.<locals>.<lambda>J  r  r:   r|  )rW   r   r^   r   r_   rb   r   r  s          @r8   $module_inputs_torch_nn_CircularPad3dr  
  s1   V5P]^^^J'\ '\ '\T 	+A..'

<(@(@AA2	
 	
 	

 	+,>??'

?(C(CDDMMMM	
 	
 	

 	+,>??'

?(C(CDDMMMM	
 	
 	

 	+,>??'

?(C(CDDMMMM	
 	
 	
! r:   
TestModule	test_gradcuda)	active_ifrh   test_gradgradtest_non_contiguous_tensors)r   rx   rh   c                    t          t          |||          }t          t          t	          dd          t	           |dd           |dd                              t
          j        t          d          t          t          t	          dd          t	           |dd           |dd	                              t
          j        t          d
          t          t          t	          dd          t	           |dd           |dd                              t
          j        t          d          t          t          t	          dd          t	           |dd           |dddd                              t
          j        t          d          t          t          t	          ddd          t	           |dd           |dd	                              t
          j        t          d
          t          t          t	          ddd          t	           |dd           |dd	                              t
          j        t          d
          g}|S )Nr   r   r5  r      rw  5input has inconsistent input_size: got 11 expected 10r   r   r      9hidden0 has inconsistent hidden_size: got 21, expected 20r   5Input batch size 3 doesn't match hidden0 batch size 5rT   z.Expected hidden to be 1D or 2D, got 4D insteadr  ry  	r   r
   r   r   r   r   r   rf   
ValueErrorr  s           r8   )module_error_inputs_torch_nn_RNN_GRU_Cellr  k  s   V5P]^^^J"/B"7"7+JJq",=,=zz!R?P?PQQ   %2#O	
 	
 	
 	"/B"7"7+JJq",=,=zz!R?P?PQQ   %2#S	
 	
 	
 	"/B"7"7+JJq",=,=zz!R?P?PQQ   %2#O	
 	
 	
 	"/B"7"7+JJq",=,=zz!QPQSU?V?VWW   %2!H	
 	
 	
 	"/B"?"?+JJq",=,=zz!R?P?PQQ   %2#S	
 	
 	
 	"/B"?"?+JJq",=,=zz!R?P?PQQ   %2#S	
 	
 	
]7Gp Nr:   c                    t          t          |||          }t          t          t	          dd          t	           |dd           |dd           |dd          f                    t
          j        t          d          t          t          t	          dd          t	           |dd           |dd	           |dd	          f                    t
          j        t          d
          t          t          t	          dd          t	           |dd           |dd           |dd          f                    t
          j        t          d          t          t          t	          dd          t	           |dd           |dddd           |dddd          f                    t
          j        t          d          g}|S )Nr   r   r5  r   r  rw  r  r  r  r  r   r	  rT   z/Expected hx\[0\] to be 1D or 2D, got 4D insteadr
  r  s           r8   %module_error_inputs_torch_nn_LSTMCellr    s   V5P]^^^J"/B"7"7+JJq",=,=

1b@Q@QS]S]^_acSdSd?eff   %2#O	
 	
 	
 	"/B"7"7+JJq",=,=

1b@Q@QS]S]^_acSdSd?eff   %2#S	
 	
 	
 	"/B"7"7+JJq",=,=

1b@Q@QS]S]^_acSdSd?eff   %2#O	
 	
 	
 	"/B"7"7+JJq",=,=

1aQRTV@W@WYcYcdeghjkmoYpYp?qrr   %2!K	
 	
 	
9%GL Nr:   c           
         t          t          t          ddd                    t          j        t
          d          t          t          t          ddd                    t          j        t
          d          g}|S )Nr   r   rT   )r   z%hidden_size must be greater than zeror  z$num_layers must be greater than zero)r   r   r   r   r   r  )rW   r   r^   r   r_   rb   rY  s          r8   $module_error_inputs_torch_nn_RNN_GRUr    s    -Aq*A*ABBB$7!?		
 	
 	
 	-B*B*BCCC$7!>		
 	
 	
G Nr:   c           
      ,   t          t          |||          }|                    dd          }t          t	          |rt          dd          nt          d          t           |d                              t          j        t          d	          gS )
Nr   is_constantFrT   r   r:  rw  z(expected 2D or 3D input \(got 4D input\)r  	r   r
   r  r   r   r   r   r   r  rW   r   r^   r   r_   rb   r   r  s           r8   "module_error_inputs_torch_nn_Pad1dr    s    V5P]^^^J**]E22K 	9D"Z-1"5"5"5-XYJZJZ+JJ|,D,DEE   %2!C		
 		
 		
 r:   c           
      ,   t          t          |||          }|                    dd          }t          t	          |rt          dd          nt          d          t           |d                              t          j        t          d	          gS )
Nr   r  FrT   r   r  rw  z(expected 3D or 4D input \(got 2D input\)r  r  r  s           r8   "module_error_inputs_torch_nn_Pad2dr        V5P]^^^J**]E22K 	9D"Z-1"5"5"5-XYJZJZ+JJv,>,>??   %2!C		
 		
 		
 r:   c           
      ,   t          t          |||          }|                    dd          }t          t	          |rt          dd          nt          d          t           |d                              t          j        t          d	          gS )
Nr   r  FrT   r   r  rw  z(expected 4D or 5D input \(got 2D input\)r  r  r  s           r8   "module_error_inputs_torch_nn_Pad3dr    r  r:   r  )r   r   test_memory_formatr_   )r   )r   r   r   zSkipped!)r   )r   r   r   )rx   rh   )r   r   r   TTestEagerFusionModuleInfo,test_aot_autograd_symbolic_module_exhaustive#test_aot_autograd_module_exhaustive)rV   r   r   test_check_inplace)rh   rx   rT   )r  r   )rx   g-C6?)r   r   r   r   r   r   r   )rh   )r  r   r  test_cpu_gpu_parityg{Gzt?)r   r   r   rx   r   r   )rh   rx   r   )r   rx   r   r   r   r   )atolrtoltest_forwardcpu)r   r   r   )r   r   )include_halfinclude_bfloat16gQ?r;  )r   rx   r   )r&  r%  )r   rx   r   )r   r   )r  )r   rV   r   TestModuleMPStest_non_contiguoustest_save_loadtest_factory_kwargs)rV   r   r   r   )rh   r   gMb`?)r   r   r   r   )r  )r   r   )rV   r   r   r   )rV   r   r   r   r   )r   r   r   	module_db)F(U  rl   unittestcopyr   enumr   	functoolsr   r   r  r   r   r3  torch.nn.functionalr   
functionalrz  torch.nn.utils.rnnr	   torch.testingr
   #torch.testing._internal.common_cudar   $torch.testing._internal.common_dtyper   r   r   *torch.testing._internal.common_device_typer   r   r   r   r   r   r   r   r   2torch.testing._internal.common_methods_invocationsr   !torch.testing._internal.common_nnr   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   $torch.testing._internal.common_utilsr'   r(   r)   r*   r+   r,   r-   typesr.   operatorrG   aoqatquantizable	quantizedr/   rJ   __annotations__Module	Container	NLLLoss2d	MaxPool2dr0   rL   typefrom_iterabler<   r?   rW  strr7   r;   r6   r4   r   rr   r   namespace_namerB   r   r   r   r   r   r   r   r   r  r"  r(  r?  rF  r&  ra  rg  ri  rl  rs  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r)  r+  r2  r<  rA  rL  rO  r_  rc  rj  rm  rp  ru  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r4  r9  r;  rA  rD  rI  rL  rP  rS  r_  rW  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  expectedFailurer  #rnn_gru_lstm_module_info_decoratorsr  r  r  r  r  r  backendsr   is_availableis_macos_or_newer_macos15_or_newerAdaptiveAvgPool1dAdaptiveAvgPool2d
itemgetterAdaptiveAvgPool3dskipAdaptiveMaxPool1dAdaptiveMaxPool2dAdaptiveMaxPool3d	AvgPool1d	AvgPool2dr   	AvgPool3dBatchNorm1dBatchNorm2dBatchNorm3dCELUConv1dr   Conv2dfloat64Conv3dConvTranspose1dchalfConvTranspose2d	complex32	complex64
complex128ConvTranspose3dCosineEmbeddingLossELUFractionalMaxPool2dFractionalMaxPool3dL1LossSmoothL1Loss
LazyConv1d
LazyConv2d
LazyConv3dLazyConvTranspose1dLazyConvTranspose2dLazyConvTranspose3dLinearBilinearLPPool1dLPPool2dLPPool3d	MaxPool1d	MaxPool3d	KLDivLossMSELossMarginRankingLossMultiLabelMarginLossMultiMarginLossSoftMarginLossMultiLabelSoftMarginLossNLLLossGaussianNLLLossPoissonNLLLossHingeEmbeddingLoss	HuberLossBCELossBCEWithLogitsLossCrossEntropyLossCTCLossGELUGLU	GroupNorm
Hardshrink	HardswishHardtanhInstanceNorm1dInstanceNorm2dInstanceNorm3dLocalResponseNorm	LayerNormRMSNormTransformerEncoderrX  TransformerDecoderLayerTransformerMultiheadAttention	EmbeddingReLU	LeakyReLUReLU6PReLURNNCellGRUCellLSTMCellSigmoid
LogSigmoidSiLUSoftmax	Softmax2d
LogSoftmaxSoftminSoftplus
SoftshrinkSoftsignTanh
Tanhshrink	ThresholdMishRNNGRULSTMReflectionPad1dReflectionPad2dReflectionPad3dReplicationPad1dReplicationPad2dReplicationPad3dSELU	ZeroPad1d	ZeroPad2d	ZeroPad3dCircularPad1dCircularPad2dCircularPad3dConstantPad1dConstantPad2dConstantPad3dr+  r3   r:   r8   <module>r     sw@                 $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $               3 3 3 3 3 3 % % % % % % : : : : : :G G G G G G G G G G: : : : : : : : : : : : : : : : : : : : : : L K K K K Km m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m m
                         
H	HKO	HK#	HK!	HK!' 4
#    
HO	H	H	HK#	HK#T   *2u2 4( 4(&4( 4( 4(  )  ) *T
 * * * ONNNN ') DsO ( ( (" O OI ( O OWY44
"+33HbAAII*VXYY ///0>-N-N-N-Nz*O _&STTB B B B B B B BJ# # #       2 2 2 2 2 2 2 2,    d   
' ' ' ' ' ' ' '(<+ <+ <+ <+ <+ <+ <+ <+@  (  :% % %P@ @ @F  2- - -`$ $ $N+ + +\D D D&D D D0b b b0
< 
< 
<4 4 4( ( ($0 0 080D 0D 0Dh( ( ( ( ( (*& & &,
* 
* 
*( ( (&- - -2( ( (6( ( (.( ( (.  (  8& & &&= = ="= = == = ="9 9 9&9 9 9&0 0 0*"+ "+ "+J$ $ $L L L"* * *"
* 
* 
** * *** * *$* * *:* * *$* * *"* * * * * ** * *&* * *"W W W  F- - -`' ' 'TU U Ur= = =@$ $ $N  ,  "  0     F  4% % %N     D0 0 0f  &  (  &  &  &  $  ,  D# # #L  8  0  8     F  >$ $ $N  6  2G G GT@ @ @F+ + +\    >  >  $  ; ; ; ;|& & &T                        # # #J' ' 'RB B BR L ,4n"46   L ,4n"46  
 L ,0M4n"46  
 L ,0M0.5;.V\  '' #6: : :x( ( (V  "  $  $  & N&3355e%.:L:^:^_acd:e:e [Jux)"J  <((+  [ Jux)$8"J  <((</#+!4!4Z!@!@	  		  [* Jux)$8"J<j 9 9<I]^^<((+  +[: Jux)"J  ;[@ Jux)$8"J  A[H Jux)$8"J<j 9 9<I]^^<((+  I[X Jux!"B  Y[^ Jux!"B
  </#+!4!4Z!@!@#)    < 2L%-fkmmmp  _[~ Jux!"B$8  <j 9 9<I]^^<7TUU	X  [P Jux#%)"D  </1LE!4!4Z!@!@    </1L<!4!4Z!@!@    Q[t Jux#%)"D  < 2LBVbubjbu  wA  cB  cB  C  C  C  </1LE!4!4Z!@!@    </1L<!4!4Z!@!@    u[\ Jux#%)"D  <((  </1LE!4!4Z!@!@    </1L<!4!4Z!@!@    ][D Jux}"=  < 8,H\,15=/K K KM  E[R Jux")'*G1SX"Y"Y"Y$8,0  <>R\a\i[jkkk  < 2LBV,15=/K K K< 2LB_,15=/K K K	  < 1 15=%2H I I<Ymnn  S[t Jux")'*G1SX"Y"Y"Y$8,0  <>R\a\i[jkkk  < 8,H\,2EM?L L L  < 8,H\,15=%-:XZ Z Z  < 2LBV,15=/K K K< 2LB_,15=/K K K$  < 1 15=%2H I I<Ymnn+  u[d Jux")'*G1SX"Y"Y"Y$8,0  <>R\a\i[jkkk<U;;;  < 8,H\]]  < 1 15=%2H I I<Ymnn  e[D Jux'")'*G1SXei"j"j"j$8,044U[AA  <>R\a\i[jkkk< 8,H](-~6K K K  < 2LBV,15=/K K K< 2LB_,15=/K K KM  < 1 15=%2H I I<Ymnn< 1 15;2F G GWkll#  E[n Jux'")'*G1SXei"j"j"j$8,044U[AA  <>R\a\i[jkkk< 8,H\(-%JZ'[] ] ]  < 8,H\jp(-u7G'HJ J J  < 8,H\,15=%-:XZ Z Z  < 8,H](-~6K K K  < 2LBV,15=/K K K< 2LB_,15=/K K K)0  < 1 15=%2H I I<Ymnn< 1 15;2F G GWkll9  o[n Jux'")'*G1SXei"j"j"j44U[AA$8,0  <>R\a\i[jkkk<((  < 8,H\]]< 8,H\jp(-'IUce e e  < 8,H](-~6K K K   < 1 15=%2H I I<Ymnn< 1 15?E2J K K\[pqq< 1 15;2F G GWkll)  o[` Jux+"L  <j 9 9<I]^^a  a[l Jux|"<  < 8,H\,15=/K K KM  m[z Jux+"L$8  <((<j 9 9<I]^^a  {[J	 Jux+"L$8  <((<j 9 9<I]^^a  K	[Z	 Jux"?  <j 9 9<I]^^a  [	[f	 Jux$"E  <j 9 9<I]^^  <	<9V(-EK K KM	 	 	g	[z	 Jux"")'*G1SW"X"X"X$8,0  <>R\a\i[jkkk  <))  < 2LBV,15=/K K K< 2LB_,15=/K K K  < 1 15=%2H I I<Ymnn#  {	[b
 Jux"")'*G1SW"X"X"X$8,0  <>R\a\i[jkkk  <))  < 8,H\,2EM?L L L  < 8,H\,15=%-:XZ Z Z  < 2LBV,15=/K K K< 2LB_,15=/K K K#*  < 1 15=%2H I I<Ymnn1  c
[X Jux"")'*G1SW"X"X"X$8,0  <>R\a\i[jkkk  <))<((  < 8,H\]]  < 1 15=%2H I I<Ymnn!  Y[~ Jux+")'*G1SWdh"i"i"i$8,0  <>R\a\i[jkkk  <))  < 2LBV,15=/K K K< 2LB_,15=/K K K  < 1 15=%2H I I<Ymnn#  [f Jux+")'*G1SWdh"i"i"i$8,0  <>R\a\i[jkkk  <))  < 8,H\jp(-8 8 8  < 8,H\,15=%-:XZ Z Z  < 2LBV,15=/K K K< 2LB_,15=/K K K#*  < 1 15=%2H I I<Ymnn1  g[\ Jux+")'*G1SWdh"i"i"i$8,0  <>R\a\i[jkkk  <))<((  < 8,H\]]  < 1 15=%2H I I<Ymnn!  ][B Jux"?  <j 9 9<I]^^a  C[N Jux "A<(( =##4d*C*C*C =##4d*C*C*C*E F F $^	H H H  <j 9 9<I]^^< 8,,15=/K K K	M  O[n Jux "A<j 9 9<UU<j 9 9<YY\  o[z Jux "A<j 9 9<UU<j 9 9<YY  </#+!4!4Z!@!@!ZIZEZ#(    {[X Jux "A<j 9 9<UU<j 9 9<YY<j 9 9<I]^^<	u===	@  Y[h Jux!"B  i[n Jux!"B  o[t Jux!"B$8  u[| Jux!"B  <j 9 9<I]^^<j 9 9<I^__<j 9 9<UU<j 9 9<YY\	 	 	}[P Jux"@  <j 9 9<I]^^< 2LB_,15=/L L L  < 8,,15=/K K KM  Q[h Jux)"J  <j 9 9<I]^^a  i[t Jux,"M  <j 9 9<I]^^<	<UKKK<j 9 9<YY\	 	 	u[H Jux'"H  <j 9 9<I]^^<	<UKKK<j 9 9<YY\	 	 	I[\ Jux&"G  <j 9 9<I]^^< 8,,15=/K K K	M  ][n Jux0"Q  <j 9 9<I]^^a  o[z Jux"@  <j 9 9<I]^^< 8,,15=/K K K	M  {[L Jux'"H  <j 9 9<I]^^ab b bM[V Jux&"G  <j 9 9<I]^^ab b bW[` Jux*"K  <j 9 9<I]^^a  a[l Jux!"B  <j 9 9<I]^^< 8,,15=/K K K	M  m[~ Jux"@  <j 9 9<I]^^<	<]bccc	f  [N Jux)"J  <j 9 9<I]^^<	<]bccc	f  O[^ Jux("I''TERRR  < 8,H\]]< 1 15=##4VZB[B[B[2\ ] ]_k .TY[ [ [< 8,H]glgtfu,24 4 46
 
 
_[t Jux"@  <j 9 9<I]^^<	<ULLL<j 9 9<UU<j 9 9<YY<j 9 9<Ifgg	j  u[N Jux}"=  < 8,,15=/K K KM  O[\ Jux|"<  ][b Jux!"B''DQQQ  <j 9 9<I^__< 1 15=##4VZB[B[B[2\ ] ] ,.BPUW W W  <j 9 9<I]kqrrr<j 9 9<I]kpqqq<j 9 9<*8fN N N	P  c[~ Jux""C  [D Jux!"B!&( ( (E[J Jux "A  K[P Jux&")'*OST"U"U"U%)  <j 9 9<I]^^a  Q[^ Jux&")'*OST"U"U"U%)  <j 9 9<I]^^a  _[l Jux&")'*OST"U"U"U%)  < 2OEYZZ< 2OEbcc< 2O^TT< 2OEZ[[< 2OEUVV<j 9 9<I]^^a  m[F Jux)"J  G[L Jux!"B  <j 9 9<I]^^a  M[X Jux"@  Y[` Jux*%)"K  <j 9 9<,13 3 3  <j 9 9<I]^^  < 8,H]^^a  a[~ Jux/%)"P< 1 15=##4VZB[B[B[2\ ] ] ,.K,1ZI I I  < 1 15=##4VZB[B[B[2\ ] ] ,n,13 3 3  <j 9 9<,13 3 3
  <j 9 9<I]^^a  [b Jux/"P  <j 9 9<,13 3 3  <j 9 9<I]^^a
 
 
c[x Jux#"D $(  <j 9 9<,13 3 3  <j 9 9<I]^^a  y[T Jux*%)"K  <j 9 9<I]^^a  U[b Jux!"B< 1 15=##4VZB[B[B[2\ ] ] ,.K,13 3 34
  <j 9 9<I]^^a  c[t Jux}"=. 	TT  </#+!4!4Z!@!@#(  	5  u[N Jux!"B  O[T Jux~">  <((+  U[b Jux~">  <((+  c[p Jux")'*MVZ"["["[(Q  q[x Jux"E(Q  y[@ Jux "A(M  A[H Jux"@. 	TT  </#+!4!4Z!@!@#(  	5  I[b Jux""C  < 8,disx  tA  sB  C  C  CE  c[n Jux}"=  o[t Jux"@  u[z Jux!"B  <j 9 9<I]^^< 8,disx  tA  sB  C  C  C	E  {[J Jux""C  <j 9 9<I]^^< 8,disx  tA  sB  C  C  C	E  K[Z Jux"@  <j 9 9<I]^^a  [[f Jux "A  <((+  g[t Jux""C  <((+  u[@ Jux "A  A[F Jux}"=. 	TT  </#+!4!4Z!@!@#(  	5  G[` Jux""C. 	TT  </#+!4!4Z!@!@#(  	5  a[z Jux!"B  <((+  {[H Jux}"=  <((+  I[T Jux|%)")'*HQU"V"V"V(L=	  U[` Jux|%)")'*HQV"W"W"W(L=	? ? ?a[j Jux}%)"=(L  <((+ >? ? ?k[z Jux'"H  {[@ Jux'"H$8<j 9 9<I],24 4 4<j 9 9<I],13 3 35  A[R Jux'"H$8<j 9 9<I],24 4 4<j 9 9<I],13 3 35  S[d Jux("I  e[j Jux("I$8<j 9 9<I],24 4 4<j 9 9<I],13 3 35  k[| Jux("I$8<j 9 9<I],24 4 4<j 9 9<I],13 3 35  }[N Jux}"=  <((+  O[\ Jux!"B  ][b Jux!"B  < 8,H\joppps  c[n Jux!"B  < 8,H\joppps  o[z Jux%"F(J  {[B  Jux%"F(J  C [J  Jux%"F(J  < 8,H\]]`  K [X  Jux%"F  Y [^  Jux%"F  < 8,H\joppps  _ [j  Jux%"F  < 8,H\joppps  k [	4
 [ [ [ [ [r:   