
    Vh                     D    d dl mZ d dlmZ d dlZd Zd Zd Z e       Z	y)    )dedent)AnyNc                     t        | ||       y N)exec)codegloblocs      P/home/dcms/DCMS/lib/python3.12/site-packages/torch/jit/unsupported_tensor_ops.pyexecWrapperr      s    tS    c                     t        t        d t        t        j                                    } t        j
                  dg      }t        d      }h d}| |z
  } g }g }t        | d       }|D ]K  }|j                  |      }i }	t        |t               |	       	 t        j                  j                  |       M d |D        }d |D        }dj#                  |      dj#                  |      fS # t        $ r\}
dt        |
      vrY d }
~
t        t        ||            }d	|v sd
|v r|j!                  |       n|j!                  |       Y d }
~
d }
~
ww xY w)Nc                     | d   dk7  S )Nr   _ xs    r   <lambda>z5_gen_unsupported_methods_properties.<locals>.<lambda>   s    ! r      z.
    def func(x):
        return x.{op}()
    >	   newnamemap2_resizegrad_fnvolatile	has_names	reinforce	resize_asc                 "    | j                         S r   )lowerr   s    r   r   z5_gen_unsupported_methods_properties.<locals>.<lambda>%   s    QWWY r   )key)opznonexistent attributezbound methodzbuilt-in methodc              3   ,   K   | ]  }d |z   dz     yw)z	*  :meth:`~torch.Tensor.`Nr   .0r   s     r   	<genexpr>z6_gen_unsupported_methods_properties.<locals>.<genexpr>5   s     O!2Q6=O   c              3   ,   K   | ]  }d |z   dz     yw)z	*  :attr:`~torch.Tensor.r$   Nr   r%   s     r   r'   z6_gen_unsupported_methods_properties.<locals>.<genexpr>6   s     UQ59D@Ur(   
)setfilterdirtorchTensortensorr   sortedformatr   globalsjitCompilationUnit	Exceptionreprgetattrappendjoin)tensor_attrsr0   funcs_templatedeprecated_apis
propertiesmethodssorted_tensor_attrsattr	funcs_strscopee	attr_reprmapped_methodsmapped_propertiess                 r   #_gen_unsupported_methods_propertiesrH      sF   v3S5FGHL\\1#F	N
O  /1LJG 3FG# ("))T)2	 "Iwy%0		(II%%i0( PwONU*U99^$dii0A&BBB  	(&d1g5WVT23I*.?9.Lt$!!$'	(s   C..	E7E	A EEc                  B    d} t               \  }}| dz   |z   dz   dz   |z   S )Nz@


Unsupported Tensor Methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    r*   zF

Unsupported Tensor Properties
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    )rH   )headerr?   r>   s      r   _list_unsupported_tensor_opsrK   :   sN    F >?GZ
	
		 	 		r   )
textwrapr   typingr   	torch.jitr.   r   rH   rK   __doc__r   r   r   <module>rP      s)      +C\( '
(r   