o
    "i                      @   s  d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl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& 	 dd Z'dej(fddZ)e)eej*+e,d	 d
dgdd eeeeeeee	eeeeeeeeeeeeeeeeeeeee efD  Z-ej.j/j0j1j2ej3j1j2ej4j5j,ej6j7j,e&j,e$j,hZ8ej9: rd dl;Ze8ej9j<j=j>j,hO Z8e8dd ej?j@A D O Z8e8ej?jBj,hO Z8e8ej6jCj,hO Z8e8e)ed e)ed e)ed e)ed hO Z8e8e)ed hO Z8e8eDe

e)ed e)ed hB O Z8e8e)ed e)ed hO Z8e8e)ed e)ed e)ed e)ed hO Z8daEeFdG ZGh dZHeIdd JeKejLeH d!ZMd"d# ZNd$eOfd%d&ZPd1d(d)ZQd*D ]ZRePeR qeN  d+d, ZSe	Tdd-d. ZUd/d0 ZVdS )2    N   )comptimeconfigexternal_utilsc                 C   s   t dd| S )Nz__init__.py$ )resub)s r
   f/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/torch/_dynamo/skipfiles.py_strip_init_py9   s   r   mc                 C   s
   t | jS N)r   __file__)r   r
   r
   r   _module_dir=   s   
r   /z<frozen importlibz<__array_function__ internals>c                 C   s   g | ]}t |qS r
   )r   ).0r   r
   r
   r   
<listcomp>H   s    r   c                 C   s    h | ]}t |rt |qS r
   )inspectisclassgetfile)r   objr
   r
   r   	<setcomp>   s    r   z!ao/quantization/pt2e/qat_utils.pyz.ao/quantization/quantizer/xnnpack_quantizer.pyz.ao/quantization/pt2e/representation/rewrite.pyzao/quantization/pt2e/utils.pyz_export/constraints.pyz_export/db/examples/*.pyz_export/wrappers.pyz_functorch/apis.pyz_functorch/deprecated.pyz%distributed/tensor/parallel/_utils.pyz$distributed/tensor/parallel/style.pyzdistributed/_tensor/api.pyz"distributed/_tensor/device_mesh.pyztorch._inductor.config>   ztorchrec/distributedz5caffe2/torch/fb/sparsenn/pooled_embeddings_modules.pyztorchrec/fb/distributedz.*(|)c                   C   s$   t ddtt jt dad S )Nz^(r   r   )r   compilejoinmapescape	SKIP_DIRSSKIP_DIRS_REr
   r
   r
   r   _recompile_re   s   $r!   import_namec                 C   sb   t | tjrt| jS t | tsJ tj| }|sd S |j	}|d u r%d S t
t| t  d S r   )
isinstancetypes
ModuleTypeadd__name__str	importlibutil	find_specoriginr   appendr   r!   )r"   Zmodule_specr,   r
   r
   r   r&      s   

r&   Fc                 C   sL   | du rdS | t v rdS |rt| rdS trtt| rdS tt| S )zShould skip this file?NTF)FILENAME_ALLOWLISTis_torch	is_fbcodeboolFBCODE_SKIP_DIRS_REmatchr    )filenameZallow_torchr
   r
   r   check   s   r5   )Z	functorchZ
fx2trt_ossZintel_extension_for_pytorchZnetworkxnumpyZ	omegaconfZonnxZonnxruntimeZonnx_tfZpandasZsklearntabulateZ
tensorflowZtensorrtZ	torch2trtZtqdmtreeZtvmZxarrayc                    s   t  fddtjD S )Nc                 3   s    | ]
}  t|V  qd S r   )
startswithr   )r   modr4   r
   r   	<genexpr>   s
    
z*is_torch_inline_allowed.<locals>.<genexpr>)anyr   Z!skipfiles_inline_module_allowlistr;   r
   r;   r   is_torch_inline_allowed   s   r>   c                  C   s   dd l } t| jS )Nr   )Ztorch._dynamor   Z_dynamo)torchr
   r
   r   
dynamo_dir   s   
r@   c                 C   s   |  t rdS |  ttS )NF)r9   r@   r   r?   r;   r
   r
   r   r/     s   r/   )F)W_collections_abc_weakrefsetabccollections
contextlibcopycopyregdataclassesenum	functoolsglobr)   r   	linecacheloggingmultiprocessingoperatoros	posixpathrandomr   	selectorssignaltempfile	threadingtokenize	tracebackr$   typingZunittestweakrefr?   Ztorch._inductor.test_operatorsZtorch.distributedZtorch.utils._content_storer   r   r   r   r   r%   r   pathdirnamer   r   nnZ
Sequential__init____code__co_filenameZset_rng_stateZ	_inductorZtest_operatorsutilsZ_content_storer.   distributedZis_availableZ;torch.distributed.algorithms._checkpoint.checkpoint_wrapperZ
algorithmsZ_checkpointZcheckpoint_wrapperZoptim__dict__valuesZ_functionalZ_foreach_utilssetr    import_moduler0   ZFBCODE_SKIP_DIRSr   r   r   r   r2   r!   r(   r&   r5   _namer>   	lru_cacher@   r/   r
   r
   r
   r   <module>   s   -













 

