o
    h8                     @  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   r/var/www/html/construction_image-detection-poc/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  sJ	  |dks
|dks
J |dkr.|dkr d| d< d| d< d| d< d S d	| d< d
| d< d
| d< d S |dkrJ|dkr@d| d< d| d< d S d	| d< d
| d< d S |dkr^|dkrXd| d< d S d	| d< d S |dkrz|dkrpd| 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r0d| d< d'| d(< d| d)< d S d	| d< d*| d(< d
| d)< d S |d+kr\|dkrRd| d< d,| d(< d S d	| d< d-| d(< d S |d.kr|dkrtd| d< d'| d(< d| d)< d S d	| d< d*| d(< d
| d)< d S |d/kr|dkrd0| d< d1| d(< d| d)< d S d2| d< d3| d(< d
| d)< d S |d4v rd5| d6< d S |d7kr|dkrd0| d< d8| d9< d S d2| d< d8| d9< d S |d:kr|dkrd;| d< d<| d=< d;| d< d S d>| d< d?| d=< d>| d< d S |d@kr|dkrdA| d< d S dB| d< d S |dCkr3|dkr%dD| dE< dD| d< dF| d< d S dG| dE< dG| d< dH| d< d S |dIkrY|dkrKdJ| dE< dJ| d< dK| d< d S dL| dE< dL| d< dM| d< d S |dNkrw|dkrmdO| d< dP| d< d S dQ| d< dR| d< d S |dSkr|dkrdT| d< dU| d< d S dV| d< dW| d< d S |dXkr|dkrdY| d< dZ| d[< d\| d< d]| d^< d S d_| d< dZ| d[< d`| d< d]| d^< d S |dakr|dkrdb| d< dc| dd< d S de| d< dc| dd< d S |dfkr|dkrdb| dE< db| d< dc| dd< d S de| dE< de| d< dc| dd< d S |dgkr=|dkr'd;| d< dh| d[< di| d< d;| dj< d8| dk< d S dl| d< dh| d[< dm| d< dl| dj< d8| dk< d S |dnkrk|dkrYd;| d< dh| d[< do| d< d;| dj< d S dp| d< dh| d[< dq| d< dp| dj< d S |drkr|dkrds| d< ds| d< dZ| d[< d S d| d< d| d< dZ| d[< d S |dtkr|dkrdu| dE< d| d< dv| d(< d| d)< dZ| dw< dZ| dx< du| dy< d S du| dE< dz| d< d{| d(< dz| d)< dZ| dw< dZ| dx< du| dy< 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 d1| d< d S d3| d< d S |dkrD|dkr:d| d< d| d< d S d| d< d| d< d S |dkrj|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 rdh| d< d8| d< dZ| d< d S d S )Nr      addrz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dim2r   )r>   r@   rA   r   r   r   override_test_values?   sz  






































	












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    

-