
    Bj                        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	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lmZmZ d dlmZ d dlZd dlmZmZmZ d dlmZ d dlm Z  d dl!m"Z" d d	l#m$Z$ d d
l%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7 ddl8m9Z9m:Z: ddl:m;Z; ddl<m=Z=m>Z>m?Z?m@Z@mAZA ddlBmCZC  ejD        eE          ZFdaGeHeIeJeKf                  dz  eLd<   daMeNeLd<   daOeIePeJdz  f         dz  eLd<    e&eEd          ZQ e&eEd          ZReHe         ZS e jT        ddd g          ZUg d!ZVejW        d"eNfd#            ZX	 	 d`d$eHe=         d%eNd&eJdz  d"dfd'ZYd(eHe=         d"ejZ        fd)Z[	 	 dad$eSdz  d*eIeJeJf         d+eJdz  d,ePd"df
d-Z\d*eIeJeJf         d"eIeJeUf         fd.Z]d/ej        j,        d(eSd"dfd0Z^ej_        d"ed         fd1            Z`i aaeIeJeIeJeHeJ         f         f         eLd2<   i abeIeJeHeJ         f         eLd3<   dacePdz  eLd4<   i adeIeJeJf         eLd5<   i aeeIeJeHeJ         f         eLd6<   d afePeLd7<   dbd8Zgej_        d"ed         fd9            Zh G d: d;          Zi G d< d=          Zjd$eSd"dfd>Zkd$eSd"dfd?Zld@eHeJdz           d"dfdAZmd$ee=         d"dfdBZndCeeoeepf                  d"dfdDZqdbdEZrej_        d"ed         fdF            Zsejt         G dG dH                      Zu ejv                    ZwdIePdz  dJeIeJef         d"eIeJeIeJeHeJ         f         f         fdKZxdLeIeJef         d"eIeJeIeJef         f         fdMZyd"eIeJef         fdNZzd"eIeJeIeJeHeJ         f         f         fdOZ{	 dcdPee=         e;z  dQeJdReNd"ePdz  fdSZ|dTedUed"dfdVZ}dWeJd"efdXZ~ddYdZed[eJf         d\ej        j        d]eIeJef         d^e3dz  d"eJf
d_ZdS )d    N)CallableIteratorSequence)AnyIO)patch)
draw_graphget_aot_graph_nameget_graph_being_compiled)fx)save_graph_repro)get_debug_dir)utils)getArtifactLogger)trace_structured)signpost_event)GraphModule)_extract_tensor_metadataTensorMetadata)legalize_graph)FileLike)
OrderedSet)tree_map   )configir)ExternKernel)BaseSchedulerNodeFusedSchedulerNodeNopKernelSchedulerNode
OutputNodeSchedulerNode)VGRAPH_EXECUTION_ORDERFRECORD_GRAPH_EXECUTIONGRAPH_COMPILE_IDSir_pre_fusionir_post_fusionBufMetanamen_origin)dotz-Gnslimit=2z-Gnslimit1=2z-Gmaxiter=5000returnc                  .    t          j        d          d uS )Nr,   )shutilwhich     X/var/www/html/Carbon-Document/venv/lib/python3.11/site-packages/torch/_inductor/debug.pyhas_dotr4   ?   s    <d**r2   nodesprint_graphfnamec           
         t                      st                              d           dS |t                      }t	          |           }|j        D ](}d|j        vr|j        d         j        }t          |t                    r.t          |d         t                    r
|d         f}n|d         }nt          |t                    rj	 |j        d         j        }|                                d         j                                        }|rt          |          nd}n# t           $ r d}Y nw xY wd}t          |t"          j                  r|j        j        }t+          ||ddddd          }	|	|j        d<   *|rt-          |           t/          i |          }
t1          |
           |
j                                         t7          |
|dt8          j        j        	           dS )
z$
    Draw a graph in fname.svg.
    z*draw_buffers() requires `graphviz` packageNfusion_metar   r   r1   tensor_metaF)
clear_metadot_graph_shape)r4   logwarningr   create_fx_from_snodesr5   metagroup
isinstancetupleintstrsnodeget_outputsnodemaybe_get_size	Exceptionr   ComputedBufferdatadtyper   printr   r   graphlintr	   r   tracer<   )r5   r6   r7   rO   rH   rA   rF   sizerM   metadatagms              r3   draw_buffersrU   D   s    99 @AAA}(**!%((E , ,	))	-(.eU## 	%(C(( !qas## 			-06((**1-2AACC'+3d    dB-.. 	$IOE!%dD$MM#+	-   e	R		B2HMMOOO
EeV\5Q     s   	AD  D/.D/snodesc                 n   dt           dt          dt          f         fd}t          j        dg d          }i }i }t
          j                                        }d}g }d}| D ]}	|	                                rd}
|
}n|		                                rd	}
|
}ngt          |	t                    rd
}
|
}nMt          |	t                    r
d}
|	j        }n.t          |	t                    r
d}
|	j        }nt          d          t
          j        j                            |	                                d          }|
 d| } ||          }i }t)          |	d          rd|	                                i}|                    |d|          }dt.          t          z  dt0          ffd |	          r|                    |           |	                                }||_         |||	|
          |j        d<   |||<   |	                                D ]}|||                                <   ||}| D ]}	|	                                }|	j        j        }||         }g }|D ]}|j        |v r||j                 }nQ|                     |          5  |!                    |j                  }|||j        <   ddd           n# 1 swxY w Y   ||k    rq|                    |           tE          |          |_#        |$                    tK          |          dk    r|d         ntE          |                     |S )B
    Creates a FX Graph from a list of SchedulerNode objects.
    r*   r-   .c                 8    dt           dt          fd}| |_        |S )Nargsr-   c                      dS Nr   r1   )rZ   s    r3   func1z;create_fx_from_snodes.<locals>.get_fake_func.<locals>.func1   s    1r2   )r   rD   __name__)r*   r]   s     r3   get_fake_funcz,create_fx_from_snodes.<locals>.get_fake_func   s2    	 	 	 	 	 	 r2   
FusionMeta)rA   rF   typeNexterntemplatenopcomputefusedzUnknown node typeoriginal_atenz: 
get_devicedevicer1   rZ   kwargsrF   c                     t          | t                    r t          fd| j        D                       S t          d |                                 D                       S )Nc              3   .   K   | ]} |          V  d S Nr1   ).0x	in_outputs     r3   	<genexpr>z;create_fx_from_snodes.<locals>.in_output.<locals>.<genexpr>   s+      >>A99Q<<>>>>>>r2   c              3   ^   K   | ](}|j         D ]}t          |j        t                    V  )d S rn   )usersrB   rH   r!   )ro   bufusers      r3   rr   z;create_fx_from_snodes.<locals>.in_output.<locals>.<genexpr>   s[        I   49j11      r2   )rB   r   anyrV   rG   )rF   rq   s    r3   rq   z(create_fx_from_snodes.<locals>.in_output   su    %!344 ?>>>>>>>>>>   ,,..     r2   r9   r   r   )&rE   r   rD   collections
namedtupletorchr   Graph	is_externis_templaterB   r    r"   rA   r   RuntimeError	_inductorr   get_fused_kernel_name	get_nodeshasattrrh   call_functionr   boolappendget_namer*   r@   rG   read_writesreadsinserting_beforeplaceholderrC   rZ   outputlen)rV   r_   r`   buf_to_fx_nodenode_to_fx_noderO   
first_nodeoutputsrA   rF   	node_type
fused_name	func_name	node_funcrk   fx_noder*   ru   depsnew_argsdepdep_noderq   s                         @r3   r?   r?   }   s   
C HS#X$6     '6P6P6PQQJNOHNNEJGE  2! 2!?? 	4 IEE   	4"IEE566 
	4IEE}-- 	4!IKEE122 	4IKEE2333_*@@OO
 

 !00J00	!M),,	5,'' 	4 0 0 2 23F%%ib%HH	.1CC 	 	 	 	 	 	 	 9U 	$NN7###~~&0jy&I&I]# '$$&& 	5 	5C-4N3<<>>** J  ' '~~ &!$' 		& 		&Cx>)))#(3++J77 8 8$00::H/7N38,8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 7""OOH%%%%X	LLs7||q00eGnnEEELs   
%J;;J?J?node_name_to_buf_nameparent_buf_name	n_originsc                 ^   | d S | D ]}|                                 }|                                }|)t          |          dk    rt          ||||n|           Ut          |          dk    r|d         |k    sJ |j        }||j        |j        D ]}|j        }	|	|vr	||n|||	<   d S )Nr   r   )r   r   r   $update_orig_fx_node_name_to_buf_namerH   originsr*   )
r5   r   r   r   rH   buf_namechildren_nodesir_nodeorigin	node_names
             r3   r   r      s    }  ==??))%#n*=*=*A*A0%+3  
  ~&&!++q0AT0I0I0II)?go5o 	 	FI  555 / 7HH_ &i0	% r2   c                 ,   i }|                                  D ]8\  }}||vrt          |g          ||<   ||                             |           9i }|                                  D ]-\  }}t          ||                   }t	          ||          ||<   .|S rn   )itemsr   addr   r)   )r   buf_name_to_n_noder   r   node_name_to_buf_metan_nodes         r3   get_node_name_to_buf_metar     s     4::<< 8 8	8---+5yk+B+Bx(( x(,,Y77774::<< E E	8'122+28V+D+Di((  r2   rT   c                     i }t          ||           |dS t          |          }| j        j        D ]-}|j        |v r"|                    |j                  |j        d<   .dS )rX   Nbuf_meta)r   r   rO   r5   r*   getr@   )rT   rV   r   r   rH   s        r3   annotate_orig_fx_with_snodesr     s     -/(1FGGG$56KLL I I9---$9$=$=di$H$HDIj!I Ir2   c               #     K   t           j                            dd          dk    } dd l}t	          j        |j        j        j                  }t          j
                    }| s5	 d V  |                                 n# |                                 w xY wd S |                    t          dd                     t           j                            t!                      d          }t          j        |d           t	          j        t           j                            |d	t'                       d
                    }|                    t          j                   |                    t	          j        d                     |                    |           	 d V  |                    |           |                                 d S # |                    |           |                                 w xY w)NTORCH_COMPILE_DEBUG01r   z*functorch.compile.config.debug_partitionerTtorchinductor)exist_okaot_z
_debug.log3[%(filename)s:%(lineno)d %(levelname)s] %(message)s)osenvironr   torch._functorch.aot_autogradlogging	getLogger
_functorchaot_autogradr^   
contextlib	ExitStackcloseenter_contextr   pathjoinr   makedirsFileHandlerr
   setLevelDEBUGsetFormatter	Formatter
addHandlerremoveHandler)compile_debugrz   r=   stackr   fhs         r3   enable_aot_loggingr   '  s     JNN#8#>>#EM((((

E,9B
C
CC ""E 	EEEKKMMMMEKKMMMM 
JDQQRRR7<<99DKt$$$$		
3%''333	
 	

 
B KKOOOPP   NN2" 	"s   $A= =BG
 
+G5 _inductor_post_to_pre_grad_nodes._inductor_triton_kernel_to_post_grad_node_info_pre_grad_graph_id#_inductor_pre_grad_node_stack_trace_inductor_kernel_stack_trace(_inductor_kernel_provenance_debug_handlec                  
    da d S r\   )r   r1   r2   r3   -reset_inductor_kernel_provenance_debug_handler   [  s    /0,,,r2   c               #   J  K   t           } t                                          }t                                          }t                                          }t
                                          }t          }da i ai ai ai ada	 dV  | a |a|a|a|a|adS # | a |a|a|a|a|aw xY w)zzContext manager that resets provenance tracking globals upon entering
    and restores their original values when exiting.r   N)r   r   copyr   r   r   r   )original_pre_grad_graph_idoriginal_post_to_pre_grad_nodes-original_triton_kernel_to_post_grad_node_info+original_inductor_pre_grad_node_stack_trace$original_inductor_kernel_stack_trace0original_inductor_kernel_provenance_debug_handles         r3   reset_provenance_globalsr   `  s      "4&F&K&K&M&M#6;;== 2 	,0022 0 ,H+L+L+N+N(0 5
 ')$572*,'#% /0,
 8+J(9 	7 (L$7 	, = 	100 8+J(9 	7 (L$7 	, = 	1 	
 	
 	
 	
s   B B"c                   |   e Zd Z ej                    Zedededz  fd            ZddZ	deddfdZ
	 dd	ed
edededee         f
dZej        	 dd	ed
edededeee                  f
d            ZdedefdZddZddZd	ededdfdZdee         dz  dedz  dedz  ddfdZddZdeded         dz  fdZdS )DebugContextfolder_namer-   Nc                    t           j        j        pt                      }t          j        D ]_}t          j                            |d|  d|           }t          j        	                    |          st          j
        |           |c S `d S )Nr   .)r   rQ   	debug_dirr   r   _counterr   r   r   existsr   )r   r   ndirnames       r3   create_debug_dirzDebugContext.create_debug_dir  s    L*=moo	& 	 	Agll$$$$ G
 7>>'** G$$$ tr2   c                 R    d | _         d | _        t          j                    | _        d S rn   )_prof_pathr   r   _stack)selfs    r3   __init__zDebugContext.__init__  s$    

 *,,r2   new_pathc                    | j         sd S |                    d          s
J |            ddlm} 	  || d          5  t          j                            |          rt          j        |           t          j	        | j         |           d d d            d S # 1 swxY w Y   d S # t          $ r% t                              d| j         |           Y d S w xY w)Nz.debugr   )FileLockz.lockz(Failed to copy debug files from %s to %s)r   endswithfilelockr   r   r   r   r/   rmtreecopytreeOSErrorr=   r>   )r   r   r   s      r3   r   zDebugContext.copy  sL   z 	F  **44H44*%%%%%%	X,,,-- 6 67>>(++ ,M(+++
H5556 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6  	 	 	KK:DJ     	s5   B& ABB& BB&  B!B& &+CCwfilename
write_moderZ   rk   c                 |    | j         sJ t          t          j                            | j         |          |g|R i |S rn   r   openr   r   r   )r   r   r   rZ   rk   s        r3   fopenzDebugContext.fopen  sC     zzBGLLX66
TTTTTVTTTr2   c              /      K   | j         sJ t          t          j                            | j         |          |g|R i |5 }|V  d d d            d S # 1 swxY w Y   d S rn   r   )r   r   r   rZ   rk   fs         r3   fopen_contextzDebugContext.fopen_context  s       zz"',,tz844jR4RRR6RR 	VWGGG	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s    AAAsuffixc                 ^    | j         sJ t          j                            | j         |          S rn   )r   r   r   r   )r   r  s     r3   r   zDebugContext.filename  s'    zzw||DJ///r2   c                    t           j        j        dd l}| j        sJ t
          j                            | j        t
          j                            | j                   d          }|	                    |d          5 }|
                    | j        t
          j                            | j                             d d d            n# 1 swxY w Y   t           j                            |           d S d S )Nr   z.tar.gzzw:gz)arcname)r   rQ   
upload_tartarfiler   r   r   r   basenamer  r   )r   r  tar_filetars       r3   r
  zDebugContext.upload_tar  s    <".NNN::w||
rw//
;;DDD H h// J3
BG,<,<TZ,H,HIIIJ J J J J J J J J J J J J J JL##H----- /.s   ??C

CCc                 z   t           j        rdt          j        d          j        }                    t          j                   dt          dd ffd}| j        	                    ||           | j        
                    t          j        |                      t           j        j        sd S |                     t!                                | _        t           j        j        r |                     dt          j                   t           j        j        r"|                     dt          j                   d S d S )Nztorch._dynamolevelr-   c                 2                         |            d S rn   )r   )r  r=   s    r3   reset_log_levelz/DebugContext.__enter__.<locals>.reset_log_level  s    U#####r2   z	debug.logzinfo.log)r   debugr   r   r  r   r   r   r   callbackr   r#   set_debug_handlerrQ   enabledr   r
   r   	debug_log_setup_log_captureinfo_logINFO)r   
prev_levelr  r=   s      @r3   	__enter__zDebugContext.__enter__  s(   < 	>#O44CJLL'''$s $t $ $ $ $ $ $ K  *===!!!"5d";";<<<|# 	F**+=+?+?@@
<! 	@##K???<  	>##J=====	> 	>r2   r  c                    t          j        d          }| j                            |                     |                    }t          j        |          }|                    |           |                    t          j        d                     |	                    |           |                    t          |j        |                     | j                            |j        |           d S )Nztorch._inductorr   )r   r   r   r   r  StreamHandlerr   r   r   r   minr  r  r   )r   r   r  r=   fdchs         r3   r  zDebugContext._setup_log_capture  s    
  122[&&tzz(';';<<"2&&
E
STT	
 	
 	
 	rSE**+++S.33333r2   exc_typeexc_valexc_tbc                 0   | j         r-| j                                          |                                  | j        rA|                                  t
                              dt                      | j                   | j        	                                 d S )Nz%s debug trace: %s)
r   disable_save_profile_datar   r
  r=   r>   r   r   r   )r   r"  r#  r$  s       r3   __exit__zDebugContext.__exit__  s     : 	&J   ##%%%: 	VOOKK,.F.H.H$*UUUr2   c                    | j         sJ | j                             |                     d                     |                     d          5 }t	          j        | j         |          }|                                 |                    d           |                    d           |                    d           |                    d           d d d            d S # 1 swxY w Y   d S )Nzcompile.profzcompile.stats)streamcumtimed   tottime)	r   
dump_statsr   r  pstatsStats
strip_dirs
sort_statsprint_stats)r   r   statss      r3   r'  zDebugContext._save_profile_data  s   zz
dmmN;;<<<ZZ(( 	#BLB777EY'''c"""Y'''c"""	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#s   BCC!$C!r*   ).Nc                    t           j        j        ret          t           j        |          rK	 t          t	          |           |          S # t
          $ r  t                              dd           Y d S w xY wdt          dt          dd fd}|S )Nz Ignoring exception in debug codeTexc_inforZ   rk   r-   c                      d S rn   r1   rj   s     r3   ignoredz)DebugContext.__getattr__.<locals>.ignored)  s    r2   )	r   rQ   r  getattrDebugFormatterrJ   r=   r>   r   )r   r*   r9  s      r3   __getattr__zDebugContext.__getattr__   s    < 	GFL$$?$? 	~d33T:::   >NNNtt
s c d     Ns   A
 
&A43A4r-   N)r   )r^   
__module____qualname__	itertoolscountr   staticmethodrE   r   r   r   r   r   r  r   contextmanagerr   r  r   r
  r  rD   r  ra   BaseExceptionr(  r'  r   r<  r1   r2   r3   r   r     sS       y  Hc cDj    \- - - -
S T    & U UU U 	U
 U 
CU U U U  	 		 	 		
 	 
"S'		 	 	 	0s 0s 0 0 0 0
. 
. 
. 
.> > > >.44 4 
	4 4 4 4 }%, % d
	
 
   	# 	# 	# 	# (;d(B      r2   r   c                   x   e Zd ZdeddfdZdej        j        deej	                 ddfdZ
dej        j        deej	                 ddfdZd	eddfd
Zd	eddfdZed	edefd            Zd	eddfdZdej        j        d	eddfdZddededdfdZdedeej                 dedef         dedededz  ddfdZdS )r;  handlerr-   Nc                 \    |j         | _         |j        | _        |j        | _        || _        d S rn   )r  r  r   rF  )r   rF  s     r3   r   zDebugFormatter.__init__0  s+    ]
$2(r2   rT   inputsc           
         |                      d          5 }d }t          j        j        j        j        rHt          j        j                            |          }t          j
                            |j                  }t          j        j        j        j        }t          j        j                            ddd          5  t          |||d||           d d d            n# 1 swxY w Y   d d d            n# 1 swxY w Y   |                      d          5 }|                    |                    d                     d d d            d S # 1 swxY w Y   d S )Nzfx_graph_runnable.pyF)ztrace.enabledztrace.save_real_tensorsinductor)save_dirstable_hashzfx_graph_readable.pyprint_output)r  rz   r   r   rQ   save_real_tensors_subclasses
fake_utilstry_convert_fake_to_realr   r   r   r*   r   r   writeprint_readable)r   rT   rH  r   rK  rL  s         r3   fx_graphzDebugFormatter.fx_graph6  s    
 ZZ.// 	2H%+= 4*5NNvVV7??2733
  /06HK'--"'EJJ  
 
 !% +   
 
 
 
 
 
 
 
 
 
 
 
 
 
 
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	, ZZ.// 	<2HHR&&E&::;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	<sH   B(C7>C C7 C$	$C7'C$	(C77C;>C;*EEEc                     |                      d          5 }|                    |                    d                     d d d            d S # 1 swxY w Y   d S )Nzfx_graph_transformed.pyFrM  )r  rS  rT  )r   rT   rH  r   s       r3   fx_graph_transformedz#DebugFormatter.fx_graph_transformedT  s    
 ZZ122 	<bHHR&&E&::;;;	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	< 	<s   *AAAr5   c                     |                      d          5 }|                    |                     |                     d d d            d S # 1 swxY w Y   d S )Nzir_pre_fusion.txtr  rS  	_write_irr   r5   r   s      r3   r'   zDebugFormatter.ir_pre_fusion\  s    ZZ+,, 	,HHT^^E**+++	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	,   )AAAc                     |                      d          5 }|                    |                     |                     d d d            d S # 1 swxY w Y   d S )Nzir_post_fusion.txtrY  r[  s      r3   r(   zDebugFormatter.ir_post_fusion`  s    ZZ,-- 	,HHT^^E**+++	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	,r\  c                     t          j                    }| D ]>}|                    |                                           |                    d           ?|                                S )Nz


)ioStringIOrS  	debug_strgetvalue)r5   ru   rH   s      r3   rZ  zDebugFormatter._write_ird  s[    kmm 	  	 DIIdnn&&'''IIh||~~r2   c                 N    t          ||                     d                     d S )Nzgraph_diagram.svg)r7   )rU   r   )r   r5   s     r3   graph_diagramzDebugFormatter.graph_diagraml  s(    U$--0C"D"DEEEEEEr2   c                     t          ||           t          ||                     d          dt          dt          j        j                   d S )Nzorig_fx_graph_diagram.svgFT)r7   r;   progparse_stack_tracer<   )r   r	   r   GRAPHVIZ_COMMAND_SCALABLEr   rQ   r<   )r   rT   r5   s      r3   draw_orig_fx_graphz!DebugFormatter.draw_orig_fx_grapho  sY    
 	%R///-- ;<<*""L8	
 	
 	
 	
 	
 	
r2   pyr   	extensionc                 \    t          j        ||                     d|                      d S )Nzoutput_code.)r/   r   r   )r   r   rk  s      r3   output_codezDebugFormatter.output_code~  s/    Hdmm,F9,F,FGGHHHHHr2   r*   input_nodestimingsChoiceCallerelapseprecompile_elapseprescreening_elapsec                 l   ddl m dt           j        dt          t          t          f         ffd|t
          j                                        t
          j                                        fd|D             |||d}| 	                    dd	d
          5 }|
                                D ]j\  }	}
t          |	                                          }|                    |           |
|d<   t          j        ||           |                    d           k	 d d d            d S # 1 swxY w Y   d S )Nr   )FixedLayoutrH   r-   c           
         t          | d          r| j        }nd}|t          |           j        d}	 |                                 }t          |          r |j        |j        t          j	        j
                            |j                  t          j	        j
                            |j                  t          j	        j
                            |j        d                    }t!          |          |d<   nt!          |          |d<   n# t"          $ r Y nw xY w	 t!          |                                           |d<   n# t"          $ r Y nw xY w	 t!          |                                           |d	<   n# t"          $ r Y nw xY w	 t!          t          j	        j
                            |                                                     |d
<   n# t"          $ r Y nw xY w	 t!          t          j	        j
                            |                                                     |d<   n# t"          $ r Y nw xY w	 t!          t          j	        j
                            |                                                     |d<   n# t"          $ r Y nw xY wt          | d          r2t          | j        t0          j                  r | j                  |d<   |S )Nr*    )r*   ra   r   )fallback)rM   rR   strideoffsetlayoutrM   ri   ry  rR   numelrL   )r   r*   ra   r^   get_output_specrB   ri   rM   r#   rO   sizevarsoptimization_hintsrR   ry  optimization_hintrz  rE   rJ   	get_dtyperh   
get_strideget_size	get_numelrL   r   IRNode)rH   r   	node_infor{  static_layoutru  build_node_infos        r3   r  z>DebugFormatter.log_autotuning_results.<locals>.build_node_info  s   tV$$  I			!T

+ I--//fk22 6$/K$lW-@@MM w/BB6=QQ w/AA"MA  B    % % %M +.m*<*<Ih''*-f++Ih'   %()9)9%:%:	'""   &)$//*;*;&<&<	(##   &)G$778I8IJJ' '	(##    $'G$77HH% %	&!!    %(G$66t~~7G7GHH& &	'""    tV$$ ?DIry)I)I ?$3ODI$>$>	&!so   CD 
DD $E 
EE$E; ;
FFAG 
G G $AH+ +
H87H8<AJ 
JJc                 &    g | ]} |          S r1   r1   )ro   rH   r  s     r3   
<listcomp>z9DebugFormatter.log_autotuning_results.<locals>.<listcomp>  s#    JJJdOOD11JJJr2   )op_namecuda_device_namecuda_device_countrn  autotuning_timeprecompile_timeprescreening_timezautotuning_result_json_list.txtatzutf-8)encodingbenchmark_result
)r   ru  r  dictrE   rz   cudaget_device_namedevice_countr  r   	info_dictupdatejsondumprS  )r   r*   rn  ro  rq  rr  rs  general_propertiesr   callertimer  ru  r  s               @@r3   log_autotuning_resultsz%DebugFormatter.log_autotuning_results  s    	$#####6	") 6	S#X 6	 6	 6	 6	 6	 6	 6	r  %
 : : < <!&!8!8!:!:JJJJkJJJ%0!4
 
 -tg   
 
 	 '   !1!1!3!344	  !344404	,-	)R(((	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   B D))D-0D-)rj  )r^   r>  r?  r   r   rz   r   r   listTensorrU  rW  SchedulerNodeListr'   r(   rB  rE   rZ  rd  ri  rm  r   r  r  floatr  r1   r2   r3   r;  r;  /  s0            <H < U\"< 
	< < < <<<H < U\"< 
	< < < <,#4 , , , , ,,$5 ,$ , , , , * s    \F#4 F F F F F
H 
 !
 
	
 
 
 
I IC IC I4 I I I ITT ")_T ne+,	T
 T !T #T\T 
T T T T T Tr2   r;  c                     t                               t          j                  r3t                               dt
                              |                      t          j        	                    |            d S )NzBEFORE FUSION
%s)
ir_pre_fusion_logisEnabledForr   r  infor;  rZ  r#   r  r'   r5   s    r3   log_ir_pre_fusionr    s\    %%gl33 U2N4L4LU4S4STTTG%     r2   c                     t                               t          j                  r3t                               dt
                              |                      t          j        	                    |            d S )NzAFTER FUSION
%s)
ir_post_fusion_logr  r   r  r  r;  rZ  r#   r  r(   r  s    r3   log_ir_post_fusionr    s\    &&w|44 U 2N4L4LU4S4STTTG5!!!!!r2   schedulec                      	 t          dd  fd           d S # t          $ r  t                              dd           Y d S w xY w)Nartifactc                      dddS )Ninductor_collective_scheduler  r*   r  r1   r1   r2   r3   <lambda>z+_dump_collective_schedule.<locals>.<lambda>  s    6"! ! r2   c                       S rn   r1   r  s   r3   r  z+_dump_collective_schedule.<locals>.<lambda>  s    x r2   metadata_fn
payload_fnzAFailed to log inductor_collective_schedule via structured loggingTr6  )r   rJ   r=   r  r  s   `r3   _dump_collective_scheduler    s    
  ('''	
 	
 	
 	
 	
 	
  
 
 
		O 	 	
 	
 	
 	
 	
 	

s    &AAc                 J    fd| D             }|rt          |           d S d S )Nc           	          g | ]>}t          t          |d d          xt          j                  -t          dd          ?S )rH   Npython_kernel_name)rB   r:  r   _CollectiveKernel)ro   rH   ops     r3   r  z+log_collective_schedule.<locals>.<listcomp>  sZ       GD&$777b9MNN($//  r2   )r  )r5   r  r  s     @r3   log_collective_scheduler    sS         H  ,!(+++++, ,r2   node_runtimesc           	         	 t           j        j        j        dt          t
                   dz  dt          t
                   ffd}dt
          dt          dz  fd}g | D ](\  }}t          |j	        d|
                                          }t          j        |j	                  rdnd	}g }	 |                                D ]}|j	        }	|	                                }
t          |	j        t"          j                  r|	                                nd}|	                                }|                     ||
           ||           ||          d
           n# t,          $ r Y nw xY w                    ||||d           *t/          dd fd           dS # t,          $ r  t0                              dd           Y dS w xY w)zDLog per-op runtime estimates and output tensor metadata for TLParse.rp   Nr-   c                 <    | t           |                     ng S rn   )r  )rp   to_optimization_hintss    r3   to_listz,log_runtime_and_tensor_meta.<locals>.to_list	  s&    56]4--a00111Jr2   rM   c                 V    | d S t          |           }|                    d          }|S )Nztorch.)rE   removeprefix)rM   ss     r3   dtype_to_strz1log_runtime_and_tensor_meta.<locals>.dtype_to_str  s-    }tE

Ax((AHr2   r  
collectivere   )shapery  rM   )r*   ra   estimated_runtime_nsr   r  c                      dddS )N inductor_runtime_and_tensor_metar  r  r1   r1   r2   r3   r  z-log_runtime_and_tensor_meta.<locals>.<lambda>9  s    :"! ! r2   c                      d iS )Nopsr1   )r  s   r3   r  z-log_runtime_and_tensor_meta.<locals>.<lambda>=  s    s| r2   r  z.Failed to log inductor_runtime_and_tensor_metaTr6  )r#   rO   r~  r  r   r   r  rE   r:  rH   r   r   is_collectiverG   rI   rB   r{  r   Layoutr  maybe_get_dtyper   rJ   r   r=   r  )r  r  r  r  
runtime_nsr*   op_typer   ru   irnoder  ry  rM   r  r  s                @@r3   log_runtime_and_tensor_metar    sp   :S ! 0 C	Kx}t+ 	KS	 	K 	K 	K 	K 	K 	K	 	d
 	 	 	 	 %'* !	 !	MAz16#7FFD&+&9!&&A&APllyG -/G==??  C XF"1133E &fmRY??"))+++! 
 #2244ENN%,WU^^&-gfoo%1\%%8%8          JJ #,6&	     	  ,+++	
 	
 	
 	
 	
 	
  S S S		BT	RRRRRRSs7   B)F" .B/EF" 
E+(F" *E++5F" "&GGc                      t           sdS 	 t          dd d            dS # t          $ r  t                              dd           Y dS w xY w)	z:Emit a structured artifact with the graph execution order.Nr  c                      dddS )Ngraph_executionr  r  r1   r1   r2   r3   r  z%log_graph_execution.<locals>.<lambda>J  s    )"! ! r2   c                      dt           iS )Ngraph_execution_order)r$   r1   r2   r3   r  z%log_graph_execution.<locals>.<lambda>N  s     79NO r2   r  zFailed to log graph_executionTr6  )r$   r   rJ   r=   r  r1   r2   r3   log_graph_executionr  C  s      
B  PO	
 	
 	
 	
 	
 	
  B B B		1D	AAAAAABs   ! &A
Ac               #   z   K   g a i ada	 dV  t                       dada dadS # t                       dada daw xY w)z5Record graph execution order and log it once on exit.TNF)r$   r&   r%   r  r1   r2   r3   $record_and_log_graph_execution_orderr  T  sy       !!!& $  	!& $     s   $ :c                   .    e Zd ZU eed<   ej        ed<   dS )TensorMetadataHoldertensor_metadatari   N)r^   r>  r?  r   __annotations__rz   ri   r1   r2   r3   r  r  d  s,         ####Lr2   r  pre_grad_graph_idpost_to_pre_grad_nodes_jsonc           	         i i d}t          |t                    st                              d           |S t          | t                    s|S t          j        t                    }t          j        t                    }	 dt          t          t          f         dt          fd}|                                D ]\  }t          |t                    st                              d           |c S |D ]M} ||          s|c c S |                    d          | k    rB||d                                                 |                             |d                    fd	|                    d
g           D             }|r|                                \  }	 ||	          s|c c S |	                    d          | k    rB||	d                                                 |                             |	d                    |                    fd|	                    d
g           D                        |Odt          t          t          f         ddfd}
 |
|            |
|           ||dS # t"          $ ru}t%          dddt          |          t'          j                    d           t                              d|           t                              d|            |cY d}~S d}~ww xY w)zx
    Create bidirectional mappings between pre_grad graph nodes
    and post_grad graph code nodes, and vice versa.
    )	preToPost	postToPrezCProvenance tacking error: post_to_pre_grad_nodes_json is not a dictrH   r-   c                     t          | t                    st                              d           dS d| vsd| vsd| vrt                              d           dS dS )NzVProvenance tacking error: node provenance in post_to_pre_grad_nodes_json is not a dictFgraph_idr*   	from_nodezYProvenance tacking error: node provenance in post_to_pre_grad_nodes_json has wrong formatT)rB   r  r=   error)rH   s    r3   check_formatz8create_mapping_pre_post_grad_nodes.<locals>.check_format  sy    dD)) 		l   u%%t););{RV?V?V		o   u4r2   zIProvenance tacking error: post_to_pre_grad_nodes_json value is not a listr  r*   c                     g | ]}|fS r1   r1   )ro   r   	outer_keys     r3   r  z6create_mapping_pre_post_grad_nodes.<locals>.<listcomp>  s    KKKA!YKKKr2   r  c              3       K   | ]}|fV  	d S rn   r1   )ro   r   
parent_keys     r3   rr   z5create_mapping_pre_post_grad_nodes.<locals>.<genexpr>  s8       ! !,-J! ! ! ! ! !r2   dNc                 ^    | D ]}t          | |                   | |<   t          |           } d S rn   r  r  r  keys     r3   convert_sets_to_listszAcreate_mapping_pre_post_grad_nodes.<locals>.convert_sets_to_lists  5     & &af#QAAAr2   rJ  provenance_tracking_error"create_mapping_pre_post_grad_nodesfunction	error_msgstack_tracez post_to_pre_grad_nodes_json:  %szpre_grad_graph_id:  %s)rB   r  r=   r  rD   rx   defaultdictr   rE   r   r   r   r  r   r   popextendrJ   r   	traceback
format_exc)r  r  empty_returnpre_to_postpost_to_prer  
node_arrayrH   r   current_noder  er  r  s               @@r3   r  r  m  s    5 5L
 1488 		WXXX'--  "-"9*"E"EK"-"9*"E"EKD	tCH~ 	$ 	 	 	 	 &A%F%F%H%H 	 	!Izj$// $		_   $###"  #|D)) (''''''88J''+<<<V-11)<<<	*..tF|<<< LKKK+r1J1JKKK 	/4yy{{,L*'<55 ,++++++#''
337HHH#L$89==jIII#J/33L4HIIILL ! ! ! !1=1A1A+r1R1R! ! !     	*	T#s(^ 	 	 	 	 	 	k***k***$$
 
 	
     	'@ VV(355 	
 	
 	
 			46QRRR		*,=>>>s4   A0J 4J 
B&J 1CJ 
L A*K;5L ;L triton_kernel_to_post_grad_jsonc           	         i i d}t          | t                    st                              d           |S t	          j        t                    }	 |                                 D ]X\  }}t          |t                    st                              d           |c S |D ]}||         	                    |           Ydt          t          t          f         ddfd} ||           | |dS # t          $ rZ}t          dd	d
t          |          t          j                    d           t                              d|            |cY d}~S d}~ww xY w)zqCreate bidirectional mappings between triton kernel name and post_grad
    graph code nodes, and vice versa.
    )cppCodeToPostpostToCppCodezGProvenance tacking error: triton_kernel_to_post_grad_json is not a dictzMProvenance tacking error: triton_kernel_to_post_grad_json value is not a listr  r-   Nc                 ^    | D ]}t          | |                   | |<   t          |           } d S rn   r  r  s     r3   r  zFcreate_node_mapping_kernel_to_post_grad.<locals>.convert_sets_to_lists  r  r2   rJ  r  "create_mapping_kernel_to_post_gradr  z$triton_kernel_to_post_grad_json:  %s)rB   r  r=   r  rx   r  r   r   r  r   rE   r   rJ   r   r  r  )r
  r  post_to_cpp_coder  r  	curr_noder  r	  s           r3   'create_node_mapping_kernel_to_post_gradr    s    / /L
 5t<< 		U	
 	
 	
 '2'>z'J'J$%D%J%J%L%L 	; 	;!Izj$// $		c   $###' ; ;	 +//	::::;	T#s(^ 	 	 	 	 	 	.///<-
 
 	
     	'@ VV(355 	
 	
 	
 			24S	
 	
 	
 s'   AC- AC- -
E7AEEEc            	         	 i } t           r}t          t                    }i t          |} t          j        j        rMt          j        	                    dd          5 }t          j        | |           d d d            n# 1 swxY w Y   d| d<   | S # t          $ r?}t          dddt          |          t          j                    d           i cY d }~S d }~ww xY w)	Nz/inductor_provenance_tracking_node_mappings.jsonr   g       @versionrJ  r  dump_inductor_provenance_infor  )r   r  r   r   r   rQ   r  r#   r  r  r  r  rJ   r   rE   r  r  )node_mappingnode_mapping_kernelr   r	  s       r3   r  r  
  sM   " (* 	0"I># #2%L |# 0W]]Es  0IlB///0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 #&Y    	'; VV(355 	
 	
 	
 						sB   AB A=1B =BB B	B 
C4CCCc            	         	 t                               di           } t          t                                                    t          t
                                                    z  }i }|D ]}t
                              |g           }t                      }|D ]+}|                    |                     |g                      ,t                              |g           |t          |          d||<   |S # t          $ r?}t          dddt          |          t          j                    d           i cY d}~S d}~ww xY w)zCreate kernel information JSONr  )stack_tracespost_grad_nodespre_grad_nodesrJ  r  create_kernel_information_jsonr  N)r   r   r   r   keysr   r  r  rJ   r   rE   r  r  )r  all_kernelsresultkernel_namer  r  	post_noder	  s           r3   r  r  0  ss   %
 7::;KK !=!B!B!D!DEE
:??AAI
 I
 
 & 	 	KLPPR O /9llN, F F	%%kooi&D&DEEEE != @ @b Q Q#2"&~"6"6# #F;  
 
 
'< VV(355 	
 	
 	
 						
s   C6C9 9
E4D=7E=Enode_scheduler   r|   c           	      6  
 t           j        j        dk    rdS 	 ddlm}m} t          dz  ag }| dt           }|rt          | t                    sJ t          
                    |g           
| j        r&| j        j        }|
vr
                    |           n&
                    
fd| j        D                        t!          |                                           }nt          | t                     sJ t%                      }| D ]}|||fvry|j        rt          
                    |g           
|                    |j                                                   
                    
fd|j        j        D                        t!          |          }t*          
                    |g                               |           t          S # t,          $ r>}	t/          dd	d
t1          |	          t3          j                    d           Y d}	~	dS d}	~	ww xY w)z
    Set the mapping between `kernel_name` and the post_grad nodes in `node_schedule`.

    Returns a unique int debug handler for each call to this function.
    r   Nr   )DisableReductionEnableReduction:c              3   8   K   | ]}|j         v|j         V  d S rn   r*   ro   r   curr_node_infos     r3   rr   z:set_kernel_post_grad_provenance_tracing.<locals>.<genexpr>  s>       & &{.88 K8888& &r2   c              3   8   K   | ]}|j         v|j         V  d S rn   r(  r)  s     r3   rr   z:set_kernel_post_grad_provenance_tracing.<locals>.<genexpr>  sC       . . !'%{.@@ #K  A@@@	. .r2   rJ  r  'set_kernel_post_grad_provenance_tracingr  )r   rQ   provenance_tracking_levelcodegen.simd_kernel_featuresr$  r%  r   rB   r   r   
setdefaultorigin_noder*   r   r  r   r  get_stack_tracesr   rH   r  r   rJ   r   rE   r  r  )r"  r   r|   r$  r%  r  origin_node_namestack_traces_setrF   r	  r*  s             @r3   r,  r,  Z  s    |-22t?SSSSSSSS 	1A50"$$QQ'OQQ &	2m\:::::KVVR N ( 	#0#<#A #>99"))*:;;;%% & & & &"/"7& & &   
   > > @ @AALLmT222220:&  2B CCCz-JUU +R  ' )//
0K0K0M0MNNN&-- . . . . +0**<. . .      011L$//R@@GGUUU77    	'E VV(355 	
 	
 	
 ttttts   F5G 
H3HHrZ   rk   c                  T   t           j                            t          j                    d          }t           j                            |          st          j        |           dt          dt          fd}t          || |f          \  }}d}| d| dt          t                     d}t          |d	          5 }t          j        ||f|           d
d
d
           n# 1 swxY w Y   t                              t           j                  rd| d|d}	t%          |	           d
S d
S )z
    This function is used to save arguments for a compile_fx_inner function call
    to the file system.  Later on one can replay the compile_fx_inner call
    with the saved arguments using load_args_and_run_compile_fx_inner.
    inductor_saved_argsrp   r-   c                 ~    t          | t          j                  r"t          t	          |           | j                  S | S )z
        Pickle FakeTensor will result in error:
        AttributeError: Can't pickle local object 'WeakValueDictionary.__init__.<locals>.remove'

        Convert all Tensor to metadata. This may also makes pickle faster.
        )rB   rz   r  r  r   ri   rp   s    r3   handle_tensorz5save_args_for_compile_fx_inner.<locals>.handle_tensor  s8     a&& 	'(@(C(CQXNNNHr2   compile_fx_inner/_z.pklwbNz3
Arguments for a compile_fx_inner call is saved to z. To replay the call,
run the following:

from torch._inductor.debug import load_args_and_run_compile_fx_inner
load_args_and_run_compile_fx_inner(z
)
        )r   r   r   tempfile
gettempdirr   mkdirr   r   nextsave_args_cntr  pickler  r=   r  r   r   rN   )
rZ   rk   folderr8  args_to_savekwargs_to_savefn_namer   r  messages
             r3   save_args_for_compile_fx_innerrH    s    W\\(-//1FGGF7>>&!! 

 
 
 
 
 
 $,MD&>#J#J L. G::w::m!4!4:::D	dD		 7Q\>2A6667 7 7 7 7 7 7 7 7 7 7 7 7 7 7 && 37 
 %)   	g s   ;CC#&C#r   c                    ddl m} t          | d          5 }t          j        |          \  }}d d d            n# 1 swxY w Y   dt
          dt
          fd}t          j                            d          }|5  t          j
        d	d
          5  t          |||f          \  }} ||i |cd d d            cd d d            S # 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nr   )r9  rbrp   r-   c                     t          | t                    rJt          j        j                            | j        j        | j        j        | j        j	        | j
                  S | S rn   )rB   r  rz   _dynamotestingrand_stridedr  r  ry  rM   ri   r7  s    r3   r8  z9load_args_and_run_compile_fx_inner.<locals>.handle_tensor  sY    a-.. 	=(55!'!(!'	   Hr2   T)allow_non_fake_inputs	save_argsF)torch._inductor.compile_fxr9  r  rB  loadr   rz   rP  FakeTensorModer   r   r   )r   r9  r  rZ   rk   r8  	fake_modes          r3   "load_args_and_run_compile_fx_innerrU    s   ;;;;;;	dD		 &Q{1~~f& & & & & & & & & & & & & & &	 	 	 	 	 	 !00t0LLI	 1 1FLe44 1 1f~>>f0001 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1sC   ;??:CC-CC
	
CC
	CC"%C")package_pathfunc.exported_programinductor_configsrV  c                   ddl m} ddlm} ddlm} ddlm} |j        j	        }|
                    d          }	t          |	t          j        j                  sJ |j        \  }
}	 |r|j        j        dk    r ||d	|
           |r|j        j        dk    rt#          j        |	          }t#          j        |j                  }t#          j        |          } |||d         |d         |
          \  }}t'          |          }t          j                            ||d          } | |
                    d          |||dd            | |	|
||||          S # |$ r0} ||dd|           t*                              d           |d }~wt.          $ r,}|r#d}|j        j        dk    rd} ||d	||           |d }~ww xY w)Nr   )AccuracyError)dump_to_minify)r   )_aoti_flatten_inputsF)check_guards   aot_inductor)options   r   )strictTaccuracy)rY  rV  load_and_runcheck_accuracy)rY  rV  re  aot_inductor_accuracyminify)commandra  zAccuracy failedrun)torch._dynamo.debug_utilsr[  torch._dynamo.repro.aotir\  torch._inductorr   rQ  r]  r`  dump_aoti_minifiermodulerB   rz   r   r   example_inputsrepro_levelr   deepcopyrC   exportr=   r>   rJ   )rW  rX  rY  rV  r[  r\  r   r]  use_minifierrT   rZ   rk   gm_copyexample_inputs_copyconfig_copyflat_example_inputstuple_inputsflattened_epr	  ri  s                       r3   aot_inductor_minifier_wrapperr{    s    877777777777&&&&&&??????&9L		 	 e	 	4	4Bb%(./////#2LD&> 	F/;q@@N (   
  	F/;q@@ mB''G"&-0@0O"P"P-(899K/C/C#A&#A&#	0 0 0, !!455L <..wU.SSLD###77!,)!)    t-%%
 
 
 	
    #$		
 	
 	
 	
 	%&&&    	G".!33N (	    s%   'C7E G$+FG'GG)FNr\   r=  )F)rx   r   r   dataclasses	functoolsr_  r@  r  r   r   os.pathrB  r/  r/   r=  r  collections.abcr   r   r   typingr   r   unittest.mockr   rz   functorch.compiler	   r
   r   r   torch._dynamo.repro.after_aotr   torch._dynamo.utilsr   rm  r   torch._loggingr   torch._logging._internalr   torch._utils_internalr   torch.fx.graph_moduler   torch.fx.passes.shape_propr   r   torch.fx.passes.tools_commonr   torch.typesr   torch.utils._ordered_setr   torch.utils._pytreer   rw  r   r   r   	schedulerr   r   r    r!   r"   virtualizedr#   r   r^   r=   r$   r  r  rE   objectr  r%   r   r&   rD   r  r  r  ry   r)   rh  cacher4   rU   r{   r?   r   r   r   rC  r   r   r   r   r   r   r   r   r   r   r;  r  r  r  r  rC   r  r  r  r  	dataclassr  rA  rA  r  r  r  r  r,  rH  rU  rs  ExportedProgramr{  r1   r2   r3   <module>r     s	                     				       				          8 8 8 8 8 8 8 8 8 8                V V V V V V V V V V       : : : : : : - - - - - - ! ! ! ! ! ! , , , , , , 5 5 5 5 5 5 0 0 0 0 0 0 - - - - - - O O O O O O O O 7 7 7 7 7 7             / / / / / / ( ( ( ( ( (                                  g!! 9= tDf-.5 < < <$  $ $ $26 4S4Z(4/ 6 6 6%%h@@ &&x1ABB I 
 +
 VZ,@
A
ATTT  + + + + + 6 6!"66 :6 
	6 6 6 6r`$'8"9 `bh ` ` ` `L #'	! !t#!S>! 4Z! 	!
 
! ! ! !H!S>!	#w,! ! ! !$III 
I I I I" %HTN % % % %V EG  $sDd3i,@'@"A F F FGI .S$s)^0D I I I!% C$J % % %68 #T#s(^ 8 8 857 d3S	>2 7 7 701 (# 1 1 11 1 1 1
 /
(4. /
 /
 /
 /
dY Y Y Y Y Y Y Yxf f f f f f f fR!. !4 ! ! ! !"/ "D " " " "
S4Z(8 
T 
 
 
 
"	,8,=#> 	,4 	, 	, 	, 	,=Sxc5j8I/J =St =S =S =S =S@B B B B" !htn ! ! ! !        
  	!!^Tz^!%c3h^ 
#tCcN#
#$^ ^ ^ ^B9%)#s(^9	#tCH~
9 9 9 9x#tCH~ # # # #L'S$sDI~2F-F(G ' ' ' 'Z M M-.=MM M 	4Z	M M M M`+# + + + + + +\1S 1S 1 1 1 18 %)Q Q Q
38
Ql2Q 38n	Q
 T/Q 	Q Q Q Q Q Qr2   