Ë
    M²j[  ã                   ó  — d dl Z d dlmZ d dlZd dlmZ 	 ddedej                  j                  de	dz  dedef
d	„Z
ded
ededefd„Zdej                  j                  deeef   dz  fd„Zddej                  j                  de	defd„Zy)é    N)ÚAny)Ú
LazyStringÚnameÚgmÚmaybe_idÚkwargsÚreturnc                 óÐ   ‡ ‡‡‡‡— dt         fˆˆ fd„Šd‰vrd‰d<   d‰v r$	 t        j                  j                  «       sd‰d<   t        ˆˆˆfd„«      S # t        $ r d‰d<   Y Œ w xY w)z;
    Returns a LazyString that formats the graph code.
    r	   c                  ó   •— ‰ �‰› d‰ › �S ‰S )Nú © )r   r   s   €€úN/var/www/html/ia-enhanced/venv/lib/python3.12/site-packages/torch/fx/_utils.pyÚformat_namez+lazy_format_graph_code.<locals>.format_name   s   ø€ ØÐØ�V˜1˜X˜JÐ'Ð'àˆKó    Úprint_outputFÚcoloredc            	      óŒ   •— t        d ‰ «       › d�‰j                  j                  j                   ‰j                  di ‰¤Ž«      S )Nz===== z =====
r   )Ú_format_graph_codeÚforwardÚ__code__Úco_filenameÚprint_readable)r   r   r   s   €€€r   ú<lambda>z(lazy_format_graph_code.<locals>.<lambda>    sA   ø€ Ô"Ø‘[“]�O 8Ð,Ø�J‰J×Ñ×+Ñ+ØˆB×ÑÑ' Ñ'ó
€ r   )ÚstrÚsysÚstdoutÚisattyÚAttributeErrorr   )r   r   r   r   r   s   ````@r   Úlazy_format_graph_coder      sy   ü€ ðœö ð ˜VÑ#Ø!&ˆˆ~Ñà�FÑð	&Ü—:‘:×$Ñ$Ô&Ø$)��yÑ!ô õ	
óð øô ò 	&Ø %ˆF�9Óð	&ús   ¡#A ÁA%Á$A%ÚfilenameÚ	graph_strc                 ó   — d| › d|› d|› d�S )z7
    Returns a string that formats the graph code.
    zTRACED GRAPH
 r   ú
r   )r   r    r!   s      r   r   r   (   s   € ð ˜T˜F ! H :¨Q¨y¨k¸Ð<Ð<r   Úgraphc                 ó„   — | j                   D ]1  }|j                  dk(  sŒd|j                  v sŒ"|j                  d   c S  y)zF
    Returns the nn_module_stack of the first call_function node.
    Úcall_functionÚnn_module_stackN)ÚnodesÚopÚmeta)r$   Únodes     r   Ú#first_call_function_nn_module_stackr,   /   sD   € ð —‘ò 0ˆØ�7‰7�oÓ%Ð*;¸t¿y¹yÒ*HØ—9‘9Ð.Ñ/Ò/ð0ð r   r+   Ú	num_nodesc                 óâ   — g }| }t        |«      D ]G  }|j                  t        |j                  «       «      «       |j                  dk(  r n|j
                  }ŒI dj                  |ddd…   «      S )zD
    Returns a string of the last num_nodes nodes in the graph.
    Úrootr#   Néÿÿÿÿ)ÚrangeÚappendr   Úformat_noder)   ÚprevÚjoin)r+   r-   Únode_contextsÚcurÚ_s        r   Úget_node_contextr9   9   sn   € ð €MØ
€CÜ�9Óò ˆà×ÑœS §¡Ó!2Ó3Ô4Ø�6‰6�VÒÙØ�h‰h‰ðð �9‰9�]¡4 R 4Ñ(Ó)Ð)r   )N)é   )r   Útypingr   ÚtorchÚtorch._loggingr   r   ÚfxÚGraphModuleÚintr   r   ÚGraphÚdictr,   ÚNoder9   r   r   r   ú<module>rD      sÀ   ðÛ 
Ý ã Ý %ð AEñØ
ðØ—8‘8×'Ñ'ðØ36¸±:ðØPSðàóð@=˜Sð =¨Cð =¸Cð =ÀCó =ð¨u¯x©x¯~©~ð À$ÀsÈCÀxÁ.ÐSWÑBWó ñ*˜5Ÿ8™8Ÿ=™=ð *°Sð *Àô *r   