U
    9%e                 
   @   sB  d Z ddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZmZmZ ddlZddlZddlmZmZmZmZmZmZmZmZmZ ddddd	d
ddddg
Zedee dddZedee dddZedeeef dddZedddZ ee
 e	e
 dddZ!eee
 e
dddZ"eedZ#eedZ$eedZ%edeee
e	e f eee&f f dddZ'ee
e	e f dd dZ(d!d
 Z)edee dd"d#Z*ee+d$d%dZ,d&d Z-G d'd( d(Z.d)d* Z/d+d, Z0d-d. Z1d/d0 Z2ej3d1d2 Z4G d3d4 d4e.Z5ej3d5d Z6dS )6aE  
Python implementation of ``__torch_function__``

While most of the torch API and handling for ``__torch_function__`` happens
at the C++ level, some of the torch API is written in Python so we need
python-level handling for ``__torch_function__`` overrides as well. The main
developer-facing functionality in this file are handle_torch_function and
has_torch_function. See torch/functional.py and test/test_overrides.py
for usage examples.

Note
----
heavily inspired by NumPy's ``__array_function__`` (see:
https://github.com/pytorch/pytorch/issues/24015 and
https://www.numpy.org/neps/nep-0018-array-function-protocol.html
)

If changing this file in a way that can affect ``__torch_function__`` overhead,
please report the benchmarks in ``benchmarks/overrides_benchmark``. See the
instructions in the ``README.md`` in that directory.
    N)DictSetListAnyCallableIterableTypeTuple)	_has_torch_function_has_torch_function_unary_has_torch_function_variadic_add_docstr_push_on_torch_function_stack_pop_torch_function_stack_get_function_stack_at_len_torch_function_stack_is_torch_function_mode_enabledget_ignored_functionsget_overridable_functionsget_testing_overrideshandle_torch_functionhas_torch_functionresolve_nameis_tensor_likeis_tensor_method_or_propertywrap_torch_functionenable_reentrant_dispatch)returnc                  C   sr  t j} t jt jt jt jt jt jt jt j	t j
t jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt j t j!t j"t j#t j$t j%t j&t j't j(t j)t j*t j+t j,t j-t j.t j/t j0t j1t j2t j3t j4t j5t j6t j7t j8t j9t j:t j;t j<t j=t j>t j?t j@t jAt jBt jCt jDt jEt jFt jGt jHt jIt jJt jKt jLt jMt jNjOt jNjPt jNjQt jNjNt jNjt jNjt jRt jSjTt jSjUt jVt jWt jXt jYt jZt j[t j\t j]t j^t j_t j`t jat jbt jct jdt jet jft jgt jht jit jjt jkt jlt jmt jnt jot jpt jqt jrt jst jtt jut jvt jwt jxt jyt jzt j{t j|t j}t j~t jjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjjdt jjjt jjjRt jjjt jjjt jjjt jjjt jjjt jjjt jjjt jjttt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jjjt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt jt j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| j| jj| jj| j| j| j| j| j| j| j| jhS )a%  
    Return public functions that cannot be overridden by ``__torch_function__``.

    Returns
    -------
    Set[Callable]
        A tuple of functions that are publicly available in the torch API but cannot
        be overridden with ``__torch_function__``. Mostly this is because none of the
        arguments of these functions are tensors or tensor-likes.

    Examples
    --------
    >>> torch.Tensor.as_subclass in torch.overrides.get_ignored_functions()
    True
    >>> torch.add in torch.overrides.get_ignored_functions()
    False
    )torchTensortypenameZ	is_tensorZ
is_storageZset_default_tensor_typeZset_default_deviceZset_rng_stateZget_rng_stateZmanual_seedZinitial_seedseedsaveloadZset_printoptionsforkZget_default_dtypeZget_num_interop_threadsZget_num_threadsZinit_num_threadsZimport_ir_moduleZimport_ir_module_from_bufferZis_anomaly_enabledZis_anomaly_check_nan_enabledZis_grad_enabledZmerge_type_from_type_commentZparse_irZparse_schemaZparse_type_commentZset_anomaly_enabledZset_flush_denormalZset_num_interop_threadsZset_num_threadswaitZ	as_tensorZ
from_numpy
get_devicetensorZdefault_generatorZhas_cudaZ	has_cudnnZ
has_lapackdevicedtypeZfinfoZhas_mklZhas_mpsZ
has_mkldnnZ
has_openmpZiinfomemory_formatqschemeZset_grad_enabledZno_gradZenable_gradZinference_modeZis_inference_mode_enabledlayoutZalign_tensorsZarange
as_stridedZbartlett_windowZblackman_windowZbroadcast_shapesZcan_castcompileZcudnn_affine_grid_generatorZcudnn_batch_normZcudnn_convolutionZcudnn_convolution_transposeZcudnn_convolution_reluZcudnn_convolution_add_reluZcudnn_grid_samplerZcudnn_is_acceptableemptyZempty_permutedZempty_stridedZempty_quantizedZexportZconstrain_as_sizeZconstrain_as_valueZdynamic_dimeyefftZfftfreqZrfftfreq	from_filefullfillZhamming_windowZhann_windowZkaiser_windowZlinspaceZlogspaceZmkldnn_adaptive_avg_pool2dZmkldnn_convolutionZmkldnn_max_pool2dZmkldnn_max_pool3dZmkldnn_linear_backward_weightsZmkldnn_rnn_layernormalZonesZpromote_typesZrandZrandnrandintZrandpermrangeZresult_typeZscalar_tensorZsparse_coo_tensorZsparse_compressed_tensorZsparse_csr_tensorZsparse_csc_tensorZsparse_bsr_tensorZsparse_bsc_tensorZ	sym_floatZsym_intZsym_maxZsym_minZsym_notZsym_constrain_rangeZsym_constrain_range_for_sizeZtril_indicesZtriu_indicesvanderzerosZ_jit_internalZboolean_dispatchnn
functionalZassert_int_or_pairZupsampleZupsample_bilinearZupsample_nearestr   has_torch_function_unaryhas_torch_function_variadicr   sigmoidZhardsigmoidtanhZ_canonical_maskZ_none_or_dtypeinitZcalculate_gainuniformconstantZdiracZxavier_uniformZxavier_normalZkaiming_uniformZkaiming_normalZ
orthogonalsparsenestedZto_padded_tensorZset_autocast_enabledZis_autocast_enabledZclear_autocast_cacheZset_autocast_cpu_enabledZis_autocast_cpu_enabledZset_autocast_xla_enabledZis_autocast_xla_enabledZset_autocast_ipu_enabledZis_autocast_ipu_enabledZset_autocast_cpu_dtypeZget_autocast_cpu_dtypeZset_autocast_ipu_dtypeZget_autocast_ipu_dtypeZget_autocast_gpu_dtypeZset_autocast_gpu_dtypeZget_autocast_xla_dtypeZset_autocast_xla_dtypeZautocast_increment_nestingZautocast_decrement_nestingZis_autocast_cache_enabledZset_autocast_cache_enabledZ	hardswishZis_vulkan_availableZ$are_deterministic_algorithms_enabledZuse_deterministic_algorithmsZ-is_deterministic_algorithms_warn_only_enabledZset_deterministic_debug_modeZget_deterministic_debug_modeZset_float32_matmul_precisionZget_float32_matmul_precisionZunify_type_listZis_warn_always_enabledZset_warn_alwaysZvitals_enabledZ	set_vitalZread_vitalsZvmapZ
frombufferZasarrayZ_functional_sym_constrain_rangeZ_make_dep_token__delitem____dir____getattribute____init____iter____init_subclass____delattr____setattr____torch_function__Z__torch_dispatch____new__	__class____subclasshook____hash__Zas_subclasseiglstsqZ	reinforcenewZ
new_tensorZ	new_emptyZnew_empty_stridedZ	new_zerosZnew_onesZnew_fullZ_make_subclasssolveZsymeigstride	unflattenZto_sparse_cooZto_sparse_csrZto_sparse_cscZto_sparse_bsrZto_sparse_bscZ
_to_sparseZ_to_sparse_csrZ_to_sparse_cscZ_to_sparse_bsrZ_to_sparse_bscZ_typed_storageZ_reduce_ex_internalZ_fix_weakrefZ
_view_funcZ_make_wrapper_subclassZ_python_dispatch__get__Z_has_symbolic_sizes_stridesZ_conjZ_conj_physicalZ	_neg_viewZ_is_zerotensorZ_is_all_trueZ_is_any_trueZ_addmm_activationr    rZ   N/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/torch/overrides.pyr   4   s    c                  C   s   t j} | jj| jj| jjhS )a  
    Return public functions that do not wrap in a subclass when invoked by
    the default ``Tensor.__torch_function__`` that preserves subclasses.  Typically,
    these functions represent field accesses (i.e., retrieving a Tensor that
    is stored somewhere on the Tensor) as opposed to computation.  Users of
    these functions expect object identity to be preserved over multiple accesses
    (e.g., ``a.grad is a.grad``) which cannot be upheld if we're wrapping on
    the fly every time (furthermore, the tensor stored here might already be
    the subclass, in which case wrapping really ought not to happen).

    Not ALL property accessors have this property; for example ``Tensor.T`` actually
    just creates a new transposed tensor on the fly, and so we SHOULD interpose on
    these calls (you need to check the implementation of the function to see if
    this is the case or not).  Additionally, if a property accessor doesn't return a Tensor,
    it doesn't have to be on this list (though it is harmless if it is).
    )r   r   _baserX   grad_gradrY   rZ   rZ   r[   get_default_nowrap_functionsI  s
    r_   c            
   F  C   sp>  t j} t jdddt jdddt jdd t jdd t jdddt jdd t jdd	dt j	dd
dt j
dddt jdddt jdddt jdddt jdddt jdddt jdddt jdddt jdd t jdddt jdddt jdddt jdddt jdddt jdddt jdddt jdddt jd d t jd!d t jdd"dt jdd#dt jd$d t j dd%dt j!dd&dt j"dd'dt j#d d(dt j$dd)dt j%dd*dt j&dd+dt j'dd,dt j(dd-dt j)d.d t j*d/d t j+d0d t j,dd3dt j-dd4dt j.d5d t j/d6d t j0d7d t j1d8d t j2d9d t j3d:d t j4d;d t j5d<d t j6dd=dt j7d>d t j8d	d@dt j9d
dAdt j:ddBdt j;ddCdt j<ddDdt j=ddEdt j>ddFdt j?ddGdt j@ddHdt jAdId t jBddJdt jCdKd t jDdLd t jEddMdt jFdNd t jGddOdt jHddPdt jIddQdt jJddTdt jKddUdt jLddWdt jMddXdYdt jNdZd t jOdd[dt jPjOdd\dt jPjQdd]dt jRdd^dt jSdd_dt jTd`d t jUddadt jVd dbdt jWd!dcdt jXd"dddt jYd#dedt jZd$dfdt j[d%dgdt j\dhd t j]d&djdt j^dkd t j_d'dldt j`dmd t jPjad(dndt jbd)dodt jcd*dpdt jdd+dqdt jed,drdt jfd-dsdt jgd.dtdt jhd/dudt jid0dvdt jjdwd t jkd1dxdt jld2dydt jmd3dzdt jnd4d{dt jod|d t jpd5d}dt jqd6d~dt jrd7ddt jsd8ddt jtdd t jud9ddt jPjud:ddt jvd;ddt jwd<ddt jxd=ddt jyd>ddt jzd?ddt j{d@ddt j|dAddt j}dBddt j~dd t jdd t jPjdd t jdd t jdCddt jdDddt jdEddt jdFddt jdGddt jPjdHddt jdIddt jdJddt jdKddt jdLddt jdMddt jdNddt jdOddt jdPddt jdd t jdd t jdd t jdQddt jPjdRddt jPjdSddt jPjdTddt jPjdUddt jdd t jdVddt jdWddt jdXddt jdYddt jdd t jdZddt jd[ddt jd\ddt jd]ddt jd^ddt jd_ddt jdd t jdd t jd`ddt jdd t jdd t jdd t jdd t jdd t jdd t jdd t jdd t jdd t jjdaddt jjdbddt jjdcddt jjddddt jjdeddt jjdfddt jjdgddt jjdhddt jjdiddt jjdjddt jjdkddt jjdlddt jjdmddt jjdnddt jjdoddt jjdpddt jjdqddt jjdrddt jjdsddt jjdtddt jduddt jÐdvddt jdd t jdd t jdd t jǐdwddt jȐdxddt jdd t jʐdyddt jːdzddt j̐d{ddt j͐d|ddt jddt jddfddt jdd t jѐd}ddt jҐd~ddt jӐdddt jԐdddt jՐdddt j֐dddt jאdddt jؐdddt jِdddt jڐdddt jېdddt jdd t jdd t jdd t jߐdddt jdd t jdddt jdddt jdddt jdddt jdddt jdddt jdddt jdddt jdddt jPjdd t jdd dt jdd t jdddt jdddt jdddt jdddt jdddt jdd t jdd t jdd	dt jdd
dt jdd t jdddt jdd t jdddt jdd t jdd t jdddt jdddt jdd t jdd t j dddt jPjdddt jPjdddt jdd t jdd t jdd t jdd t jdd t jdd t j	dd t j
dd t jd d t jdd!dt jd"d t jdd#dt jdd$dt jd%d t jdd&dt jPjdd'dt jPjdd(dt jPjdd)dt jdd*dt jdd+dt jdd,dt jdd-dt jdd.dt jdd/dt jdd0dt jdd1dt jdd2dt jdd3dt jdd4dt j dd5dt j!dd6dt j"dd7dt j#dd8dt j$d9d t j%dd:dt j&dd;dt j'dd<dt j(dd=dt j)dd>dt j*dd?dt j+dd@dt j,dAd t j-ddBdt j.ddCdt j/ddDdt j0ddEdt j1ddFdt j2dÐdGdt j3dHd t j4dId t j5dĐdJdt j6dŐdKdt jPj0dƐdLdt jPj7dǐdMdt jPj8dȐdNdt jPj1dɐdOdt jPj6dʐdPdt j9dQd t jPj9dːdRdt jPj:d̐dSdt jPj;d͐dTdt j<dUd t jPj<dVd t j=dΐdWdt j>dϐdXdt j?dАdYdt j@dѐdZdt jAdҐd[dt jBdӐd\dt jCdԐd]dt jDdՐd^dt jEd֐d_dt jFdאd`dt jGdؐdadt jHdbd t jIdِdcdt jJdڐdddt jKdېdedt jLdfd t jMdgd t jNdhd t jOdid t jPdjd t jQdkd t jRdld t jSdܐdmdt jTdݐdndt jUdod t jVdpd t jWdސdqdt jXdߐdrdt jYddsdt jZddtdt j[ddudt j\dvd t j]dwd t j^ddydt j_dzd t j`d{d t jad|d t jbdd}dt jcd~d t jddddt jedd t jfdddt jgdddt jhdddt jidddt jjdddt jkjljmdd t jkjljndd t jkjljdddt jkjljodddt jkjljpdddt jkjljqdddt jkjljrdddt jkjljsdddt jkjljtdddt jkjljdddt jkjljudddt jkjljvdddt jkjlj.dddt jkjlj7dddt jkjljwdddt jkjlj8dddt jkjljLdddt jkjljqdddt jkjljxdddt jkjljvdddt jkjljdddt jkjljydddt jkjljzdddt jkjlj{d ddt jkjlj|dddt jkjljdddt jkjljdddt jkjljdddt jkjlj}dddt jkjlj~dddt jkjljdddt jkjljdddt jkjljd	ddt jkjljd
ddt jkjljdddt jkjljdddt jkjljdddt jkjljߐdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdddt jkjljdd t jkjljdddt jkjljdddt jkjlj2dddt jkjlj@dddt jkjljCd ddt jkjljAd!ddt jkjljd"ddt jkjljBd#ddt jkjljd$ddt jkjljd%ddt jkjljd&ddt jkjljd'ddt jkjljd(ddt jkjljd)ddt jkjljd*ddt jkjljd+ddt jkjljd,ddt jkjljd-ddt jkjljd.ddt jkjljd/ddt jkjljd0ddt jkjljd1ddt jkjljd2ddt jkjljdd t jkjljd3ddt jkjljd4ddt jkjljd5ddt jkjljd6ddt jkjljd7ddt jkjljd8ddt jkjljd9ddt jkjljd:ddt jkjljd;ddt jkjljd<ddt jkjljd=ddt jkjljd>ddt jkjljd?ddt jkjljd@ddt jkjljdd t jkjljdd t jkjljdAddt jkjljdBddt jkjljddVdd?dddt jkjljdCddt jkjjdDddt jkjjdEddt jkjjdd t jkjjdFddt jdGddt jdd ddt jdd t jdHddt jPjdIddt jPjdJddt jPjdKddt jdLddt jdMd	dt jd
d t jÐdd t jĐdNddt jdOddt jŐdd t jƐdPddt jǐdQddt jȐdRddt jPjɐdSddt jʐdd t jːdd t j̐dTddt jdd t j͐dUddt jΐdVddt jdd t jϐdWddt jАdXddt jѐdYddt jҐdZddt jӐdd t jԐd d t jՐd!d t j֐d"d t jאd#d t jؐd[d$dt jPjؐd\d&dt jِd]d(dt jڐd^d)dt jېd*d t jܐd+d t jݐd,d t jސd-d t jߐd.d t jd/d t jt d0d1dfd2dt jt d3d4dfd5dt jt d6d7dfd8dt jd9d t jd:d t jd_d;dt jd`d<dt jdt jddfd=dt jdad>dt jd?d t jdbd@dt jdcdAdt jPjdddBdt jdCd t jdDd t jdedEdt jdfdFdt jdgdGdt jdhdHdt jdidIdt jdJd t jdKd t jdjdLdt jdMd t jdkdNdt jdldOdt jdmdQdt jdndRdt jdodSdt jdTd t jdpdUdt jdqdVdt j drdWdt jdsdXdt jdYd t jdZd t jdtd[dt jdud\dt jdvd^dt jd_d t jd`d t j	dwdadt jdxdbdt j
dydcdt jdzdddt jd{dedt jd|dfdt jd}dgdt jd~dhdt jddidt jdjd t jPjdkd t jdld t jdmd t jddndt jPjddodt jPjddpdt jddddqdrdt jddsdt jddtdt jddudt jddvdt jddwdt jddxdt jddydt jddzdt jdd{dt j dd}dt j!dd~dt j"dddt j#dddt j$dddt j%dddt j&dddt jPj%dddt jPj'dddt j(dd t j)dd t j*j+dd t j*j,dd t j*j-dd t j*j.dd t j*j/dd t j*j0dddt j*j1dddt j*j2dddt j*j3dddt j*jdd t j*j4dd t j*jdd t j*jdd t j*j5dd t j*jdd t j*jdd t j*j6dd t j*jdd t j*j7dddt j*j8dddt j*j9dd t j*j:dddt j*j;dddt j*jאdd t j*j<dd t j*j=dd t j*j>dd t j*j?dddt j*j@dddt j*j dd t j*jAdd t j*jdddt j*j*dd t j*j+dddt j*jBdd t j*jCdd t j*jDdd t j*jEdd t j*jFdd t j*jGdd t j*jHdd t j*j͐dddt j*jIdd t j*jdd t j*jJdd t j*jKdd t j*jLdddt j*jMdddt j*jNdddt j*jOdddt j*jdd t j*jdddt j*jPdd t j*jQdddt j*j%dddt j*jRdddt jSdd t jTdd t jUdddt jVdddt jWdddt jPjXdddt jPjYdddt jZdddt j[dddt jdddt j\dd t j]dddt j^dd t j_dd t j`dddt jadddt jbdddt jPjcdddt jddddt jdddt jedddt jfdd t jgdddt jhdddt jidd t jjdddt jkdddt jldddt jmdddt jndddt jodddt jPjpdÐddt jqdĐddt jrdŐddt jsdd t jtdƐddt judǐddt jvdȐddt jwdd t jxdd t jydd t jzdd t j{dd t j|dd t j}dɐddt j~dd t jdʐddt jddddt jdd t jdd t jdd t jdd t jdd t jdːddt jd̐ddt jd͐ddt jdd t jdd t jdd t jdd t jdd t jdd t jd d t jdd t jdd t jdd t jdd t jdd t jdΐddt jdd t jdd t jd	d | jd
d | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jdd | jd d | jd!d | jd"d | jd#d | jd$d | jd%d | jd&d | jd'd | jd(d | jd)d | jd*d | jd+d | jd,d | jdd-d.d| jd/d | jd0d | jjd1d | jjd2d | jjd3d | jÐjd4d | jĐjd5d | jŐjd6d | jƐjd7d | jǐjd8d | jȐjd9d | jɐjd:d | jʐjd;d | jːjd<d | j̐jd=d | j͐d>d | jΐd?d | jϐjd@d | jАjdAd | jѐjdBd | jҐjdCd | jӐjdDd | jԐjdEd | jՐjdFd | j֐jdGd | jאjdHd | jؐjdId | jِjdJd | jڐjdKd | jېjdLd | jܐjdMd | jݐjdNd | jސjdOd | jߐjdPd | jjdQd | jjdRd | jjdSd | jjdTd | jjdUd | jjdVd | jjdWd | jjdXd | jjdYd | jjdZd | jjd[d | jjd\d | jjd]d | jjd^d | jjd_d | jdϐd`d| jdad | jdbd | jdcd | jddd | jded | jdfd | jdgd | jdhd | jdid | jdjd | jdkd | jdld | jdmd | jdnd | jdod | jdpd | jdqd | jdАdrd| jt j fdsd| jt j fdtd| jt j fdud| jt j fdvd| jdddwdxd| jdyd | jdzd | jt jfd{d| j	dҐd|d| j
t j fd}d| jt j fd~d| jt j fdd| jt j fdd| jdd | jdd | jdӐdd| jdd | jdd | jt j fdd| jt j fdd| jdd | jdd | jdd | jdddwdd| jdd | jdd | jt j fdd| jt j fdd| jddwdd| jdd | jt j fdd| jt j fdd| j dd | j!dd | j"t j fdd| j#dd | j$dd | jdd | j%dd | j&dd | j'dd | j(dd | j)dddwdd| jdd | j*t j fdd| j+dd | j,dd | jSdd | jdd | j-dd | j.dd | j/dd | j0dd | j1dd | jdd | j2dd | jŐdd | j3dd | j4d֐dd| j5dd | j6dddwdd| j7dd | j8dd | j9dd | j:dd | j;dd | j<dd | j=dؐdd| j>dd | j?dd | j@dd | jAdd | jBdd | jCdd | jDdِdd| jdd | jEdd | jFt j fdd| jGdd | j	dڐdd| jHdd | jIdd | jJdېdd| jKdd | jLdd | jdܐdd| jMdd | jNdd | jOdd | jPdd | jQdd | j\dd | jRddt j fdd| jSdddќdd| jTdސdd| jUdd | jVdd | jWdd | jXdd | jdd | jdߐdd| jYdd | jZdd | j[dd | j\dd | j]ddd| j^dd t jPj_dddi}i }t` }|a D ]\}}|jb|jbd d|jb d d|jb d d|jb d g}|jbcd>r|jbtddd }|ed| d d| d d| d g |D ]<}tf| |d}	tg|	>r|	|k>r|	|k>r|||	< >q=qd|h| |S (  ar  Return a dict containing dummy overrides for all overridable functions

    Returns
    -------
    Dict[Callable, Callable]
        A dictionary that maps overridable functions in the PyTorch API to
        lambda functions that have the same signature as the real function
        and unconditionally return -1. These lambda functions are useful
        for testing API coverage for a type that defines ``__torch_function__``.

    Examples
    --------
    >>> import inspect
    >>> my_add = torch.overrides.get_testing_overrides()[torch.add]
    >>> inspect.signature(my_add)
    <Signature (input, other, out=None)>
    Nc                 S   s   dS NrZ   inputoutrZ   rZ   r[   <lambda>      z'get_testing_overrides.<locals>.<lambda>c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   output_sizerZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )inputsrh   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   otherrd   rZ   rZ   r[   re     rf      c                 S   s   dS r`   rZ   rc   Zbatch1Zbatch2alphabetard   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   Ztensor1Ztensor2valuerd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rq   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   mat1mat2rp   ro   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   matvecrp   ro   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Zvec1vec2rp   ro   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   thetasizealign_cornersrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   dimrZ   rZ   r[   re     rf   h㈵>:0yE>Fc                 S   s   dS r`   rZ   )rc   rl   Ztrolatol	equal_nanrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   ptraininplacerZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r~   keepdimrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   msgrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                  W   s   dS r`   rZ   tensorsrZ   rZ   r[   re     rf   c                  W   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                  W   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   r   Tc                 S   s   dS r`   rZ   )rc   kernel_sizerV   padding	ceil_modecount_include_padrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rn   rZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   )	rc   weightbiasrunning_meanrunning_vartrainingmomentumepscudnn_enabledrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )grad_outrc   meaninvstdr   Zsum_dyZ
sum_dy_xmuZcount_tensorrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   rc   r   r   r   Zinput_gZweight_gZbias_grZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   r   r   r   r   r   countrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   	generatorrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   input1input2r   r   rZ   rZ   r[   re     rf   r   c                 S   s   dS r`   rZ   rc   targetr   size_averagereduce	reductionZ
pos_weightrZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   )rc   weightsZ	minlengthrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   Zprobr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                  W   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   ru   rd   rZ   rZ   r[   re     rf   c                  W   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   selfr{   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Z
boundaries	out_int32rightrd   rZ   rZ   r[   re     rf   c                  W   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   r~   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf          @#use_mm_for_euclid_dist_if_necessaryc                 S   s   dS r`   rZ   )x1x2r   Zcompute_moderZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf         ?c                 S   s   dS r`   rZ   rc   ro   r   rZ   rZ   r[   re     rf   )rd   c                 W   s   dS r`   rZ   )rd   ZmatricesrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   groupsrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   upperrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   check_errorsrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   numelZn_binsratioZ	bit_widthrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   chunksr~   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   minmaxrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Z
correctionZfweightsZaweightsrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf      c                 S   s   dS r`   rZ   )rc   rZwith_replacementrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )realimagrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )absangrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   ordrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   padrr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   r   rV   r   dilationr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   )	rc   r   r   rV   r   r   Z
transposedZoutput_addingr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   r   rV   r   output_paddingr   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   r   r   marginr   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r   r~   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rl   r~   rd   rZ   rZ   r[   re     rf   ra   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   Z	log_probstargetsZinput_lengthsZtarget_lengthsblankr   Zzero_infinityrZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rc   r~   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r~   rd   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   yxr~   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re      rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   diagonalrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   offsetrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   nr~   prependappendrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   dim1dim2rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   srcr   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r   r{   rV   storage_offsetrZ   rZ   r[   re   	  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   
  rf   c                 S   s   dS r`   rZ   )rc   rl   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rl   Zrounding_moderd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   ru   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rt   ru   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   indices_or_sectionsrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   Lc                 S   s   dS r`   rZ   rc   ZUPLOrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 W   s   dS r`   rZ   )ZequationZoperandsrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   padding_idxmax_norm	norm_typescale_grad_by_freqrC   rZ   rZ   r[   re     s    c
           
      S   s   dS r`   rZ   )
rc   r   offsetsr   r   r   moderC   per_sample_weightsr   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rc   r)   r,   r(   requires_gradrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rl   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re      rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   !  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   "  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   #  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   $  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   %  rf   c                 S   s   dS r`   rZ   )rc   scale
zero_pointaxis	quant_min	quant_maxrZ   rZ   r[   re   &  rf   c                 S   s   dS r`   rZ   )rc   r   r   r   r   rZ   rZ   r[   re   '  rf   c                 S   s   dS r`   rZ   )r   Zobserver_onZfake_quant_onZaveraging_constZrunning_minZrunning_maxr   r   r   r   Zch_axisZper_row_fake_quantZsymmetric_quantrZ   rZ   r[   re   (  s    c                 S   s   dS r`   rZ   rc   Zpacked_weightr   rZ   rZ   r[   re   +  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   ,  rf   c                 S   s   dS r`   rZ   rc   r   packedZcol_offsetsZweight_scaleZweight_zero_pointr   rZ   rZ   r[   re   -  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   .  s    c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   0  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   1  rf   c                 S   s   dS r`   rZ   )rc   abrZ   rZ   r[   re   2  rf   c                 S   s   dS r`   rZ   rc   r   r   rZ   rZ   r[   re   3  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   4  rf   c                 S   s   dS r`   rZ   rc   r   r~   normrZ   rZ   r[   re   5  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   6  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   7  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   8  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   9  rf   r   ra   c                 S   s   dS r`   rZ   rc   sr~   r  rZ   rZ   r[   re   :  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ;  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   <  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   =  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   >  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ?  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   @  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   A  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   B  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   C  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   D  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   E  rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re   F  rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re   G  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   H  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   I  rf   c                 S   s   dS r`   rZ   )rc   Z	start_dimZend_dimrZ   rZ   r[   re   J  rf   c                 S   s   dS r`   rZ   rc   dimsrZ   rZ   r[   re   K  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   L  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   M  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   N  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   O  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   P  rf   c                 S   s   dS r`   rZ   rc   exponentrd   rZ   rZ   r[   re   Q  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   R  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   S  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   T  rf   c                 S   s   dS r`   rZ   )rc   
fill_valuerd   r)   r,   r(   r   rZ   rZ   r[   re   U  rf   c                 S   s   dS r`   rZ   )rc   r   Z	dep_tokenrZ   rZ   r[   re   V  rf   c                 S   s   dS r`   rZ   )LU_data	LU_pivotsZunpack_dataZunpack_pivotsrZ   rZ   r[   re   W  rf   c                 S   s   dS r`   rZ   )rc   r~   indexrd   Zsparse_gradrZ   rZ   r[   re   X  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   Y  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   Z  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   [  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   \  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   ]  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   ^  rf   c                 S   s   dS r`   rZ   rc   rx   rd   rZ   rZ   r[   re   _  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   `  rf   c                 S   s   dS r`   rZ   )rc   spacingr~   Z
edge_orderrZ   rZ   r[   re   a  rf   c                 S   s   dS r`   rZ   rc   gridZinterpolation_modepadding_moder|   rZ   rZ   r[   re   b  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   c  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   d  rf   c                 S   s   dS r`   rZ   )rc   
num_groupsr   r   r   r   rZ   rZ   r[   re   e  rf   c	           	      S   s   dS r`   rZ   	rc   hxparams
has_biases
num_layersdropoutr   bidirectionalbatch_firstrZ   rZ   r[   re   f  rf   c                 S   s   dS r`   rZ   rc   r  w_ihw_hhb_ihb_hhrZ   rZ   r[   re   g  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   h  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   i  rf         ?c                 S   s   dS r`   rZ   rc   lambdrZ   rZ   r[   re   j  rf   c                 S   s   dS r`   rZ   )rc   valuesrd   rZ   rZ   r[   re   k  rf   c                 S   s   dS r`   rZ   rc   r   r   r   r   r   rZ   rZ   r[   re   l  rf   d   c                 S   s   dS r`   rZ   )rc   binsr   r   rd   rZ   rZ   r[   re   m  rf   c                 S   s   dS r`   rZ   )rc   r'  r   r   r   densityrd   rZ   rZ   r[   re   n  rf   c                 S   s   dS r`   rZ   )rc   r'  r7   r   r(  rZ   rZ   r[   re   o  rf   c                 S   s   dS r`   rZ   rc   taurZ   rZ   r[   re   p  rf   c                 S   s   dS r`   rZ   )rt   ru   rd   rZ   rZ   r[   re   q  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   r  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   s  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   t  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   u  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   v  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   w  rf   c                 S   s   dS r`   rZ   rc   r~   r  sourcerZ   rZ   r[   re   x  rf   c                 S   s   dS r`   rZ   r+  rZ   rZ   r[   re   y  rf   c                 S   s   dS r`   rZ   )rc   indicesr$  
accumulaterZ   rZ   r[   re   z  rf   c                 S   s   dS r`   rZ   )rc   r~   r  rd   rZ   rZ   r[   re   {  rf   c                 S   s   dS r`   rZ   )rc   r~   r  rr   rZ   rZ   r[   re   |  rf   c                 S   s   dS r`   rZ   )rc   r~   r  r,  r   Zinclude_inputrZ   rZ   r[   re   }  rf   c                 S   s   dS r`   rZ   r'   rZ   rZ   r[   re   ~  rf   c                 S   s   dS r`   rZ   )eteZassume_uniqueinvertrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r/  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r/  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   )	rc   r   r   r   r   use_input_statsr   r   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rl   Zrtolr   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c
           
      S   s   dS r`   rZ   )
rc   n_fft
hop_length
win_lengthwindowcenter
normalizedonesidedlengthreturn_complexrZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rc   r   r   r   r   Z
log_targetrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   kr~   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   	hermitianr   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r?  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )ZLDpivotsBr?  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   normalized_shaper   r   Zespr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   endr   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r>  rA  Xr   ZiKnitertollargestmethodtrackerZortho_iparamsZortho_fparamsZortho_bparamsrZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r~   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   namesr   rd   rZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   )	databatch_sizesr  r  r  r  r  r   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )Apivot	get_infosrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r  r  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   maskrr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rQ  r,  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rQ  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rO  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rR  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rO  r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )ZLUr@  rA  leftadjointrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rF  r?  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   rV   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rV  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rV  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   rV   r   r   return_indicesr   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r~   r   r)   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                  _   s   dS r`   rZ   )r   kwargsrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   Zexponential_average_factorepsilonrZ   rZ   r[   re     s    c	           	      S   s   dS r`   rZ   	rc   r   r   r   rV   r   r   	benchmarkdeterministicrZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   )	rc   r   zro   r   rV   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c
           
      S   s   dS r`   rZ   )
rc   r   r   r   r   rV   r   r   r\  r]  rZ   rZ   r[   re     s    c	           	      S   s   dS r`   rZ   r[  rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   )rc   r   Zweight_stride0r  Zcxr   Zhidden_sizer  r  r  r   r  rM  Zdropout_staterZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r,  destinationrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r_  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   
descendingrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Znum_samplesreplacementrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rw   rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r~   startr;  rZ   rZ   r[   re     rf           c                 S   s   dS r`   rZ   )rc   nanZposinfZneginfrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rB  r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   NCZHxWgroupr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r~   r   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rg   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rg   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   rh   rX  rZ   rZ   r[   re      rf   c                 S   s   dS r`   rZ   rk  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   ry   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   rV   r   r   r   Zdivisor_overriderZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rm  rZ   rZ   r[   re   
  s    皙?c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   r   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   r   r   r   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   )rc   r   r   r   ignore_indexr   r   Zlabel_smoothingrZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rl  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rl  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rl  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rl  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   r   rC   r   Zinclude_last_offsetr   rZ   rZ   r[   re   !  s    c                 S   s   dS r`   rZ   rl  rZ   rZ   r[   re   $  rf   c                 S   s   dS r`   rZ   )rc   rh   r   r   r   rV   rZ   rZ   r[   re   %  rf   c                 S   s   dS r`   rZ   rc   r   rh   Zoutput_ratiorX  Z_random_samplesrZ   rZ   r[   re   &  s    c                 S   s   dS r`   rZ   rr  rZ   rZ   r[   re   )  s    c                 S   s   dS r`   rZ   rr  rZ   rZ   r[   re   +  s    c                 S   s   dS r`   rZ   rr  rZ   rZ   r[   re   .  s    ư>c                 S   s   dS r`   rZ   )rc   r   varr3   r   r   rZ   rZ   r[   re   0  rf   nonec                 S   s   dS r`   rZ   )rc   ZapproximaterZ   rZ   r[   re   1  rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re   2  rf   bilinearr9   c                 S   s   dS r`   rZ   )rc   r  r   r  r|   rZ   rZ   r[   re   3  rf   c                 S   s   dS r`   rZ   )rc   r  r   r   r   rZ   rZ   r[   re   4  rf   绽|=c                 S   s   dS r`   rZ   )Zlogitsr*  hardr   r~   rZ   rZ   r[   re   5  rf   c                 S   s   dS r`   rZ   r"  rZ   rZ   r[   re   6  rf         c                 S   s   dS r`   rZ   )rc   Zmin_valZmax_valr   rZ   rZ   r[   re   7  rf   c                 S   s   dS r`   rZ   r%  rZ   rZ   r[   re   8  s    c                 S   s   dS r`   rZ   )rc   r   r   r   r   r3  r   r   rZ   rZ   r[   re   :  s    nearestc                 S   s   dS r`   rZ   )rc   r{   Zscale_factorr   r|   Zrecompute_scale_factorZ	antialiasrZ   rZ   r[   re   <  s    c                 S   s   dS r`   rZ   r=  rZ   rZ   r[   re   >  rf   c                 S   s   dS r`   rZ   rc   r   r   r   r   rZ   rZ   r[   re   ?  rf   c                 S   s   dS r`   rZ   rg  rZ   rZ   r[   re   @  rf   {Gz?c                 S   s   dS r`   rZ   )rc   Znegative_sloper   rZ   rZ   r[   re   A  rf   c                 S   s   dS r`   rZ   )rc   r   r   rZ   rZ   r[   re   B  rf   -C6?      ?c                 S   s   dS r`   rZ   )rc   r{   ro   rp   r>  rZ   rZ   r[   re   C  rf      c                 S   s   dS r`   rZ   rc   r~   Z_stacklevelr)   rZ   rZ   r[   re   D  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   E  rf   c                 S   s   dS r`   rZ   rc   r   r   rV   r   rZ   rZ   r[   re   F  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   G  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   H  s    c                 S   s   dS r`   rZ   rc   r   rV   r   r   r   rX  rZ   rZ   r[   re   J  s    c                 S   s   dS r`   rZ   rW  rZ   rZ   r[   re   L  s    c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   N  s    c                 S   s   dS r`   rZ   rW  rZ   rZ   r[   re   P  s    c                 S   s   dS r`   rZ   rW  rZ   rZ   r[   re   R  s    c                 S   s   dS r`   rZ   rW  rZ   rZ   r[   re   T  s    c                 S   s   dS r`   rZ   rc   r-  r   rV   r   rh   rZ   rZ   r[   re   V  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   W  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   X  rf   c                 S   s   dS r`   rZ   r{  rZ   rZ   r[   re   Y  rf   c                 S   s   dS r`   rZ   )querykeyrr   Zembed_dim_to_checkZ	num_headsZin_proj_weightZin_proj_biasZbias_kZbias_vZadd_zero_attn	dropout_pZout_proj_weightZout_proj_biasr   Zkey_padding_maskZneed_weights	attn_maskZuse_separate_proj_weightZq_proj_weightZk_proj_weightZv_proj_weightZstatic_kZstatic_vZaverage_attn_weightsZ	is_causalrZ   rZ   r[   re   [  s    c                 S   s   dS r`   rZ   )rc   r   r   r   r   r   r   r   rZ   rZ   r[   re   _  s    c                 S   s   dS r`   rZ   r{  rZ   rZ   r[   re   a  s    c                 S   s   dS r`   rZ   ro  rZ   rZ   r[   re   c  s    c                 S   s   dS r`   rZ   )rc   r   r   r   rq  r   r   rZ   rZ   r[   re   e  s    -q=c                 S   s   dS r`   rZ   )rc   r   r~   r   rd   rZ   rZ   r[   re   g  rf   c                 S   s   dS r`   rZ   )r'   Znum_classesrZ   rZ   r[   re   h  rf   rB   c                 S   s   dS r`   rZ   )rc   r   r   rr   rZ   rZ   r[   re   i  rf   c                 S   s   dS r`   rZ   r   r   r   r   r   rZ   rZ   r[   re   j  rf   c                 S   s   dS r`   rZ   )rc   r   	log_inputr3   r   r   r   r   rZ   rZ   r[   re   k  s    c                 S   s   dS r`   rZ   rc   r   rZ   rZ   r[   re   m  rf   c                 S   s   dS r`   rZ   rc   r   rZ   rZ   r[   re   n  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   o  rf         ?UUUUUU?c                 S   s   dS r`   rZ   rc   lowerr   r   r   rZ   rZ   r[   re   p  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   q  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   r  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   s  rf   c                 S   s   dS r`   rZ   )r  r  rr   r  r  rZ   rZ   r[   re   t  rf   c                 S   s   dS r`   rZ   )rc   r   r   r   r   rp   rZ   rZ   r[   re   u  rf   c                 S   s   dS r`   rZ   )rc   r   r   deltarZ   rZ   r[   re   v  rf   c                 S   s   dS r`   rZ   r{  rZ   rZ   r[   re   w  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   x  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   y  rf      c                 S   s   dS r`   rZ   )rc   rp   	thresholdrZ   rZ   r[   re   z  rf   c                 S   s   dS r`   rZ   r"  rZ   rZ   r[   re   {  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   |  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   }  rf   c                 S   s   dS r`   rZ   rc   r  rr   r   rZ   rZ   r[   re   ~  rf   c
           
      S   s   dS r`   rZ   
anchorpositivenegativer   r   r   swapr   r   r   rZ   rZ   r[   re     s    )distance_functionr   r  r   c                S   s   dS r`   rZ   )r  r  r  r  r   r  r   rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   )rc   r   r   r   rV   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r'   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r'   r   stdrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r'   valrZ   rZ   r[   re     rf   fan_in
leaky_reluc                 S   s   dS r`   rZ   )r'   r   r   ZnonlinearityrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   as_tuplerZ   rZ   r[   re     rf   )r
  c                S   s   dS r`   rZ   )rc   r{   r
  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   froc                 S   s   dS r`   rZ   rc   r   r~   r   rd   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r   r~   r   rd   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )vpowr~   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r)  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   Zinput3rS  	transposerZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   r~   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   qr8  rE  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc  rZ   rZ   r[   re     rf   V瞯<c                 S   s   dS r`   rZ   )rc   rcondrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r  r?  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Zupscale_factorrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Zdownscale_factorrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r  r3   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r  r,  r.  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   somerd   rZ   rZ   r[   re     rf   reducedc                 S   s   dS r`   rZ   )rc   r   rd   rZ   rZ   r[   re     rf   linearc                 S   s   dS r`   rZ   rc   r  r~   r   interpolationrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   scalesZzero_pointsr   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r)   Zreduce_rangerZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r   r   rt  r   Zoutput_scaleZoutput_zero_pointrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r  r  r  r  r   Z	packed_ihZ	packed_hhZcol_offsets_ihZcol_offsets_hhZscale_ihZscale_hhZzero_point_ihZzero_point_hhrZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     s    )r   )rm   c                 S   s   dS r`   rZ   rV  rZ   rZ   r[   re     s    )r   r   )rm   rm   c                 S   s   dS r`   rZ   rV  rZ   rZ   r[   re     s    )r   r   r   )rm   rm   rm   c                 S   s   dS r`   rZ   rV  rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     s    c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   highr)   r,   r(   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r~   Zmaxnormrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   shaperZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c	           	      S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Zshiftsr  rZ   rZ   r[   re     rf   r   rm   c                 S   s   dS r`   rZ   )rc   r>  r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   rQ  Zcompressed_indices_dtyperZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   rl   ro   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rs   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rc   r~   r  r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r~   r  r   r   Zinclude_selfrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )Zsorted_sequencerc   r   r   rd   rZ   rZ   r[   re     rf   r   c                 S   s   dS r`   rZ   )rL  r   lengthsr-  r   r   unsaferZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r~   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r~   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r   r~   rd  rC  steprZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rJ  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rN  rA  rS  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rN  rA  rS  r   rd   rZ   rZ   r[   re     rf   )stablerd   c                S   s   dS r`   rZ   )rc   r~   ra  r  rd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r'   Zsplit_size_or_sectionsr~   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rs   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   reflectc
           
      S   s   dS r`   rZ   )
rc   r4  r5  r6  r7  r8  Zpad_moder9  r:  r<  rZ   rZ   r[   re      s    c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   r  Z
compute_uvrd   rZ   rZ   r[   re     rf      c                 S   s   dS r`   rZ   )rc   r  rE  MrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )rc   Zfull_matricesrd   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   	  rf   c                 S   s   dS r`   rZ   rc   dim0r   rZ   rZ   r[   re   
  rf   c                 S   s   dS r`   rZ   )rc   Zaxis0Zaxis1rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re      rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   !  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   "  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   #  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   $  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   %  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   &  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   '  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   (  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   )  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   *  rf   c                 S   s   dS r`   rZ   rJ  rZ   rZ   r[   re   +  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   ,  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   -  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   .  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   /  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   0  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   1  rf   c                 S   s   dS r`   rZ   rc  rZ   rZ   r[   re   2  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   3  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   4  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   5  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   6  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   7  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   8  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   9  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   :  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   ;  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   <  rf   c                 S   s   dS r`   rZ   rU  rZ   rZ   r[   re   =  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   >  rf   c                 S   s   dS r`   rZ   rJ  rZ   rZ   r[   re   ?  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   @  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   A  rf   c                 S   s   dS r`   rZ   rk   rZ   rZ   r[   re   B  rf   c                 S   s   dS r`   rZ   )r   rl   rd   rZ   rZ   r[   re   C  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   D  rf   c                 S   s   dS r`   rZ   )rc   r  rZ   rZ   r[   re   E  rf   c                 S   s   dS r`   rZ   )rc   r-  r~   rd   rZ   rZ   r[   re   F  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   G  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   H  rf   c                 S   s   dS r`   rZ   )r   indrZ   rZ   r[   re   I  rf   c                 S   s   dS r`   rZ   )r   r   r  rZ   rZ   r[   re   J  rf   c                 S   s   dS r`   rZ   )r   r   r  rd   rZ   rZ   r[   re   K  rf   c                 S   s   dS r`   rZ   )rc   r   r~   rZ   rZ   r[   re   L  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   M  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   N  rf   c                 S   s   dS r`   rZ   )rc   r>  r~   ra  rd   rZ   rZ   r[   re   O  rf   c                 S   s   dS r`   rZ   rj   rZ   rZ   r[   re   P  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   Q  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   R  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   S  rf   c                 S   s   dS r`   rZ   )rc   rN  r   r  unitriangularrZ   rZ   r[   re   T  rf   c                 S   s   dS r`   rZ   )rc   rA  r   rS  r  rZ   rZ   r[   re   U  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   V  rf   c
           
      S   s   dS r`   rZ   r  rZ   rZ   r[   re   W  s    c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   Z  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   [  rf   c                 S   s   dS r`   rZ   rb   rZ   rZ   r[   re   \  rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re   ]  rf   c                 S   s   dS r`   rZ   )rc   r~   sizesrK  rZ   rZ   r[   re   ^  rf   c                 S   s   dS r`   rZ   )rc   sortedreturn_inversereturn_countsr~   rZ   rZ   r[   re   _  rf   c                 S   s   dS r`   rZ   )rc   r  r  r~   rZ   rZ   r[   re   `  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   a  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   b  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   c  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   d  rf   c                 S   s   dS r`   rZ   )r   rh  rZ   rZ   r[   re   e  rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re   f  rf   c                 S   s   dS r`   rZ   r}   rZ   rZ   r[   re   g  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   h  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   i  rf   c                 S   s   dS r`   rZ   )	conditionr   r   rZ   rZ   r[   re   j  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   k  rf   c                 S   s   dS r`   rZ   )r   levelrZ   rZ   r[   re   l  rf   c                 S   s   dS r`   rZ   )ZprimalZtangentr  rZ   rZ   r[   re   m  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   n  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   o  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   p  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   q  rf   c                 S   s   dS r`   rZ   )r   r{   rV   r   rZ   rZ   r[   re   r  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   s  rf   c                 S   s   dS r`   rZ   )r   r   r   r   rZ   rZ   r[   re   t  rf   )implicitc                S   s   dS r`   rZ   )r   r{   r  rZ   rZ   r[   re   u  rf   c                 S   s   dS r`   rZ   )r   r~   rd  r;  rZ   rZ   r[   re   v  rf   c                 S   s   dS r`   rZ   )r   r  rZ   rZ   r[   re   w  rf   c                 S   s   dS r`   rZ   r   r{   rV   rZ   rZ   r[   re   x  rf   c                 S   s   dS r`   rZ   )r   r~   r  rZ   rZ   r[   re   y  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   z  rf   c                 S   s   dS r`   rZ   )r   r~   rd  rC  r  rZ   rZ   r[   re   {  rf   c                 S   s   dS r`   rZ   )r   Z
split_sizer~   rZ   rZ   r[   re   |  rf   c                 S   s   dS r`   rZ   )r   Zsplit_sizesr~   rZ   rZ   r[   re   }  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ~  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r  r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   r)   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   	dimensionr{   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rl   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   arrayrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   idxrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   memorZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   format_specrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   protorZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   )tensor_contentsc                S   s   dS r`   rZ   )r   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r>  r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   drZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   cuda_enabledcpu_enabledZ
cuda_dtypeZ	cpu_dtyperZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r  r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 [   s   dS r`   rZ   )r   r)   non_blockingrY  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   rK  r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   orderZellipsis_idxrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   callablerZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   gradientZretain_graphZcreate_graphri   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   r*   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   )r   c                S   s   dS r`   rZ   )r   mediansigmar   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   Z	coalescedrZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re      rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r   r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   	  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   
  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                S   s   dS r`   rZ   )r   r#  r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r   rr   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                S   s   dS r`   rZ   )r   r   r   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   )r   r'   rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re     rf   c                S   s   dS r`   rZ   )r   r   r  r   rZ   rZ   r[   re      rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   !  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   "  rf   c                 S   s   dS r`   rZ   )r   r'   r  rZ   rZ   r[   re   #  rf   c                 S   s   dS r`   rZ   )r   r   r   r  rZ   rZ   r[   re   $  rf   c                 S   s   dS r`   rZ   )r   ru   rZ   rZ   r[   re   %  rf   c                 S   s   dS r`   rZ   )r   r  rd  r;  rZ   rZ   r[   re   &  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   '  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   (  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   )  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   *  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   +  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ,  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   -  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   .  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   /  rf   c                 S   s   dS r`   rZ   )r   r-  r'   r.  rZ   rZ   r[   re   0  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   1  rf   c                S   s   dS r`   rZ   )r   from_tor   rZ   rZ   r[   re   2  rf   c                 S   s   dS r`   rZ   r   streamrZ   rZ   r[   re   3  rf   c                 S   s   dS r`   rZ   )r   rK  rZ   rZ   r[   re   4  rf   c                 S   s   dS r`   rZ   r   hookrZ   rZ   r[   re   5  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   6  rf   c                 S   s   dS r`   rZ   )r   namerZ   rZ   r[   re   7  rf   c                 W   s   dS r`   rZ   r   rZ   rZ   r[   re   8  rf   c                 S   s   dS r`   rZ   )r   r   rZ   rZ   r[   re   9  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   :  rf   c                 W   s   dS r`   rZ   r   rZ   rZ   r[   re   ;  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   <  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   =  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   >  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ?  rf   c                 S   s   dS r`   rZ   )r   r,  r   r{   rV   rZ   rZ   r[   re   @  rf   c                 S   s   dS r`   rZ   )r   r   r~   r  rZ   rZ   r[   re   A  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   B  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   C  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   D  rf   c                 S   s   dS r`   rZ   )r   r   r~   rd  rC  r  rZ   rZ   r[   re   E  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   F  rf   c                 S   s   dS r`   rZ   )r   rQ  rZ   rZ   r[   re   G  rf   c                 S   s   dS r`   rZ   )r   rQ  Zaccumulate_matchesrZ   rZ   r[   re   H  rf   c                 S   s   dS r`   rZ   r   Zsize1Zsize2	dense_dimrZ   rZ   r[   re   I  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   J  rf   c                 S   s   dS r`   rZ   )r   rt   ru   rp   ro   rd   rZ   rZ   r[   re   K  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   L  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   M  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   N  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   O  rf   c                 S   s   dS r`   rZ   r   rZ   rZ   r[   re   P  rf   c                 W   s   dS r`   rZ   )r   ZrepsrZ   rZ   r[   re   Q  rf   c                 S   s   dS r`   rZ   )r   r)   r  copyr*   rZ   rZ   r[   re   R  rf   )masked_gradc                S   s   dS r`   rZ   r   r)   r  rZ   rZ   r[   re   S  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   T  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   U  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   V  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   W  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   X  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   Y  rf   c                 S   s   dS r`   rZ   )r   r  r  rZ   rZ   r[   re   Z  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   [  rf   c                 S   s   dS r`   rZ   )r   r  rZ   rZ   r[   re   \  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ]  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   ^  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   _  rf   c                 S   s   dS r`   rZ   r  rZ   rZ   r[   re   `  rf   c                 S   s   dS r`   rZ   )r   r   condZdriverrZ   rZ   r[   re   a  rf   ___Z__i__rZbitwise_)N)N)N)N)N)N)N)rm   rm   N)rm   N)rm   N)rm   rm   N)rm   rm   N)rm   rm   N)N)r   r   F)F)N)N)NFN)N)NFN)N)N)N)N)N)N)N)N)N)N)N)Nr   FT)rm   rm   N)NN)NNNr   N)Nr   )N)N)N)N)N)N)N)N)FFN)r   N)r   N)r   N)r   r   )N)r   F)FN)N)FN)FN)FN)r   )NNN)NNN)N)N)N)rm   NN)r   F)N)N)N)N)N)N)r   )Nrm   r   rm   rm   )Nrm   r   rm   rm   )Nrm   r   rm   rm   )r   )Nrm   r   r   rm   rm   )Nrm   r   r   rm   rm   )Nrm   r   r   rm   rm   )N)r   NNr   )N)rm   r   )NN)ra   N)r   r   F)N)N)NN)NN)Nra   )N)N)r   N)r   N)r   )rm   ra   NNN)r   r   rm   )r   r   ra   )r   r   rm   )N)N)r   )NN)NN)N)F)N)N)N)r   N)r   N)NNr   FF)Nr   Fr   FNN)NNNF)N)N)N)N)N)N)N)FF)Nra   N)Nra   N)Nra   N)Nra   N)Nra   N)Nr  N)Nr  N)Nra   N)Nra   N)NNN)NNN)NNN)NNN)Nr  N)Nr  N)Nr  N)Nr  N)N)N)Nra   N)N)r   ra   )NFN)N)N)N)N)N)TT)NF)N)N)N)N)N)N)N)N)NNrm   )NNr   T)NN)N)N)r!  )N)r   NNr   )r&  r   r   N)r&  NNNFN)NNF)N)N)N)N)N)N)F)N)T)FF)N)N)N)N)FN)r   r   F)NNNTFNNF)NNr   F)NFN)FFN)FN)FN)NNr   T)N)N)N)N)N)N)NNNNNNNNNNNNN)N)N)N)N)N)N)N)N)N)N)N)N)N)FN)NN)N)N)TFN)N)r   NNr   )N)N)TN)TN)TFN)TFN)N)N)NF)N)N)N)N)Nr   rm   F)Nr   rm   F)Nr   rm   F)Nr   rm   FF)N)NFNN)N)N)N)N)N)N)ra   FN)FN)N)N)FN)N)re  NNN)NNr   )r   NFN)N)N)N)N)N)F)F)F)F)F)F)N)r!  FF)Nr   FTN)Nr   FTN)NNFrn  r   )N)NNNr   )NNNr   N)r   F)r   NNr   )NNrp  Nr   re  )r   r   F)r!  TF)r!  TF)r!  TF)r!  TF)r   F)NNr   FF)	NNr   Fr   FNFN)r!  FF)rm   r   rm   )NNFN)NNFN)NNFN)NNFN)Frs  r   )ru  )ra   )rv  r9   N)NNr   )rm   Frw  ra   )r!  )ry  r   F)r   NNr   )NNNNTrn  r   )NNrz  NNF)NNr   F)NNr   )NNr   )r|  F)N)r}  r~  r   )Nr  N)NF)NF)r   NNr   )Nr   rm   FF)Nr   rm   FF)Nr   rm   FF)Nr   rm   FF)Nr   rm   FF)Nr   rm   FF)Nr   N)Nr   N)Nr   N)NNr   )TNTNFNNNNNNF)rm   r   NNNr   )NNr   )NNNr   )NNrp  Nr   )r   rm   r  N)ra   )rB   r   )r   rs  F)TFNr   Nr   )F)F)r  r  FF)F)F)F)Nre  )NNr   r   )r   r   )NNr   )Nr  N)Nr  N)rm   r  )r!  )F)r   r   rs  FNNr   )rm   r   rm   )re  r   )re  r   )r   r  r  )F)r  NFNN)NNFNN)r   NFNN)r  r  FNN)r   r   )r  NFNN)TF)r   rs  F)NTr   )r   )r  )r  F)N)N)N)NNNF)N)N)F)TN)r  N)NFr  N)NFr  N)N)NNNF)NNNF)N)N)ra   N)N)F)N)N)N)NN)NN)N)rm   r  )N)N)r  r  FF)N)rm   )rm   rm   N)T)FFN)r   NNNr   F)r   NNrm   )F)N)N)N)N)N)N)N)N)TN)TFN)ra   F)r   )r   )N)N)NN)rm   rm   N)r   N)N)N)NNNTr  FTN)N)N)N)N)TTN)r  r   N)TN)N)N)N)N)N)N)N)N)N)N)N)N)FN)N)N)N)N)N)N)N)N)N)NN)N)N)r   )N)r   N)r   )F)ra   FN)Nra   )Nra   )TFF)TF)r   N)r   r   rs  FNNr   )r   N)N)r   )TFFN)FFN)r   )r   )r   )N)N)N)N)N)NN)NNNF)N)r   r   rm   )r   NNrm   )r   )r   )r   )NF)NNFN)r   rm   )F)r   r   rm   )rm   )rm   r   )F)r   N)T)Nr   NN)r   NNrm   )F)rm   rm   N)N)NN)r   rm   )N)NN(i  r   r   r   absoluteZadaptive_avg_pool1dZadaptive_max_pool1dacosrT  ZarccosacoshZarccoshaddZaddbmmZaddcdivZaddcmulZaddmmZaddmvaddrZaffine_grid_generatorallZallcloseZalpha_dropoutZamaxZaminZaminmaxZangleanyZargmaxZargminZargsortasinZ_assert_asyncZarcsinasinhZarcsinhatanZarctanatan2Zarctan2atanhZarctanhZ
atleast_1dZ
atleast_2dZ
atleast_3dZ
avg_pool1dZbaddbmmZ
batch_normZbatch_norm_backward_elemtZbatch_norm_backward_reduceZbatch_norm_elemtZbatch_norm_gather_statsZ#batch_norm_gather_stats_with_countsZbatch_norm_statsZbatch_norm_update_statsZ	bernoullirv  Z binary_cross_entropy_with_logitsZbincountZbinomialZbitwise_andZbitwise_notZ
bitwise_orZbitwise_xorZbitwise_left_shiftZbitwise_right_shiftZ
block_diagZbmmZbroadcast_tensorsZbroadcast_toZ	bucketizeZcartesian_prodcatconcatZconcatenateZcdistceilZceluZchain_matmulZchannel_shuffleZcholeskylinalgZcholesky_exZcholesky_inverseZcholesky_solveZchoose_qparams_optimizedchunkclampZclipZ	clamp_minZ	clamp_maxZcolumn_stackZcovclonecombinationscomplexcopysignZpolarr  ZconjZconj_physicalZresolve_conjZresolve_negZconstant_pad_ndZconv1dZconv2dZconv3dZconvolutionZconv_tbcZconv_transpose1dZconv_transpose2dZconv_transpose3dZcorrcoefcosZcosine_embedding_losscoshZcosine_similarityZcount_nonzerocrossZctc_lossZcummaxZcumminZcumprodZcumsumZcumulative_trapezoidZlogcumsumexpZdeg2radZ
dequantizeZdetdetachZdiagZ
diag_embedZdiagflatdiffr   Zdiagonal_scatterZas_strided_scatterZdigammadistdivdividedotr  ZdsmmZhsmmZdsplitZdstackrR   ZeigvalsZeighZeigvalshZeinsumZ	embeddingZembedding_bagZ
empty_likeeqequalerferfcZerfinvexpZexp2expm1Z fake_quantize_per_channel_affineZfake_quantize_per_tensor_affineZfused_moving_avg_obs_fake_quantZfbgemm_linear_fp16_weightZ)fbgemm_linear_fp16_weight_fp32_activationZfbgemm_linear_int8_weightZ)fbgemm_linear_int8_weight_fp32_activationZfbgemm_linear_quantize_weightZfbgemm_pack_gemm_matrix_fp16Zfbgemm_pack_quantized_matrixZfeature_alpha_dropoutZfeature_dropoutr1   ZifftZrfftZirfftZhfftZihfftZhfft2Zihfft2ZhfftnZihfftnZfftnZifftnZrfftnZirfftnZfft2Zifft2Zrfft2Zirfft2ZfftshiftZ	ifftshiftZfixflattenflipZfliplrZflipudZfrobenius_normfloorZfloor_divideZfloat_powerfmodfracfrexpZ	full_likeZstridedZ_functional_assert_asyncZ	lu_unpackgathergcdgeZgreater_equalZgeqrfZi0innerouterZgerr  Zgrid_samplerZgrid_sampler_2dZgrid_sampler_3dZ
group_normZgruZgru_cellgtZgreaterZ
hardshrinkZ	heavisideZhinge_embedding_lossZhistcZ	histogramZhistogramddZhouseholder_productZhspmmZhsplitZhstackhypotZigammaZigammacr   Z	index_addZ
index_copyZ	index_putZindex_selectZ
index_fillZindex_reduceisfiniteisinisinfZisrealZisposinfZisneginfZinstance_normZint_reprZinverseinvZinv_exZ
is_complexZis_conjZis_negZis_distributedZis_inferenceZis_floating_pointZ
is_nonzeroZis_same_size	is_signediscloseisnanZistftZkl_divZkronZkthvalueZldl_factor_exZ
ldl_factorZ	ldl_solveZ
layer_normZlcmldexpleZ
less_equalZlerplgammaZlobpcglogZlog_softmaxlog10log1plog2Z	logaddexpZ
logaddexp2ZlogdetZxlogylogical_andZlogical_not
logical_orlogical_xorZlogitZ	logsumexpZlstmZ	lstm_cellltlessZluZlu_solveZmargin_ranking_lossZmasked_fillZmasked_scatterZmasked_selectmatmulZ	lu_factorZlu_factor_exZmatrix_powerZmatrix_rankZ	multi_dotZ
matrix_expr   maximumZfmaxZ
max_pool1dZ
max_pool2dZ
max_pool3dZmax_pool1d_with_indicesr   Znanmeanr  Z	nanmedianZmeshgridr   minimumZfminZmiopen_batch_normZmiopen_convolutionZmiopen_convolution_add_reluZmiopen_convolution_reluZmiopen_convolution_transposeZmiopen_depthwise_convolutionZ
miopen_rnnmmr   ZmovedimZmoveaxisZmsortmulmultiplyZmultinomialmvZmvlgammaZnarrowZ
nan_to_numZnative_batch_normZ_native_batch_norm_legitZnative_dropoutZnative_layer_normZnative_group_normZnative_normZnative_channel_shufflene	not_equalnegr  Z	nextafterr:   r;   Zadaptive_avg_pool2dZadaptive_avg_pool3dZ adaptive_max_pool1d_with_indicesZadaptive_max_pool2dZ adaptive_max_pool2d_with_indicesZadaptive_max_pool3dZ adaptive_max_pool3d_with_indicesZaffine_gridZ
avg_pool2dZ
avg_pool3dZbinary_cross_entropyZcross_entropyZ	dropout1dZ	dropout2dZ	dropout3dZelufoldZfractional_max_pool2dZ"fractional_max_pool2d_with_indicesZfractional_max_pool3dZ"fractional_max_pool3d_with_indicesZgaussian_nll_lossZgeluZgluZgrid_sampleZgumbel_softmaxZhardtanhZinterpolateZl1_lossr  r  Zlocal_response_normZ
logsigmoidZ	lp_pool1dZ	lp_pool2dZmax_pool2d_with_indicesZmax_pool3d_with_indicesZmax_unpool1dZmax_unpool2dZmax_unpool3dZmse_lossZmulti_head_attention_forwardZmulti_margin_lossZmultilabel_margin_lossZmultilabel_soft_margin_lossZnll_loss	normalizeZone_hotr   Zpairwise_distanceZpoisson_nll_lossZpreluZreluZrelu6ZrreluZseluZsiluZmishZscaled_dot_product_attentionZsmooth_l1_lossZ
huber_lossZsoft_margin_lossZsoftmaxZsoftminZsoftplusZ
softshrinkZsoftsignZ
tanhshrinkr  Ztriplet_margin_lossZ!triplet_margin_with_distance_lossZunfoldr@   Zuniform_Znormal_Z	constant_Zkaiming_uniform_ZnonzeroZnonzero_staticZargwherer  Zvector_normZmatrix_normZnorm_except_dimZnuclear_normr   ZorgqrZormqrZpermuteZpca_lowrankZpdistZpinverseZpinvZpixel_shuffleZpixel_unshuffleZpoissonZ	polygammar  Z	ones_liker  prodputZq_per_channel_axisZq_per_channel_scalesZq_per_channel_zero_pointsZq_scaleZq_zero_pointZqrZquantileZnanquantileZquantize_per_channelZquantize_per_tensorZquantize_per_tensor_dynamicZquantized_batch_normZquantized_gru_cellZquantized_lstm_cellZquantized_max_pool1dtupleZquantized_max_pool2dZquantized_max_pool3dZquantized_rnn_relu_cellZquantized_rnn_tanh_cellZrad2degZ	rand_likeZrandint_likeZ
randn_likeZravelr   ZvdotZvecdotZview_as_realZview_as_complexZ
reciprocal	remainderZrenormZrepeat_interleaveZreshapeZrnn_reluZrnn_relu_cellZrnn_tanhZrnn_tanh_cellZrollZrot90roundZ	row_stackZ_rowwise_pruneZrsqrtZrsubZsaddmmZscatterZscatter_addZscatter_reduceZsearchsortedZ_segment_reduceselectZselect_scatterZslice_scatterr>   signZsignbitZsgnsinZsincsinhZslogdetZsmmZspmmrU   Zsolve_exsortsplitZsplit_with_sizessqrtZsquareZsqueezeZsspaddmmstackr  Zstd_meanZstftsubsubtractsumZnansumZsvdZsvd_lowrankZsvdvalsZswapaxesZswapdimsspecialZairy_aiZ	bessel_j0Z	bessel_j1Z	bessel_y0Z	bessel_y1Zchebyshev_polynomial_tZchebyshev_polynomial_uZchebyshev_polynomial_vZchebyshev_polynomial_wZentrZerfcxZexpitZgammaincZ	gammainccZgammalnZhermite_polynomial_hZhermite_polynomial_heZi0ei1Zi1eZlaguerre_polynomial_lZlegendre_polynomial_pZlog_ndtrZmodified_bessel_i0Zmodified_bessel_i1Zmodified_bessel_k0Zmodified_bessel_k1ZmultigammalnZndtrZndtripsiZscaled_modified_bessel_k0Zscaled_modified_bessel_k1Zshifted_chebyshev_polynomial_tZshifted_chebyshev_polynomial_uZshifted_chebyshev_polynomial_vZshifted_chebyshev_polynomial_wZspherical_bessel_j0Zxlog1pyzetatZtakeZtake_along_dimtanr?   Z	tensorinvZtensorsolveZ	tensordotZtensor_splitZtileZtopktracer  ZtrapzZ	trapezoidZtriangular_solveZsolve_triangularZtrilZtriuZtrue_dividetruncZunbindrW   uniqueZunique_consecutiveZunsafe_chunkZunsafe_splitZunsafe_split_with_sizesZ	unsqueezer8   rt  Zvar_meanZvsplitZvstackwhereZ
zeros_likeZ_fw_primal_copyZ_make_dual_copyZview_as_real_copyZview_as_complex_copyZ
_conj_copyZ_neg_view_copyZas_strided_copyZ_sparse_broadcast_to_copyZdiagonal_copyZexpand_copyZnarrow_copyZpermute_copyZ_reshape_alias_copyZselect_copyZdetach_copyZ
slice_copyZ
split_copyZsplit_with_sizes_copyZsqueeze_copyZt_copyZtranspose_copyZunsqueeze_copyZ_indices_copyZ_values_copyZindices_copyZvalues_copyZcrow_indices_copyZcol_indices_copyZccol_indices_copyZrow_indices_copyZunbind_copyZ	view_copyZunfold_copyZ
alias_copy__floordiv____rfloordiv____ifloordiv____truediv____rtruediv____itruediv__
__lshift____rlshift____ilshift__
__rshift____rrshift____irshift____and____or____xor__	__float____complex__Z	__array____bool____contains____neg__
__invert____mod____rmod____imod__Z__array_wrap____getitem____deepcopy____int__Z__long__	__index____len__
__format____reduce_ex____reversed____repr____setitem____setstate__TrX   HZmTZmHZ_backward_hooksZ_post_accumulate_grad_hooksr\   Z_cdatar]   r^   Z_grad_fnZgrad_fn_versionZ_autocast_to_reduced_precisionZ_autocast_to_full_precisionrL  r(   r)   Zis_cudaZis_cpuZis_xlaZis_xpuZis_ipuZis_leafZretains_gradis_metaZis_mpsZ	is_nestedZis_ortZ	is_mkldnnZis_quantizedZ	is_sparseZis_sparse_csrZ	is_vulkanitemsizer,   r  rK  nbytesndimZ	output_nrr   r  ZvolatileZ__cuda_array_interface__typeZ_dimIZ_dimVZ_indicesZ_is_viewZ_nnzZcrow_indicesZcol_indicesZccol_indicesZrow_indicesZ_update_namesZ_valuesZalign_asZalign_toZapply_r-   Zas_strided_ZbackwardZbfloat16Zpreserve_formatboolbytecharZcauchy_ZcoalesceZ_coalesced_
contiguousZcontiguous_formatZcopy_cpucudaZxpuZipuZdata_ptrr  r~   Z	dim_orderdoubleZcdoubleZelement_sizeexpandZ	expand_asZexponential_Zfill_Zfill_diagonal_floatZcfloatZ
geometric_r&   ZhalfZchalfZ	has_namesr-  intZis_coalescedZis_contiguous	is_pinnedZ	is_set_toZ	is_shareditemZlog_normal_longZmap_Zmap2_Z
ndimensionZnelementZ_nested_tensor_sizeZ_nested_tensor_storage_offsetsZ_nested_tensor_stridesnumpyZ
pin_memoryZput_r+   Zrandom_Zrecord_streamZrefine_namesregister_hookZ"register_post_accumulate_grad_hookrenamerepeatZrequires_grad_Z
reshape_asresizeZresize_Z	resize_asZresize_as_sparse_Zretain_gradset_Zshare_memory_shortr{   Z
sparse_dimZsparse_maskZ_sparse_mask_projectionZsparse_resize_Zsparse_resize_and_clear_ZstorageZuntyped_storager   Zstorage_typeZsum_to_sizer  Zto_denseZ	_to_denseZ	to_sparsetolistZ	to_mkldnnZtype_asr$  viewZview_asZzero_Z
__dlpack__Z__dlpack_device__rS   r   items__name__
startswithlenextendgetattrr  update)
r   retZret2Zignoredr>  r  rK  subnamer  funcrZ   rZ   r[   r   c  s    
 
   
  
 
 
 
 
 
 
 
 
 
  
 
 
 
 
 
 
 
   
 
  
 
 
 
 
 
 
 
 
    
 
         
      
 
 
 
 
 
 
 
  
   
  
 
 
 
 
 
   
 
 
 
 
  
 
 
 
 
 
 
  
  
  
 
 
 
 
 
 
 
 
  
 
 
 
  
 
 
 
  
 
   
 
 
 
 
 
 
     
 
 
 
 
 
 
 
 
 
 
 
 
 
    
 
 
 
 
            
 
  
 
 
 
 
 
              
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    
 
  
 
 
 
   
 
 
 
 
 
 
 
 
 
 
    
  
 
 
 
 
 
 
 
 
                                            
                     
                                               
                                                     
    
    
   
      
     
      
    
         
           
      
 
    
 
          
      
    
              
    
    
    
    
    
    
                        
    
  
    
    
          
                          
                                                    
 
 
 
 
 
                                                                        
          
 
 
 
 
 
 
 
 
  
   
   
  
 
 
 
 
  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                          
                                                                                          
 
 
 
 
 
 
 
 
 
 
 
 
   
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
                                                                                                                                              m 
dispatcherc                    s    fdd}|S )a  Wraps a given function with ``__torch_function__`` -related functionality.

    Parameters
    ----------
    dispatcher: Callable
        A callable that returns an iterable of Tensor-likes passed into the function.

    Note
    ----
    This decorator may reduce the performance of your code. Generally, it's enough to express
    your code as a series of functions that, themselves, support __torch_function__. If you
    find yourself in the rare situation where this is not the case, e.g. if you're wrapping a
    low-level library and you also need it to work for Tensor-likes, then this function is available.

    Examples
    --------
    >>> def dispatcher(a): # Must have the same signature as func
    ...     return (a,)
    >>> @torch.overrides.wrap_torch_function(dispatcher)
    >>> def func(a): # This will make func dispatchable by __torch_function__
    ...     return a + 0
    c                    s   t   fddS )Nc                     s.    | |}t |r$t|f| |S | |S N)r   r   )argsrY  relevant_args)r  r  wrappedrZ   r[   r    s    
z3wrap_torch_function.<locals>.inner.<locals>.wrapped)	functoolswrapsr  r  )r  r  r[   r    s    z"wrap_torch_function.<locals>.innerrZ   )r  r  rZ   r  r[   r     s    )r  r   c                 C   s   t j sg S t }g }| D ]}t|}||krt|dr|jt jjkr|r|| t	|}t
|D ]\}}t|t|rf|} qqf||| q|h}|g}q|S )a  Returns a list of arguments on which to call __torch_function__.

    Checks arguments in relevant_args for __torch_function__ implementations,
    storing references to the arguments and their types in overloaded_args and
    overloaded_types in order of calling precedence. Only distinct types are
    considered. If a type is a subclass of another type it will have higher
    precedence, otherwise the precedence order is the same as the order of
    arguments in relevant_args, that is, from left-to-right in the argument list.

    The precedence-determining algorithm implemented in this function is
    described in `NEP-0018`_.

    See torch::append_overloaded_arg for the equivalent function in the C++
    implementation.

    Parameters
    ----------
    relevant_args : iterable of array-like
        Iterable of array-like arguments to check for __torch_function__
        methods.

    Returns
    -------
    overloaded_args : list
        Arguments from relevant_args on which to call __torch_function__
        methods, in the order in which they should be called.

    .. _NEP-0018:
       https://numpy.org/neps/nep-0018-array-function-protocol.html
    rM   )r   _CZ_is_torch_function_enabledsetr  hasattrrM   _disabled_torch_function_implr  r  	enumerate
issubclassinsert)r  Zoverloaded_typesoverloaded_argsargZarg_typer  iZold_argrZ   rZ   r[   _get_overloaded_args  s(     

r  )
public_apir  r   c              	   O   s   t |}ttt|}t rJt }|| |||}W 5 Q R X |tk	rJ|S |D ]T}|j}	t|	dr|	j	|kr|	t
jjk	rtdt |	| |||}|tk	rN|  S qN| j d| j }
d|
 ddd |D  }t r|dt  7 }t|d	S )
a=  Implement a function with checks for ``__torch_function__`` overrides.

    See torch::autograd::handle_torch_function for the equivalent of this
    function in the C++ implementation.

    Arguments
    ---------
    public_api : function
        Function exposed by the public torch API originally called like
        ``public_api(*args, **kwargs)`` on which arguments are now being
        checked.
    relevant_args : iterable
        Iterable of arguments to check for __torch_function__ methods.
    args : tuple
        Arbitrary positional arguments originally passed into ``public_api``.
    kwargs : tuple
        Arbitrary keyword arguments originally passed into ``public_api``.

    Returns
    -------
    object
        Result from calling ``implementation`` or an ``__torch_function__``
        method, as appropriate.

    Raises
    ------
    TypeError : if no implementation is found.

    Example
    -------
    >>> def func(a):
    ...     if has_torch_function_unary(a):
    ...         return handle_torch_function(func, (a,), a)
    ...     return a + 0
    __self__zDefining your `__torch_function__ as a plain method is deprecated and will be an error in future, please define it as a classmethod..zno implementation found for 'z.' on types that implement __torch_function__: c                 S   s   g | ]}t |qS rZ   )r  ).0r  rZ   rZ   r[   
<listcomp>0  s     z)handle_torch_function.<locals>.<listcomp>z nor in mode N)r  rB  mapr  r   _pop_mode_temporarilyrM   NotImplementedr  r  r   r  r  warningswarnDeprecationWarning
__module__r  _get_current_function_mode	TypeError)r  r  r  rY  r  typesr   resultZoverloaded_argZtorch_func_method	func_namer   rZ   rZ   r[   r     s0    &

a  Check for __torch_function__ implementations in the elements of an iterable
    or if a __torch_function__ mode is enabled.  Considers exact ``Tensor`` s
    and ``Parameter`` s non-dispatchable.  Use this to guard a call to
    :func:`handle_torch_function`; don't use it to test if something
    is Tensor-like, use :func:`is_tensor_like` instead.
    Arguments
    ---------
    relevant_args : iterable
        Iterable or arguments to check for __torch_function__ methods.
    Returns
    -------
    bool
        True if any of the elements of relevant_args have __torch_function__
        implementations, False otherwise.
    See Also
    ________
    torch.is_tensor_like
        Checks if something is a Tensor-like, including an exact ``Tensor``.
    zSpecial case of `has_torch_function` for single inputs.
    Instead of:
      `has_torch_function((t,))`
    call:
      `has_torch_function_unary(t)`
    which skips unnecessary packing and unpacking work.
    a'  Special case of `has_torch_function` that skips tuple creation.

    This uses the METH_FASTCALL protocol introduced in Python 3.7

    Instead of:
      `has_torch_function((a, b))`
    call:
      `has_torch_function_variadic(a, b)`
    which skips unnecessary packing and unpacking work.
    c            
      C   s|  t t} i }dttjfdtjtjjfdtjjttjjfdtjjttjjfdtj	ttj	fdtj
ttj
fdtjttjfdtjttjfg}|D ]\}}}|D ]}d	}|tj	k	r
|d
rqn>|drd}n.|drd}n|d  sd}n|dkr4qn*t||}tt|d |kr(q|dkr4qt||}|tj	kr^tt|d |kr^qt|tjrnqt|tjr~qt|st|dr| d| d||j< | d| d||j< |rq|jt krd}	|jt kst|	||jqn| |  |j qt|sq| d| ||< |r4q|t krbd}	|t kst|	||jq| |  | qq| |fS )Nr   ztorch.functionalztorch.nn.functionalztorch.nn.initztorch.Tensorztorch.linalgz	torch.fftztorch.specialFr  r  Tr   Z
unique_dim__weakref__rX   r  z.__get__z.__set__zk{}.{} is in the tuple returned by torch._overrides.get_ignored_functions but still has an explicit override)!collectionsdefaultdictlistr   __all__r;   r:   dirr@   r   r  r1   rP  r  endswithislowerr  object
isinstancer  
ModuleType
__future___Featurer  r  rX   __set__r   r   AssertionErrorformatr  r   )
overridable_funcsr  Ztested_namespacesZnamespace_str	namespaceZns_funcsr  ignorer  r   rZ   rZ   r[   _get_overridable_functionsg  sv    











r  c                   C   s
   t  d S )a  List functions that are overridable via __torch_function__

    Returns
    -------
    Dict[Any, List[Callable]]
        A dictionary that maps namespaces that contain overridable functions
        to functions in that namespace that can be overridden.
    r   )r  rZ   rZ   rZ   r[   r     s    	c                 C   s.   t | tjjtjjfrt| S t d | S )a&  Get a human readable string name for a function passed to
    __torch_function__

    Arguments
    ---------
    f : Callable
        Function to resolve the name of.

    Returns
    -------
    str
        Name of the function; if eval'ed it should give back the input
        function.
    rm   )r  r   Z_opsZ
OpOverloadZOpOverloadPacketstrr  get)frZ   rZ   r[   r     s    c                  C   s   t  } t| tj }|S )z> Returns a set of the overridable methods on ``torch.Tensor`` )r   r  r   r   )r  methodsrZ   rZ   r[   _get_tensor_methods  s    r  )r  r   c                 C   s   | t  kp| jdkS )aw  
    Returns True if the function passed in is a handler for a
    method or property belonging to ``torch.Tensor``, as passed
    into ``__torch_function__``.

    .. note::
       For properties, their ``__get__`` method must be passed in.

    This may be needed, in particular, for the following reasons:

    1. Methods/properties sometimes don't contain a `__module__` slot.
    2. They require that the first passed-in argument is an instance
       of ``torch.Tensor``.

    Examples
    --------
    >>> is_tensor_method_or_property(torch.Tensor.add)
    True
    >>> is_tensor_method_or_property(torch.add)
    False
    rX   )r  r  r  rZ   rZ   r[   r     s    c                 C   s   t | tjkptt | dS )a9  
    Returns ``True`` if the passed-in input is a Tensor-like.

    Currently, this occurs whenever there's a ``__torch_function__``
    attribute on the type of the input.

    Examples
    --------
    A subclass of tensor is generally a Tensor-like.

    >>> class SubTensor(torch.Tensor): ...
    >>> is_tensor_like(SubTensor([0]))
    True

    Built-in or user types aren't usually Tensor-like.

    >>> is_tensor_like(6)
    False
    >>> is_tensor_like(None)
    False
    >>> class NotATensor: ...
    >>> is_tensor_like(NotATensor())
    False

    But, they can be made Tensor-like by implementing __torch_function__.

    >>> class TensorLike:
    ...     @classmethod
    ...     def __torch_function__(cls, func, types, args, kwargs):
    ...         return -1
    >>> is_tensor_like(TensorLike())
    True
    rM   )r  r   r   r  )ZinprZ   rZ   r[   r     s    "c                   @   sH   e Zd ZU dZd ed< dd ZdddZd	d
 Zdd Ze	dd Z
dS )TorchFunctionModea  
    A ``TorchFunctionMode`` allows you to override the meaning of all
    ``__torch_function__`` overrideable functions within a dynamic scope,
    without having to actually create a tensor subclass or manually
    monkey-patch functions in the PyTorch API.  Some common situations
    where you should use a mode:

        * You want to override the meaning of factory functions, or other
          functions that do not otherwise take a tensor as an argument
          (these cannot be overridden with tensor subclasses).

        * You want to override the behavior of all functions without needing
          to wrap your inputs in tensor subclasses; e.g., if you are just
          interested in logging intermediate computations.

        * You want to control the order of execution of various tensor
          subclasses explicitly, rather than implicitly via the return of
          ``NotImplemented``.

    Independent subclasses of :class:`TorchFunctionMode` are compositional:
    modes can be pushed onto a stack using ``with MyMode():``.
    When you call functions in the PyTorch API inside your
    ``__torch_function__`` implementation, by default, they will forward on to
    the next mode on the mode stack.  If you want recursively call back into
    your current ``__torch_function__`` implementation, either explicitly
    invoke ``self.__torch_function__(...)``, or use the context manager
    ``enable_torch_function_mode(self, replace=self.inner)`` to make PyTorch
    API self-referential (beware of infinite loops, in this case!)
    r  c                 C   s   d S r  rZ   r  rZ   rZ   r[   rH   5  s    zTorchFunctionMode.__init__rZ   Nc                 C   s
   t  d S r  )NotImplementedErrorr   r  r  r  rY  rZ   rZ   r[   rM   8  s    z$TorchFunctionMode.__torch_function__c                 C   s   t |  | S r  )
_push_moder  rZ   rZ   r[   	__enter__;  s    zTorchFunctionMode.__enter__c                 C   s
   t   d S r  )	_pop_mode)r   exc_typeexc_valexc_tbrZ   rZ   r[   __exit__?  s    zTorchFunctionMode.__exit__c                 O   s   t d | ||}|S )NzP`Mode.push()` is no longer necessary and can be replaced with just `with Mode()`)r  r  )clsr  rY  instancerZ   rZ   r[   pushB  s    

zTorchFunctionMode.push)rZ   N)r  r  __qualname____doc____annotations__rH   rM   r  r  classmethodr  rZ   rZ   rZ   r[   r    s   

r  c                  C   s   t  } | dkrt| d S d S )Nr   rm   )r   r   Z	stack_lenrZ   rZ   r[   r  I  s    r  c                  C   s   t  } dd t| D S )Nc                 S   s   g | ]}t |qS rZ   )r   )r  r  rZ   rZ   r[   r  P  s     z4_get_current_function_mode_stack.<locals>.<listcomp>)r   r7   r  rZ   rZ   r[    _get_current_function_mode_stackN  s    r  c                 C   s   t |  d S r  )r   )r   rZ   rZ   r[   r  R  s    r  c                  C   s
   t  } | S r  )r   oldrZ   rZ   r[   r  V  s    r  c                  c   s    t  } z
| V  W 5 t|  X d S r  )r  r  r  rZ   rZ   r[   r  [  s    
r  c                   @   s   e Zd ZdddZdS )BaseTorchFunctionModerZ   Nc                 C   s   |d kri }|||S r  rZ   r  rZ   rZ   r[   rM   d  s    z(BaseTorchFunctionMode.__torch_function__)rZ   N)r  r  r  rM   rZ   rZ   rZ   r[   r  c  s   r  c                	   c   s(   t j  z
d V  W 5 X W 5 Q R X d S r  )r   r  Z_RestorePythonTLSSnapshotrZ   rZ   rZ   r[   r   j  s    	
)7r  r  r  r  r  r  typingr   r   r   r   r   r   r   r	   
contextlibr   Ztorch._Cr
   r   r   r   r   r   r   r   r   r  	lru_cacher   r_   r   r   r  r   r   r<   r=   r  r  r   r   r  r  r   r   r  r  r  r  r  contextmanagerr  r  r   rZ   rZ   rZ   r[   <module>   s   (,          '$C  N,K$5
