§
    9˜ºh  ã                   ó    — 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	 d dl
Z
d„ Zd„ Zdd„Zdd„Zd	„ Zd
„ Zd„ Zedk    r e¦   «          dS dS )é    Né   )ÚstartÚfinalizeÚ_select_backend)Úset_command_linec            	      óP  — t          j        ddt           j        ¬¦  «        } |                      ddt          d¬¦  «         |                      dd	t          d
d g d¢¬¦  «         |                      ddt          ddddg¬¦  «         |                      ddt          dddg¬¦  «         |                      ddt          dd d dg¬¦  «         |                      ddt          dd d dg¬¦  «         |                      dt           j        d¬ ¦  «         |                      ¦   «         }||j        fS )!NzBThe proton command utility for profiling scripts and pytest tests.zÒ
    proton [options] script.py [script_args] [script_options]
    proton [options] pytest [pytest_args] [script_options]
    python -m triton.profiler.proton [options] script.py [script_args] [script_options]
)ÚdescriptionÚusageÚformatter_classz-nz--namezName of the profiling session)ÚtypeÚhelpz-bz	--backendzProfiling backend)ÚcuptiÚcupti_pcsamplingÚ	roctracer)r   r   ÚdefaultÚchoicesz-cz	--contextzProfiling contextÚshadowÚpythonz-dz--datazProfiling dataÚtreez-kz--hookzProfiling hookÚtritonz-iz--instrumentzInstrumentation analysis typeúprint-mem-spacesÚtarget_argszSubcommand and its arguments)Únargsr   )ÚargparseÚArgumentParserÚRawTextHelpFormatterÚadd_argumentÚstrÚ	REMAINDERÚ
parse_argsr   )ÚparserÚargss     ú^/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/triton/profiler/proton.pyÚparse_argumentsr$   
   sq  € ÝÔ$ØXð aõ Ô2ð4ñ 4ô 4€Fð ×Ò˜˜h­SÐ7VÐÑWÔWÐWØ
×Ò˜˜kµÐ:MÐW[Ø JÐ JÐ Jð ñ Lô Lð Là
×Ò˜˜kµÐ:MÐW_Ø!)¨8Ð 4ð ñ 6ô 6ð 6à
×Ò˜˜h­SÐ7GÐQWÐbhÐaiÐÑjÔjÐjØ
×Ò˜˜h­SÐ7GÐQUÐ`dÐfnÐ_oÐÑpÔpÐpØ
×Ò˜˜nµ3Ð=\ÐfjØ!%Ð'9Ð :ð ñ <ô <ð <à
×Ò˜­XÔ-?ÐFdÐÑeÔeÐeØ×ÒÑÔ€DØ�Ô!Ð!Ð!ó    c                 óH   — t           j                             | ¦  «        dk    S )NÚpytest)ÚosÚpathÚbasename)Úscripts    r#   Ú	is_pytestr,      s   € ÝŒ7×Ò˜FÑ#Ô# xÒ/Ð/r%   c                 ó²  — t           j                             | ¦  «        }ddd|dt          t          j        t          i}t          j        }| g|z   t          _        t          j                             t           j                             |¦  «        ¦  «         t           j                             t          j
        ¦  «        }|dk    rot          t          t          j        |¦  «                             d¦  «        d ¦  «        ¦  «        }dt           j        d<   d	t           j        d
<   |t           j        d<   	 t#          |d¦  «        5 }t%          |                     ¦   «         |d¦  «        }	d d d ¦  «         n# 1 swxY w Y   t)          |	|¦  «         n)# t*          $ r}
t-          d|
› �¦  «         Y d }
~
nd }
~
ww xY w|t          _        d S # |t          _        w xY w)NÚ__name__Ú__main__Ú__file__Ú__builtins__r   zlibPrintLoadStoreMemSpaces.soÚ1ÚTRITON_ALWAYS_COMPILEÚ0ÚTRITON_DISABLE_LINE_INFOÚLLVM_PASS_PLUGIN_PATHÚrbÚexecz.An error occurred while executing the script: )r(   r)   Úabspathr1   Úsysr.   ÚargvÚappendÚdirnamer   r0   r   ÚnextÚpathlibÚPathÚrglobÚenvironÚopenÚcompileÚreadr8   Ú	ExceptionÚprint)r+   r"   Úinstrumentation_passÚscript_pathÚclean_globalsÚoriginal_argvÚtop_level_triton_pathÚinstrumentation_pass_pathÚfileÚcodeÚes              r#   Úexecute_as_mainrQ   #   së  € Ý”'—/’/ &Ñ)Ô)€Kð 	�JØ�KØ�ÝŒ•cð	€Mõ ”H€MØˆx˜$‰…C„Hå„H‡O‚O•B”G—O’O KÑ0Ô0Ñ1Ô1Ð1ÝœGŸOšO­F¬OÑ<Ô<ÐàÐ1Ò1Ð1Ý$'Ý•”Ð3Ñ4Ô4×:Ò:Ð;ZÑ[Ô[Ð]aÑbÔbñ%dô %dÐ!à.1�Œ
Ð*Ñ+Ø14�Œ
Ð-Ñ.Ø.G�Œ
Ð*Ñ+ð!Ý�+˜tÑ$Ô$ð 	=¨Ý˜4Ÿ9š9™;œ;¨°VÑ<Ô<ˆDð	=ð 	=ð 	=ñ 	=ô 	=ð 	=ð 	=ð 	=ð 	=ð 	=ð 	=øøøð 	=ð 	=ð 	=ð 	=åˆT�=Ñ!Ô!Ð!Ð!øÝð Dð Dð DÝÐB¸qÐBÐBÑCÔCÐCÐCÐCÐCÐCÐCøøøøðDøøøð !�Œˆˆø�=�ŒÐ Ð Ð Ð sT   Ä5F Å$E5Å)F Å5E9Å9F Å<E9Å=F ÆG Æ
F7ÆF2Æ-G Æ2F7Æ7G ÇGc                 óæ   — t          ¦   «          | d         }t          | ¦  «        dk    r
| dd …         ng }t          |¦  «        rdd l}|                     |¦  «         d S t          |||¦  «         d S )Nr   r   )r   Úlenr,   r'   ÚmainrQ   )r   rH   r+   Úscript_argsr'   s        r#   Údo_setup_and_executerV   E   s…   € åÑÔÐà˜Œ^€FÝ%(¨Ñ%5Ô%5¸Ò%9Ð%9�+˜a˜b˜b”/�/¸r€KÝ�ÑÔð CØˆˆˆØ�Š�KÑ Ô Ð Ð Ð å˜ Ð-AÑBÔBÐBÐBÐBr%   c                 óÈ   — | j         r| j         nt          ¦   «         }t          | j        | j        | j        || j        ¬¦  «         t          |¦  «         t          ¦   «          d S )N)ÚcontextÚdataÚbackendÚhook)	rZ   r   r   ÚnamerX   rY   r[   rV   r   )r"   r   rZ   s      r#   Úrun_profilingr]   R   sX   € Ø"œlÐAˆdŒlˆlµÑ0AÔ0A€Gå	ˆ$Œ)˜Tœ\°´	À7ÐQUÔQZÐ[Ñ[Ô[Ð[å˜Ñ%Ô%Ð%å�J„J€J€J€Jr%   c                 ó0   — t          || j        ¦  «         d S ©N)rV   Ú
instrument©r"   r   s     r#   Úrun_instrumentationrb   \   s   € Ý˜ d¤oÑ6Ô6Ð6Ð6Ð6r%   c                  óz   — t          ¦   «         \  } }| j        rt          | |¦  «         d S t          | |¦  «         d S r_   )r$   r`   rb   r]   ra   s     r#   rT   rT   `   sG   € Ý'Ñ)Ô)Ñ€Dˆ+Ø„ð Ý˜D +Ñ.Ô.Ð.ØˆÝ�$˜Ñ$Ô$Ð$Ð$Ð$r%   r/   r_   )r   r:   r(   r?   Úprofiler   r   r   Úflagsr   r   r$   r,   rQ   rV   r]   rb   rT   r.   © r%   r#   ú<module>rg      sþ   ðØ €€€Ø 
€
€
€
Ø 	€	€	€	Ø €€€Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø #Ð #Ð #Ð #Ð #Ð #Ø €€€ð"ð "ð "ð*0ð 0ð 0ð!ð !ð !ð !ðD
Cð 
Cð 
Cð 
Cðð ð ð7ð 7ð 7ð%ð %ð %ð ˆzÒÐØ€D�F„F€F€F€Fð Ðr%   