+
    ړLj                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^RIHtHtHt ^RI	H	t	 R t
R tR tR tR tR	 t]R
8X  d
   ]! 4        R# R# )    N)startfinalize_select_backend)flagsc            	         \         P                  ! R R\         P                  R7      p V P                  RR\        RR7       V P                  RR\        R	R
. R!OR7       V P                  RR\        RRRR.R7       V P                  RR\        RR
R7       V P                  RR\        RRRR.R7       V P                  RR\        RR
R
R.R7       V P                  R\         P
                  RR 7       V P                  4       pWP                  3# )"zBThe 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 backendN)r   r   defaultchoicesz-cz	--contextzProfiling contextshadowpythonz-mz--modezProfiling mode)r   r   r   z-dz--datazProfiling datatreetracez-kz--hookzProfiling hooktritontarget_argszSubcommand and its arguments)nargsr   )cupti	roctracerinstrumentation)argparseArgumentParserRawTextHelpFormatteradd_argumentstr	REMAINDER
parse_argsr   )parserargss     B/app/.local/lib/python3.14/site-packages/triton/profiler/proton.pyparse_argumentsr#   
   s&   $$X a 224F hS7VW
k:MW[ I  K
k:MW_!)8 4  6
hS7GQUV
hS7GQWbhjqars
hS7GQU`dfn_op
X-?-?FdeD!!!!    c                 F    \         P                  P                  V 4      R 8H  # )pytest)ospathbasename)scripts   &r"   	is_pytestr+      s    77F#x//r$   c                 z   \         P                  P                  V 4      p\        P                  pV .V,           \        n        \        P                  P                  \         P                  P                  V4      4        \        P                  ! V R R7        T\        n        ^ #   \         d8   p\        R4       \        P                  ! T4        Rp?T\        n        ^# Rp?i\         d"   pTP                  u Rp?T\        n        # Rp?i\         d     T\        n        ^# i ; i  T\        n        i ; i)__main__)run_namez-An error occurred while executing the script:N)r'   r(   abspathsysargvappenddirnamerunpyrun_path	Exceptionprint	tracebackprint_exception
SystemExitcodeKeyboardInterrupt)r*   r!   script_pathoriginal_argves   &&   r"   execute_as_mainr@   "   s    ''//&)KHHMx$CHHHOOBGGOOK01!v
3 !  =>!!!$ !  vv !    !sZ    B& &D*1!C#D- #D*0D*1D<D*=D- D*D*D- )D**D- -D:c                     R \         n        V ^ ,          p\        V 4      ^8  d
   V R,          M. p\        V4      '       d   ^ RIpVP                  V4      # \        W4      # )T:   NNN)r   command_linelenr+   r&   mainr@   )r   r*   script_argsr&   s   &   r"   do_setup_and_executerG   :   sR    E^F%(%5%9+b/rK{{;''v33r$   c                    V P                   '       d   V P                   M	\        4       p\        V P                  V P                  V P
                  W P                  R 7       \        V4      p\        4        \        P                  ! V4       R# ))contextdatabackendhookN)rK   r   r   namerI   rJ   rL   rG   r   r0   exit)r!   r   rK   exitcodes   &&  r"   run_profilingrP   G   sS    "llldll0AG	$))T\\		7QZQZ[#K0HJHHXr$   c                  4    \        4       w  r\        W4       R # )N)r#   rP   )r!   r   s     r"   rE   rE   R   s    ')D$$r$   r-   )r   r0   r'   r4   r8   profiler   r   r   r   r#   r+   r@   rG   rP   rE   __name__ r$   r"   <module>rU      sO     
 	   5 5 "(00
4%
 zF r$   