o
    ki8                     @  sF   d dl mZ d dlmZmZ dddZed	ZdddZdddZ	dS )    )annotations)NativeFunctionsGroupNativeFunctionsViewGroupg/NativeFunctionsGroup | NativeFunctionsViewGroupreturnstrc                 C  s(   t | trt| jjjjjS t| jjS N)	
isinstancer   r   
functionalfuncnamebaseview	root_name)r    r   h/var/www/addictedbytheproject.nl/epg/venv/lib/python3.10/site-packages/torchgen/static_runtime/config.pyfunc_name_base_str   s   
r   )'absaddaddmmallanyargminbmmclamp	clamp_mincumsumdivfmodindex_select
leaky_relulinearlogmatmulmulnarrow_copynonzeropow	remaindersigmoidsignsubtanhdetach	expand_asflattennarrow
reshape_asselectslicesoftmaxsplitsqueeze	transposer   whereboolc                 C  s   t | }|tv S r	   )r   is_hand_written_ops_)r   	name_baser   r   r   is_hand_written:   s   r=   arg_mapdict[str, str]op_nameindexintNonec                 C  sL	  |dvrt d| |dkr/|dkr!d| d< d| d< d| d	< d S d
| d< d| d< d| d	< d S |dkrK|dkrAd| d< d| d< d S d
| d< d| d< d S |dkr_|dkrYd| d< d S d
| d< d S |dkr{|dkrqd| d< d| d< d S d| d< d| d< d S |dkr|dkrd| d< d S d| d< d S |dkr|dkrd| d< d S d| d< d S |dkr|dkrd| d< d S d| d< d S |dkr|dkrd| d < d S d
| d < d S |d!kr|dkrd| d < d S d
| d < d S |d"kr|dkrd| d#< d$| d%< d S d| d#< d$| d%< d S |d&kr|dkrd| d#< d$| d%< d S d| d#< d$| d%< d S |d'kr?|dkr1d| d< d(| d)< d| d*< d S d
| d< d+| d)< d| d*< d S |d,kr]|dkrSd| d< d-| d)< d S d
| d< d.| d)< d S |d/kr|dkrud| d< d(| d)< d| d*< d S d
| d< d+| d)< d| d*< d S |d0kr|dkrd1| d< d2| d)< d| d*< d S d3| d< d4| d)< d| d*< d S |d5v rd6| d7< d S |d8kr|dkrd1| d< d9| d:< d S d3| d< d9| d:< d S |d;kr|dkrd<| d< d=| d>< d<| d< d S d?| d< d@| d>< d?| d< d S |dAkr|dkrdB| d< d S dC| d< d S |dDkr4|dkr&dE| dF< dE| d< dG| d< d S dH| dF< dH| d< dI| d< d S |dJkrZ|dkrLdK| dF< dK| d< dL| d< d S dM| dF< dM| d< dN| d< d S |dOkrx|dkrndP| d< dQ| d< d S dR| d< dS| d< d S |dTkr|dkrdU| d< dV| d< d S dW| d< dX| d< d S |dYkr|dkrdZ| d< d[| d\< d]| d< d^| d_< d S d`| d< d[| d\< da| d< d^| d_< d S |dbkr|dkrdc| d< dd| de< d S df| d< dd| de< d S |dgkr|dkrdc| dF< dc| d< dd| de< d S df| dF< df| d< dd| de< d S |dhkr>|dkr(d<| d< di| d\< dj| d< d<| dk< d9| dl< d S dm| d< di| d\< dn| d< dm| dk< d9| dl< d S |dokrl|dkrZd<| d< di| d\< dp| d< d<| dk< d S dq| d< di| d\< dr| d< dq| dk< d S |dskr|dkrdt| d< dt| d< d[| d\< d S d| d< d| d< d[| d\< d S |dukr|dkrdv| dF< d| d< dw| d)< d| d*< d[| dx< d[| dy< dv| dz< d S dv| dF< d{| d< d|| d)< d{| d*< d[| dx< d[| dy< dv| dz< d S |d}v r|dkrd~| d< d]| d< d~| d< nd| d< d| d< d| d< d| v r|dkrdnd| d< d S |dkr'd| d< |dkr!d2| d< d S d4| d< d S |dkrE|dkr;d| d< d| d< d S d| d< d| d< d S |dkrk|dkr]d| d< d| d< d^| d< d S d| d< d| d< d^| d< d S |dkr|dkrd| d< d| d< d^| d< d S d| d< d| d< d^| d< d S |dv rdi| d< d9| d< d[| d< d S d S )N)r      zindex must be 0 or 1, got addrr   zat::rand({6, 6})selfzat::rand({6})vec1vec2zat::rand({22, 22})zat::rand({22})mvvecaddbmmcrosszat::rand({3, 3, 3})otherzat::rand({22, 3, 22})takez(at::randint(0, 216, {20}, torch::kInt64)rA   z*at::randint(0, 1000, {100}, torch::kInt64)take_along_dimzat::argsort(self0, 1, true)indiceszat::argsort(self1, 1, true)masked_selectzat::randn({6, 6, 6}) > 0.5maskzat::rand({22, 22, 22}) > 0.5orgqrinput2ormqrquantileqz"linear"interpolationnanquantilemulti_margin_lossz"at::randint(6, {6}, torch::kInt64)targetweightz$at::randint(22, {22}, torch::kInt64)multilabel_margin_lossz%at::randint(6, {6, 6}, torch::kInt64)z(at::randint(22, {22, 22}, torch::kInt64)nll_loss
nll_loss2dzat::rand({6, 6, 6, 6})z(at::randint(6, {6, 6, 6}, torch::kInt64)zat::rand({22, 22, 22, 22})z,at::randint(22, {22, 22, 22}, torch::kInt64))fft_fftfft_ifftfft_rfft	fft_irfftfft_hfft	fft_ihfftz	"forward"normlinalg_tensorinv2indaddmvzat::rand({2})zat::rand({2, 2})matzat::rand({35})zat::rand({35, 35})acoshz)at::rand({2, 2, 2}) + at::ones({2, 2, 2})z)at::rand({5, 5, 5}) + at::ones({5, 5, 5})adaptive_max_pool2d_backwardzat::rand({2, 2, 2}, at::kFloat)grad_outputz'at::randint(0, 1, {2, 2, 2}, at::kLong)zat::rand({3, 3, 3}, at::kFloat)z'at::randint(0, 1, {3, 3, 3}, at::kLong)adaptive_max_pool3d_backwardz"at::rand({2, 2, 2, 2}, at::kFloat)z*at::randint(0, 1, {2, 2, 2, 2}, at::kLong)z"at::rand({3, 3, 3, 3}, at::kFloat)z*at::randint(0, 1, {3, 3, 3, 3}, at::kLong)bitwise_left_shiftz+at::randint(1, 1 << 4, {6, 6, 6}, at::kInt)z'at::randint(1, 26, {6, 6, 6}, at::kInt)z.at::randint(1, 1 << 4, {22, 22, 22}, at::kInt)z*at::randint(1, 26, {22, 22, 22}, at::kInt)bitwise_right_shiftz2at::randint(1 << 21, 1 << 30, {6, 6, 6}, at::kInt)z'at::randint(1, 22, {6, 6, 6}, at::kInt)z5at::randint(1 << 21, 1 << 30, {22, 22, 22}, at::kInt)z*at::randint(1, 22, {22, 22, 22}, at::kInt)gatherz&at::randint(1, 100, {2,2,2}, at::kInt)1dimz)at::randint(0, 1, {2,2,2}, torch::kInt64)falsesparse_gradz&at::randint(1, 100, {5,5,5}, at::kInt)z)at::randint(0, 4, {5,5,5}, torch::kInt64)geluzat::rand({6, 6, 6})z"tanh"approximatezat::rand({22, 22, 22})gelu_backward	index_add0z at::randint(0, 1, {2}, at::kInt)sourcealphazat::rand({16})z"at::randint(0, 10, {16}, at::kInt)
index_copyz!at::randint(0, 1, {2}, at::kLong)zat::rand({32})z#at::randint(0, 10, {32}, at::kLong)linalg_crosszat::rand({6, 3, 6})nll_loss_backwardzat::rand({})z%at::randint(0, 5, {6}, torch::kInt64)	reductionignore_indextotal_weightzat::rand({36})z'at::randint(0, 11, {36}, torch::kInt64))scatterscatter_add_scatter_reducez+at::randint(1, 100, {2,2,2}, torch::kInt64)srcz+at::randint(1, 100, {5,5,5}, torch::kInt64)z)at::randint(0, 1, {5,5,5}, torch::kInt64)reducer   z"sum"z"add"scatter_reducez"mean"special_zetaz2at::rand({2,2,2}, at::kDouble) + at::ones({2,2,2})z2at::rand({5,5,5}, at::kDouble) + at::ones({5,5,5}) _convert_indices_from_csr_to_cooz!torch::tensor({1}, torch::kInt32)crow_indicesz'torch::tensor({0, 1, 0}, torch::kInt32)col_indices	out_int32z!torch::tensor({0}, torch::kInt32)zBtorch::tensor({0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2}, torch::kInt32) _convert_indices_from_coo_to_csrz at::randint(0, 3, {2}, at::kInt)10sizez!at::randint(0, 3, {12}, at::kInt)24)diagonallinalg_diagonaloffsetdim1dim2)AssertionError)r>   r@   rA   r   r   r   override_test_values?   s|  






































	












r   N)r   r   r   r   )r   r   r   r:   )r>   r?   r@   r   rA   rB   r   rC   )

__future__r   torchgen.modelr   r   r   	frozensetr;   r=   r   r   r   r   r   <module>   s    

-