
    PhQ4              	       `   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 d dlZd dl Zd dl!Zd dl"Zddl#m$Z$ ddl%m&Z&m'Z'm(Z( 	 g 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 eZ)dZ*d Z+dejX                  fd	Z-h d
Z.h dZ/ej`                  jc                         re/h dz  Z/h dZ2ej`                  jc                         r"e2jg                  d       e2jg                  d        e	jh                  d      d        Z5 e	jh                  d      d        Z6 e	jh                  d      d        Z7ddge)D  cg c]
  }  e-|        c} z   Z8 ejr                  d      a: e
jv                  d      jy                         Z<h dZ= ejr                  ddj}                   e?ej                  e=             d      ZAd ZBdeCfdZ3ej                   G d d             ZEd(d ZFej                   G d! d"             ZG	 d(d#ZHd(d$ZIe*D ]
  ZJ e3eJ         eB        d% ZK e	jh                  d      d&        ZLd' ZMyc c} w ))    N)Optional   )getfile)NestedUserFunctionVariableUserFunctionVariableUserMethodVariable)	functorch
fx2trt_ossnetworkxnumpy	omegaconfonnxonnxruntimeonnx_tfpandassklearntabulate
tensorflowtensorrt	torch2trttqdmtreetvmxarrayc                 0    t        j                  dd|       S )Nz__init__.py$ )resub)ss    bC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\torch/_dynamo/skipfiles.py_strip_init_pyr!      s    66/2q))    mc                 ,    t        | j                        S N)r!   __file__r#   s    r    _module_dirr(      s    !**%%r"   >   torch._tensor._converttorch._constrain_as_sizetorch._constrain_as_value>   torch.optimtorch._functorch.apistorch._export.wrapperstorch._export.db.examplestorch._functorch.deprecatedtorch._dynamo.external_utilstorch._higher_order_ops.cond torch.ao.quantization.pt2e.utils$torch.ao.quantization.pt2e.qat_utils%torch.ao.quantization.pt2e.eval_utils1torch.ao.quantization.pt2e.representation.rewrite1torch.ao.quantization.quantizer.xnnpack_quantizer>   torch.distributed._tensor.apitorch.distributed.device_mesh%torch.distributed._tensor.device_mesh'torch.distributed.tensor.parallel.style(torch.distributed.tensor.parallel._utils6torch.distributed.tensor.parallel._data_parallel_utils;torch.distributed.algorithms._checkpoint.checkpoint_wrapper>   torch.nntorch._refstorch.ao.nntorch._primstorch.randomtorch.sparsetorch._decomptorch._tensortorch.testingtorch.fx._pytreetorch.distributionstorch.utils._pytreetorch._dynamo.comptimetorch._dynamo.polyfilltorch.amp.autocast_modetorch.autograd.functiontorch.utils._contextlibtorch.fx.passes.shape_proptorch.utils._content_storetorch.utils._foreach_utilstorch.cuda.amp.autocast_modetorch._inductor.test_operators,torch._dynamo._trace_wrapped_higher_order_opztorch.distributedz)torch.distributed._functional_collectivesc                      t               } t        D ]S  }|j                  dd      \  }}t        j                  |      }t        ||      }| j                  |j                         U | S )N.r   )setFUNC_INLINELISTrsplit	importlibimport_modulegetattradd__code__)
inlinelistfmodule_namefn_namer#   fns         r    get_func_inlinelistre      s\    J xxQ/W##K0Q r{{#	 
 r"   c                      t               } t        D ]?  }| j                  t        t              |t        d      d  j                  dd      z          A | S Nztorch.rW   /)rX   LEGACY_MOD_INLINELISTr^   r(   torchlenreplacer`   r#   s     r    get_legacy_mod_inlinelistrn      sG    J"{5)Ac(mo,>,F,FsC,PPQ #r"   c                      t               } t        D ]?  }| j                  t        t              |t        d      d  j                  dd      z          A | S rg   )rX   MOD_INLINELISTr^   r(   rj   rk   rl   rm   s     r    get_mod_inlinelistrq      sG    J{5)Ac(mo,>,F,FsC,PPQ r"   z<frozen importlibz<__array_function__ internals>zmatch nothing^ztorch._inductor.config>   torchrec/distributedtorchrec/fb/distributed5caffe2/torch/fb/sparsenn/pooled_embeddings_modules.pyz.*(|)c            	          t        j                  ddj                  t        t         j                  t
                     d      ay )Nz^(ru   rv   )r   compilejoinmapescape	SKIP_DIRSSKIP_DIRS_RE r"   r    _recompile_rer     s.    ::388C		9,E#F"GqIJLr"   import_namec                    t        | t        j                        rt        | j                        S t        | t
              sJ ddlm}  ||       }|sy |j                  }|y t        j                  t        |             t                y )Nr   )	find_spec)
isinstancetypes
ModuleTyper^   __name__strimportlib.utilr   originr|   appendr!   r   )r   r   module_specr   s       r    r^   r^     sq    +u//0;''((k3'''(K(KF~^F+,Or"   c                   (    e Zd ZU eed<   ee   ed<   y)
SkipResultskippedreasonN)r   
__module____qualname__bool__annotations__r   r   r~   r"   r    r   r   *  s    MSMr"   r   c                 n     t        dd      S t         fdt               D              rt        dd      S |rt               rt        dd      S t        r*t        t        j                               rt        dd      S t        t        j                               rt        dd      S t        dd	      S )
zShould skip this file?Tzfilename is Nonec              3   @   K   | ]  }j                  |        y wr%   
startswith.0dfilenames     r    	<genexpr>zcheck_file.<locals>.<genexpr>4  s     
G+Fa8q!+F   Fz1inlined according skipfiles.LEGACY_MOD_INLINELISTz*inlined according skipfiles.MOD_INLINELISTz,skipped according skipfiles.FBCODE_SKIP_DIRSz%skipped according skipfiles.SKIP_DIRSzinlined by default)	r   anyrn   is_torch_inline_allowed	is_fbcoder   FBCODE_SKIP_DIRS_REmatchr}   )r   is_inlined_calls   ` r    
check_filer   0  s    $ 233

G+D+F
GG?
 	
 28<8
 	
 T-33H=>:
 	
 Lx()$ GHH%!566r"   c                   \    e Zd ZU ee   ed<   ee   ed<   eed<   eej                     ed<   y)FunctionInfopy_objnamer   codeN)	r   r   r   r   objectr   r   r   CodeTyper~   r"   r    r   r   I  s+    V
3-M
5>>
""r"   r   c                 $   t        | t        t        t        f      rJ	 | j	                         }t        || j                         | j                         | j                               }nt        | t        j                        r#t        d | j                  | j                  |       }nmt        | t        j                  t        j                  f      r,t        | | j                   t#        |       | j$                        }nt        | d t#        |       d       }|j&                  t)               v rt+        dd      S |r6|j,                  dk(  rt+        dd      S |j,                  dk(  rt+        dd      S t/        |j0                  |      S # t
        $ r d }Y aw xY w)NFz+inlined according skipfiles.FUNC_INLINELISTpatched_initTzpatched init cannot be inlined.__torch_function__z!allow inlining __torch_function__)r   r   r   r   get_functionNotImplementedErrorr   get_nameget_filenameget_coder   r   co_nameco_filenameFunctionType
MethodTyper   r   r_   r   re   r   r   r   r   )objr   r   fis       r    check_verboser   s  sO   "$68RS	%%'F &#,,.#2B2B2DcllnU	C	($S__cB	C%,,e.>.>?	@ws|S\\
 #tWS\48	ww%''9
 	
 77n$d$EFFWW,,e%HII bkk?331 # 	F	s   F   FFc                 .    t        | |      j                  S r%   )r   r   )r   r   s     r    checkr     s    o.666r"   c                 <     t         fdt               D              S )Nc              3   @   K   | ]  }j                  |        y wr%   r   r   s     r    r   z*is_torch_inline_allowed.<locals>.<genexpr>  s     D/C!x""1%/Cr   )r   rq   r   s   `r    r   r     s    D/A/CDDDr"   c                  4    dd l } t        | j                        S )Nr   )torch._dynamor(   _dynamo)rj   s    r    
dynamo_dirr     s    u}}%%r"   c                 r    | j                  t                     ry| j                  t        t                    S )NF)r   r   r(   rj   r   s    r    is_torchr     s+    :<({5122r"   )F)N_collections_abc_weakrefsetabccollections
contextlibcopycopyregdataclassesenum	functoolsr[   inspect	linecacheloggingmultiprocessingoperatoros	posixpathrandomr   	selectorssignaltempfile	threadingtokenize	tracebackr   typingunittestweakrefr   rj   torch._inductor.test_operatorstorch.distributedtorch.utils._content_storeutilsr   variables.functionsr   r   r   BUILTIN_SKIPLISTTHIRDPARTY_SKIPLISTr!   r   r(   rY   ri   distributedis_availablerp   r^   	lru_cachere   rn   rq   r|   rx   r}   r\   r   FBCODE_SKIP_DIRSry   rz   r{   r   r   r   	dataclassr   r   r   r   r   _namer   r   r   r'   s   0r    <module>r      s     
              	   	             %  !  )X      		 
     	                   ! " # $ % & ' ( ) * + , - . / 0 
1 2 3 4 
5 6 7 8 9 : ; < = > ?  H ,*&5## &  	!!#  6 	!!#*+BC T  T  T  $ ..-[^-./	
 rzz+,#I##$<=GGI	 
 !bjj3sxxBII?O0P'Q&RRS!TU K
S "   
72 # # #D4B7
 !EJ ! E T& &3K /s   .J+