
    Ph#o                     ,   U 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mZmZmZ 	 d dlZd dlZd dlZd dlmZmZmZmZ d dlmZmZ d dlmZmZ d dlm Z! d dl"m#Z# dd	l$m%Z%m&Z& dd
l'm(Z(m)Z) ddl*m+Z+ ddl,m-Z-m.Z. ddl/m0Z0m1Z1m2Z2m3Z3m4Z4 ddl5m6Z6m7Z7m8Z8m9Z9 ddl:m;Z;m<Z<m=Z= ddl&m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZE ddlFmGZGmHZHmIZI ddlJmKZK ddlLmMZM ddlNmOZO ddlPmQZQmRZR ddlmSZS ddlTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZe  ej                  eg      Zhej                  j                  egd      Zkej                  j                  egd      Zlej                  j                  j                  j                  Zo G d d      Zp ep       Zq ep       Zrdas ej                  e!      d        Zud Zve=j                  d        Zxd7dZyd az e j                         Z|ej                  e}   e~d <   	 	 	 d8d!e+d"ed#efd$Zd% Zd& Zd d'l mZ d d(lmZ  e       Zee}eSf   e~d)<   d*eSd+efd,Ze	 	 	 d9d-ej                  d.eeef   d/eeef   d0eeef   d!e+d"ed#ed1eKd2e6d3eej                     d+eeI   fd4       Zd!e+d1eKfd5Zd6 Zy# e$ r dZY Ww xY w):    N)AnyCallableDictListOptionalSet)compile_contextCompileContext	CompileIdtracing)log_compilation_eventsignpost_event)ConstraintViolationErrorGuardOnDataDependentSymNode)_forward_from_src)format_traceback_short   )configexc)
is_allowedis_numpy)
CompilerFn)remove_dead_coderemove_pointless_jumps) check_inst_exn_tab_entries_validInstructionis_generator propagate_inst_exn_table_entriestransform_code_object)CacheSizeRelevantForFramecompute_cache_sizeexceeds_cache_size_limitis_recompilation)always_optimize_code_objects	skip_codeTorchPatcher)augment_exc_messageBackendCompilerFailedformat_error_msgInternalTorchDynamoErrorTorchRuntimeErrorUncapturedHigherOrderOpErrorunimplementedUnsupported)CheckFunctionManager&get_and_maybe_log_recompilation_reasonGuardedCode)Hooks)OutputGraph)ExecutionRecord)InstructionTranslatorSpeculationLog)BytecodeHook)CleanupManagerCompilationMetricscounterscprofile_wrapperdynamo_timedformat_bytecodeframe_phase_timinggen_record_file_nameincrement_frameis_namedtupleistype
LazyStringorig_code_mapreset_graph_break_dup_checkersetup_compile_debugtroubleshooting_urlwrite_record_to_filebytecode
recompilesc                   $    e Zd Zd Zd Zd Zd Zy)Trackerc                 0    g | _         t               | _        y N)seensetseen_idsselfs    fC:\Users\daisl\Desktop\realtime-object-detection\venv\Lib\site-packages\torch/_dynamo/convert_frame.py__init__zTracker.__init__]   s    	    c                      t        |       j                  vrQt        j                  | fd      } j                  j                  |        j                  j                         y y )Nc                 :    j                   j                        S rN   )rQ   remove)_idxrS   s    rT   <lambda>zTracker.add.<locals>.<lambda>d   s    DMM4H4H4MrV   )idrQ   weakrefrefrO   appendadd)rS   
strong_objobjr[   s   `  @rT   ra   zTracker.adda   sR    ndmm#++j*MNCIIS!MMc" $rV   c                 0    t        |      | j                  v S rN   )r]   rQ   )rS   items     rT   __contains__zTracker.__contains__h   s    $x4==((rV   c                 l    | j                   j                          | j                  j                          y rN   )rO   clearrQ   rR   s    rT   rh   zTracker.cleark   s     		rV   N)__name__
__module____qualname__rU   ra   rf   rh    rV   rT   rL   rL   \   s    #)rV   rL   c                  F    t        | i |}t        |j                         |S rN   )original_forward_from_srcr%   __code__)argskwargsresults      rT   fx_forward_from_src_skip_resultrs   v   s$     ";D!KF!KFfooMrV   c                 P     t        j                          fd       } |_        |S )z
    Context manager to:
        1) Save/restore torch.is_grad_enabled() state
        2) Save/restore python random state
        3) Save/restore torch random state
        4) Monkey patch torch.fx.graph_module._forward_from_src
    c                     t               }t        j                         }t        j                         }t        j                         }t        j
                         }t        j                         }t        j                  j                         }t        j                  j                         rt        j                  j                         }	t        j                  j                  j                  }
t        t        j                  j                  _        t               }	  | i ||j!                          t        j"                  j%                  |       t        j                  j&                  j(                  j+                  |       t        j,                  ||       t        j.                  |       t        j                  j1                  |       t        j                  j                         rt        j                  j1                  	       |
t        j                  j                  _        |j3                         sJ d       S # |j!                          t        j"                  j%                  |       t        j                  j&                  j(                  j+                  |       t        j,                  ||       t        j.                  |       t        j                  j1                  |       t        j                  j                         rt        j                  j1                  	       |
t        j                  j                  _        |j3                         sJ d       w xY w)N)	warn_onlyz>Global state changed while dynamo tracing, please report a bug)GlobalStateGuardtorchis_grad_enabledis_inference_mode_enabled$are_deterministic_algorithms_enabled-is_deterministic_algorithms_warn_only_enabledrandomgetstateget_rng_statecudais_availablefxgraph_moduler   rs   rF   close_C_set_grad_enabledautograd	grad_mode_enter_inference_modeuse_deterministic_algorithmssetstateset_rng_statecheck)rp   rq   guardsprior_grad_modeprior_inference_modeprior_deterministicprior_warn_onlypy_rng_statetorch_rng_statecuda_rng_stateprior_fwd_from_srccleanupfns               rT   _fnz"preserve_global_state.<locals>._fn   sD   !#//1$>>@#HHJMMO(,,446::""$"ZZ557N"XX22DD2Q/%'	Pt&v&MMOHH&&7KK  **@@AUV..# OOL)LL&&7zz&&(

((86HEHH!!3POP MMOHH&&7KK  **@@AUV..# OOL)LL&&7zz&&(

((86HEHH!!3POPs   I D"M&)	functoolswraps_torchdynamo_orig_callable)r   r   s   ` rT   preserve_global_stater      s1     __RP P> &(C"JrV   c                 .   | j                   t        v ry| j                   j                  D ]Z  }|| j                  v s| j                  |   }t	        |      r yt
        s5t        j                  sF|t
        u st        |      sZ y t               fd| j                  j                         D ]  } |      s y t        j                  d| j                   j                  | j                   j                  | j                   j                          y)z+Check if the frame has torch.* related bitsTc           	          t               }|v r|   S d|<   t         t        j                  t        j                  j
                  f      s4t         t              r.t         t        j                  j
                        r
d|<   |   S t        j                  rDt        r>t         t        j                        st         t        j                        r
d|<   |   S t         t        t        f      rt!        fd D              |<   |   S t         t"              r5t         j%                               }t!        fd|D              |<   |   S t         t&        t(        t*        t        d      t,        f      r
d|<   |   S t/               r't!         fd j0                  D              |<   |   S y)z)Recursively check if the obj has a tensorFTc              3   .   K   | ]  } |        y wrN   rl   .0v
has_tensors     rT   	<genexpr>z:has_tensor_in_frame.<locals>.has_tensor.<locals>.<genexpr>   s     ">#Q:a=#   c              3   .   K   | ]  } |        y wrN   rl   r   s     rT   r   z:has_tensor_in_frame.<locals>.has_tensor.<locals>.<genexpr>   s     "A&Q:a=&r   Nc              3   B   K   | ]  } t        |              y wrN   )getattr)r   r   r   rc   s     rT   r   z:has_tensor_in_frame.<locals>.has_tensor.<locals>.<genexpr>   s     "T1:gc1o#>s   )r]   
isinstancerx   TensornnModulerB   type
issubclassr   trace_numpynpndarraygenericlisttupleanydictvaluesstrintfloatboolrA   _fields)rc   obj_idr   r   rQ   s   `  rT   r   z'has_tensor_in_frame.<locals>.has_tensor   sy   CXF## cELL%((//:;3*S%((//"B#HVF##RZZ(JsBJJ,G#HVF##C$'"">#">>HVF##C #**,'F""A&"AAHVF##C#sE4:t<=$HVF##3""T"TTHVF## rV   z0skipping because no torch.* %s             %s %sF)f_coder$   co_names	f_globalsr   r   r   r   r   r   f_localsr   logdebugco_nameco_filenameco_firstlineno)framer   rc   valuer   rQ   s       @@rT   has_tensor_in_framer      s     ||33 <<((eoo%//'*C#f((cRi8C= ) !%H(V &&(e ) II	  ## rV   c                     d }t        | d      r)t        | |      }t        || j                         || _        t        | |       y )Nexec_recordexport)hasattrr?   rH   r   record_filenamer'   )ecoder   r   r   s        rT   exception_handlerr      s=    Oq- .q$7_amm<+&)rV   FRAME_COMPILE_COUNTERcompiler_fn	one_graphr   c                      t                dt        j                  dt        f fd} |_        fd}||_        |S )z&Fully convert a frame into an FX graphr   hooksc                 "   t                | j                  }t        | |      }d t        |      rt	        ||       t
        j                  |       |t        v ry t        j                  j                  d      r-t        j                  j                  d      |j                  k7  ry |j                  dk(  r|j                  j                  d      ry |j                  dk(  ry |j                  dk(  rQ|j                  j                  t        j                  j!                  t"        j$                  j&                              ry |j                  dk(  r|j                  dk(  ry |j                  dk(  r%|j                  dk(  rt)        | j*                        sy t-        |      rt/        d	       t1        |      rId
 }fd}t2        j5                  dt6        j8                   ||       |       t:               t/        d       t=        |       sy t?               a d|vrtB        |d<   tB        dz  a!|d   }tD        |   }	tD        |xx   dz  cc<   tG        ||	      }
tI        dd|j                  |j                  |jJ                  |jL                  |jN                  d       t7        jP                  tS                     5  tU        | j                  | jV                  | jX                  | j*                  ||| ||
      }d d d        |S # 1 sw Y   S xY w)NTORCHDYNAMO_DEBUG_FUNCTIONz	<genexpr>)ztransformers/file_utils.pyztransformers/utils/generic.pyzdiffusers/utils/outputs.py__setattr__rU   z<module>z<string>z<lambda>	generatorc                 V    d| j                    d| j                   d| j                   dS )N'z' (:))r   r   r   )r   s    rT   format_func_infozMconvert_frame_assert.<locals>._convert_frame_assert.<locals>.format_func_infoM  s0    4<<.D,<,<+=Qt?R?R>SSTUUrV   c                        sJ d        d   S )Nz&TODO(whc) any other recompile reasons?rl   )recompile_reasonss   rT   format_guard_failureszRconvert_frame_assert.<locals>._convert_frame_assert.<locals>.format_guard_failuresP  s    (R*RR((,,rV   ztorch._dynamo hit config.cache_size_limit (%s)
   function: %s
   last reason: %s
To log all recompilation reasons, use TORCH_LOGS="recompiles".
To diagnose recompilation issues, see %s.zcache_size_limit reached_idr   dynamoz_convert_frame_assert._compile)r   r   r   
cache_sizeaccumulated_cache_size)frame_state
compile_id)-r@   r   r!   r#   r0   input_codesra   output_codesosenvirongetr   r   endswith
startswithpathdirnamerx   optim__file__r   
f_builtinsr   r-   r"   r   warningr   cache_size_limitrG   r   rw   initial_global_stateFRAME_COUNTERr   r   r   r   num_cache_entries_in_bucketnum_cache_entriespatch_patch_config_if_changed_compiler   r   )r   cache_entryr   r   r   r   r   r   frame_idframe_compile_idr   compiled_productr   r   r   export_constraintsr   s               @rT   _convert_frame_assertz3convert_frame_assert.<locals>._convert_frame_assert  s    	||'{;
 J' FU! 	<JJNN78

;<L<<;&4+;+;+D+D,
 <<=( <<:%$*:*:*E*EGGOOEKK001+

 
 <<:%$*:*:j*H LLJ&  J.))* +&#J/V- KK<
 '' &%'#
 45"5)  01 #!.KQMu%0:h'1,'x)9:
,<<#//"&"5"5(DD*4*F*F
	
 \\245'  "'%  6   ! 6   s   9ALLc                      t        |       S rN   )convert_frame_assert)backendr   r  r   s    rT   _clone_with_backendz1convert_frame_assert.<locals>._clone_with_backend  s    #GY@RSSrV   )rE   types	FrameTyper2   r   r
  )r   r   r   r  r  r
  s   ````  rT   r  r    sR     "#~ ~ 49~  ~ @ 8C4T 1D-  rV   c                     i } t         j                  j                  }|j                          |j                  j
                  | S |j                  j
                  }|j                  |j                  }}t        j                         }|J ||k7  r|} t        j                  t        j                        rt        j                  dt        j                  r|j                         n|j                         dd t        j                  r|j                         n|j                         dd        t        j                          }| D ],  }| |   ||   k7  st        j                  d|| |   ||          . | S )z
    Will return {} if the ambient config is the same as the compile-time.
    Else, returns the compile-time config saved on the code object.
    NzrCurrent config does not match config saved when compiling
Saved hash: %s, Current hash: %s
Restoring saved config.   z* %s=%s (prev: %s))rx   _dynamo
eval_frame _maybe_init_guarded_config_cacheconfig_cachesaved_config_and_hashr   hashget_hashrecompiles_logisEnabledForloggingDEBUGr   verbosehexshallow_copy_dict)r   r  savedsaved_configsaved_config_hashcurrent_config_hashconfig_dict_refkeys           rT   r   r     sR   
 E))J//144<##99E&+llEJJ#L //+***//&&w}}5  P >> "%%'&**,Ra0>> $'')(,,.r2 %668O:!55"((,c
',	  LrV   c                 <    t         j                  rt        |       S | S rN   )r   cprofiler;   )funcs    rT   maybe_cprofiler&    s    %%KrV   )OrderedDict)RemovableHandle_bytecode_hookshookreturnc                 J    t        t              }| t        |j                  <   |S )zRegister hooks for bytecode generated by Dynamo. The hook can do some
    logging, as well as return a new code object to be used. Please refer
    to `BytecodeHook` for the hook signature.
    )r(  r)  r]   )r*  handles     rT   register_bytecode_hookr.    s!    
 _-F!%OFIIMrV   r   globalslocalsbuiltinsr   r   r   c                     !"#$ ddl m m}m$m} d "t               !d }t               #t          !"#$fd       }t        d      dt        j                  dt        dt        d	t        t        t           t         t"        t$        f   gt$        f   d
t&        t(           f
"fd       }t+        t-        |            5  	  | ||      }|ddlm} t#        |      }|܉"|t2        v rt5        "j6                        }"j9                         }t5        "j:                  j<                        }t5        "j>                        }t2        |   jA                  dd       }t2        |   jA                  dd       }"jB                  D ch c]  }|jD                   }}"jF                  D ch c]  }|jD                   }}n"d }d }d }d }d }d }t        i       }t        i       }tI        | jJ                   jL                   jN                  |	jP                  |	jR                  |||||||||      }tU        |       cd d d        S c c}w c c}w # tV        tX        tZ        t\        t^        t`        |tb        |f	$ r }t#        |      }te        | |
        d }~wtf        $ rM}t#        |      }te        | |
       ti        t#        |            jk                  |jl                        d d }~ww xY w# ddlm} t#        |      }|"|t2        v rt5        "j6                        }"j9                         }t5        "j:                  j<                        }t5        "j>                        }t2        |   jA                  dd       }t2        |   jA                  dd       }"jB                  D ch c]  }|jD                   nc c}w }}"jF                  D ch c]  }|jD                   nc c}w }}n"d }d }d }d }d }d }t        i       }t        i       }tI        | jJ                   jL                   jN                  |	jP                  |	jR                  |||||||||      }tU        |       w xY w# 1 sw Y   y xY w)Nr   )bisectBisectValidationExceptiontranslation_validation_enabledValidationExceptionc                    j                          t        | 
|	      }	 t        |j                  j                        5  |j                         5  |j                          d d d        d d d        |j                  j                          |j                  J j                  sJ j                  | d d  |j!                  j"                         t$        j&                  r.t)        |        t+        |        t-        t/        |             | d d  y y # 1 sw Y   xY w# 1 sw Y   xY w# t        j                  $ r j                           t        j                  t        j                  f$ r  t        $ r%         r |j                  j                          w xY w# |j                  j                          w xY w)N)r   speculation_log)restartr5   r   outputtracing_contextset_current_txrunr   UnspecializeRestartAnalysisrh   SpeculationRestartAnalysis	SkipFrame	Exception	shape_envcall_cleanup_hooksoutput_instructionsupdatecode_optionsr   dead_code_eliminationr   r   r   r   )instructionsrF  tracerr3  r1  r   r   r   r  r   r/  r0  mutated_closure_cell_contentsr   r:  r8  r5  s      rT   	transformz_compile.<locals>.transform  s    	!&)#+
 	/6679N9N9P

 :Q7 MM,,.!!!)))) 44QF//0'',\:,\:45El5STLO () :Q9P77.. 	!!#..> 	 	-/v}}../	
 MM,,.sH   D5 
D)D,D)4D5 D&	"D))D2.D5 5A4F))F, ,Gentire_frame_compile)
phase_namer   r   r   rK  r+  c           	         t        j                         D ])  }|t        j                         _        	 t        | |      } n d } |d| j                   | j"                  | j$                  |         |d| j                   | j"                  | j$                         t&        j)                         D ]  } || |      }	|	|	} | t*        |<   t,        j/                  |       J j0                  rj3                         ry j4                  J j6                  t8        j:                  |<   t=        |r|j>                  nd       }
tA        ||
jB                        }j3                         s'|jD                  |jE                  j4                         jF                  jI                          |S # t        j                  $ rI}t        j                  dt        t        |j                               |dkD  rt        d       Y d }~d }~wt        j                  $ rY}t        j                  d|| j                   | j"                  | j$                         |rt        j                  d       Y d }~ y d }~ww xY w)	NzRestarting analysis due to %sd   z100+ RestartAnalysis() callsz.Skipping frame %s %s                     %s %sz%No graph captured with one_graph=Truec           	          t         j                  t        j                        r#t         j	                  t        | ||||             y y rN   )bytecode_logr  r  r  r   r=   )prefixnamefilenameline_nor   s        rT   log_bytecodez5_compile.<locals>.compile_inner.<locals>.log_bytecodeH  s7    ((7""#FD(GTJ 8rV   zORIGINAL BYTECODEzMODIFIED BYTECODE)%	itertoolscountr
   r   attemptr   r   RestartAnalysisr   inforC   r   __traceback__r-   r@  r   r   r   r   r)  r   rD   r   ra   r   is_empty_graphr   cleanupsr8   instancer/   guard_fail_fnr1   check_fnguard_export_fnlocal_scoperh   )r   r   r   rK  rY  out_coder   rV  r*  hook_outputra  guarded_coder:  s               rT   compile_innerz_compile.<locals>.compile_inner'  s*    !(G+2N (0yA	 )2	 	LL	
 	LL	
 $**,DtX.K&& -
 #'h"!!! ==V224}}(((,2OO)'#(Ed

 #8X->->?$$&5+@+@+L !!&--0  "] && B35qG S=!"@A== 		LL$$'' IIEFs$   F--I3 >HI3AI..I3r   )
curr_framebackend_compiler   )7torch.fx.experimental.validatorr3  r4  r5  r6  rP   r6   r   r<   r  CodeTyper   r2   r   r   r   r   r   r   r   r1   r	   r
   utilsrh  r>   lenr   count_callsgraphnodesplaceholdersr   non_compliant_opsrk   compliant_custom_opsr9   r   r   r   r   r   r   r.   r+   r(   AssertionErrorr   r   r,   r   rA  r*   with_tracebackr\  )%r   r/  r0  r1  r   r   r   r  r   r   r   r   r   r4  r6  fail_reasonrK  rg  rf  rh  	frame_keyguard_countgraph_op_countgraph_node_countgraph_input_countentire_frame_compile_timebackend_compile_timeoprr  rs  metricsr   r3  rJ  r:  r8  r5  s%   ````````   `                    @@@@@rT   r   r     s      %)F.1e!!%K$&O+U +U +U +UZ 34ZnnZZ Z T+.S#X?DE	Z
 
+	Z 5Zx 

3	4H	+(y%KL, *JI#&!33!&--0!'!3!3!5#&v||'9'9#: $'(;(;$<!,>y,I,M,M*D-) (:)'D'H'H%t($ @F?W?W$X?WR__?W!$X.4.I.I(.IBOO.I % ( #!%#' $(!,0)'+$$'G!'*2w$(  ##66,, !)$!$G" "'*S 
5	4V %Y(O !$'(%

 	 a&KauV< 	a&KauV<*3q62AA	 *JI#&!33!&--0!'!3!3!5#&v||'9'9#: $'(;(;$<!,>y,I,M,M*D-) (:)'D'H'H%t($ @F?W?W$X?WR__?W$X!$X.4.I.I(.IBOO.I($ ( #!%#' $(!,0)'+$$'G!'*2w$(  ##66,, !)$!$G" "'*S 
5	4s   Q/IB6Q/I$Q/4IA;Q/
Q/*K4 JK4'AK//K44K77B7Q,.O
Q,O+
*BQ,,Q//Q8c                 ~    t        | d      dt        j                  dt        ffd}| |_        fd|_        |S )zHTry to convert a frame into an FX graph, if error leave frame unmodifiedF)r   r   r   c                    t         d   dxx   dz  cc<   	  
| |||      }t         d   dxx   dz  cc<   |S # t        $ r}t        |t              r t        |t              }t
        j                  s|s t        |dd       }| j                  }t        ||||       }	|rt        j                  |	d       nt        j                  |	d       Y d }~y d }~ww xY w)Nframestotalr   okr   T)exc_info)r:   rA  r   r,   r.   r   suppress_errorsr   r   r)   r   r[  r   )r   r  r   r   rr   r   	soft_failr   r   	error_msginner_converts             rT   _convert_framez%convert_frame.<locals>._convert_frame  s    7#q(#%	6"5+ukJFXt$)$M !	6 !9:"1k2I))) &a):DAO<<D(D/5IIT2I5E!	6s    8 	CBCCc                     t        |       S rN   )convert_frame)r	  r   s    rT   r\   zconvert_frame.<locals>.<lambda>  s    wPU9VrV   )r  r  r  r2   r   r
  )r   r   r  r  s    ` @rT   r  r    s?    (FM(eoo (5 (T 1<N-)VN&rV   c                 L   ddl m} t        j                  }dt        _        t	        | d      5 }t        j                  |      }d d d        t        t        j                  j                  j                         t               j                                     |_
        	 t        |j                  |j                  |j                  |j                  |ddd t!               t#        dd      d        |t        _        y # 1 sw Y   xY w# t$        $ r Y #w xY w# |t        _        w xY w)Nr   )eagerFrbr   )r   r   r   r  r   r   r   )backends.debuggingr  r   replay_record_enabledopenr4   loadr   rW  chainr/  itemsr   r   r0  r1  r2   r    rA  )rT  r  original_replay_valin_filerecords        rT   replayr    s    ) 66#(F 	h	 %%g. 
)//&..*>*>*@')//BSTUFN;KKNNMMOO#'0A6	
  (;$+ 
	$   (;$s0   C;AD ;D	DD DD D#)NF)TFN)NNN)collectionsr   rW  r  r   r}   r  typingr^   r   r   r   r   r   r   numpyr   ModuleNotFoundErrorrx   torch._loggingtorch._guardsr	   r
   r   r   torch._utils_internalr   r   %torch.fx.experimental.symbolic_shapesr   r   torch.fx.graph_moduler   rn   torch.utils._tracebackr    r   r   allowed_functionsr   r   backends.registryr   bytecode_analysisr   r   bytecode_transformationr   r   r   r   r   r   r    r!   r"   r#   r  r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r   r/   r0   r1   r   r2   output_graphr3   replay_recordr4   symbolic_convertr5   r6   r7   rl  r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   	getLoggerri   r   _logginggetArtifactLoggerrQ  r  r   r  rw   rL   r   r   r   r   rs   r   #suppress_torch_distributed_warningsr   r   r   Counterr   r   __annotations__r   r  r   r&  r'  torch.utils.hooksr(  r)  r.  rk  r   objectr  r   r  r  rl   rV   rT   <module>r     s       	     ; ;   M M G Q 9  3 ) G   N M	 	 	 
  % * C     ( g!~~//*E11(LI88##**;;  ( iy  *+ ,*Z 11I 2IX* -@[-@-@-B v~~c* B
 	O!O!O! O!d(V $ - ,7=c<'( 8 /   (,p+
..p+#v+p+ fp+ 3;	p+
 p+ p+ p+ p+ *p+ EOO$p+ kp+ p+f0z 0% 0h;m  	Bs   J JJ