Ë
    7^(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«        yy)é    Né   )ÚstartÚfinalizeÚ_select_backend)Úset_command_linec            	      ó   — t        j                  ddt         j                  ¬«      } | j                  ddt        d¬«       | j                  dd	t        d
d g d¢¬«       | j                  ddt        ddddg¬«       | j                  ddt        dddg¬«       | j                  ddt        dd d dg¬«       | j                  ddt        dd d dg¬«       | j                  dt         j
                  d¬ «       | j                  «       }||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     úT/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/triton/profiler/proton.pyÚparse_argumentsr$   
   s2  € Ü×$Ñ$ØXð aô ×2Ñ2ô4€Fð ×Ñ˜˜h¬SÐ7VÐÔWØ
×Ñ˜˜k´Ð:MÐW[Ú Jð ô Là
×Ñ˜˜k´Ð:MÐW_Ø!)¨8Ð 4ð ô 6à
×Ñ˜˜h¬SÐ7GÐQWÐbhÐaiÐÔjØ
×Ñ˜˜h¬SÐ7GÐQUÐ`dÐfnÐ_oÐÔpØ
×Ñ˜˜n´3Ð=\ÐfjØ!%Ð'9Ð :ð ô <à
×Ñ˜¬X×-?Ñ-?ÐFdÐÔeØ×ÑÓ€DØ�×!Ñ!Ð!Ð!ó    c                 óF   — t         j                  j                  | «      dk(  S )NÚpytest)ÚosÚpathÚbasename)Úscripts    r#   Ú	is_pytestr,      s   € Ü�7‰7×Ñ˜FÓ# xÑ/Ð/r%   c                 óŒ  — t         j                  j                  | «      }ddd|dt        t        j
                  t        i}t        j                  }| g|z   t        _        t        j                  j                  t         j                  j                  |«      «       t         j                  j                  t        j                  «      }|dk(  rpt        t        t        j                  |«      j                  d«      d «      «      }dt         j                   d<   d	t         j                   d
<   |t         j                   d<   	 t#        |d«      5 }t%        |j'                  «       |d«      }	d d d «       t)        	|«       |t        _        y # 1 sw Y   Œ!xY w# t*        $ r}
t-        d|
› �«       Y d }
~
Œ4d }
~
ww xY w# |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   #   sa  € Ü—'‘'—/‘/ &Ó)€Kð 	�JØ�KØœÜ�‰”cð	€Mô —H‘H€MØˆx˜$‰„C„Hä‡H�H‡O�O”B—G‘G—O‘O KÓ0Ô1ÜŸG™GŸO™O¬F¯O©OÓ<ÐàÐ1Ò1Ü$'Ü”—‘Ð3Ó4×:Ñ:Ð;ZÓ[Ð]aÓbó%dÐ!à.1Œ�
‰
Ð*Ñ+Ø14Œ�
‰
Ð-Ñ.Ø.GŒ�
‰
Ð*Ñ+ð!Ü�+˜tÓ$ð 	=¨Ü˜4Ÿ9™9›;¨°VÓ<ˆD÷	=äˆT�=Ô!ð !Œ�÷	=ð 	=ûô ò DÜÐ>¸q¸cÐB×CÑCûðDûð !Œ�úsB   Ä>F Å
FÅ&F ÆFÆF Æ	F3ÆF.Æ)F6 Æ.F3Æ3F6 Æ6Gc                 ó¨   — t        «        | d   }t        | «      dkD  r| dd  ng }t        |«      rdd l}|j	                  |«       y t        |||«       y )Nr   r   )r   Úlenr,   r'   ÚmainrQ   )r   rH   r+   Úscript_argsr'   s        r#   Údo_setup_and_executerV   E   sN   € äÔà˜‰^€FÜ%(¨Ó%5¸Ò%9�+˜a˜b‘/¸r€KÜ�ÔÛØ�‰�KÕ ä˜ Ð-AÕBr%   c                 óâ   — | j                   r| j                   n	t        «       }t        | j                  | j                  | j
                  || j                  ¬«       t        |«       t        «        y )N)ÚcontextÚdataÚbackendÚhook)	rZ   r   r   ÚnamerX   rY   r[   rV   r   )r"   r   rZ   s      r#   Úrun_profilingr]   R   sF   € Ø"Ÿlšlˆd�lŠl´Ó0A€Gä	ˆ$�)‰)˜TŸ\™\°·	±	À7ÐQU×QZÑQZÕ[ä˜Ô%ä…Jr%   c                 ó0   — t        || j                  «       y ©N)rV   Ú
instrument©r"   r   s     r#   Úrun_instrumentationrb   \   s   € Ü˜ d§o¡oÕ6r%   c                  óh   — t        «       \  } }| j                  rt        | |«       y t        | |«       y r_   )r$   r`   rb   r]   ra   s     r#   rT   rT   `   s-   € Ü'Ó)Ñ€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      sV   ðÛ Û 
Û 	Û ß 5Ñ 5Ý #Û ò"ò*0ó!óD
Còò7ò%ð ˆzÒÙ…Fð r%   