
    9i                     4   S SK Jr  S SKJr  S SKJr  S SKJ	r	  S SK
Jr  SSKJr  \	\S.r \S	   1rS
 rS\4S jrS\4S jrS\R(                  S\R(                  4S jr\SS\R(                  4S jj5       r\SS\R(                  4S jj5       r " S S5      rg)    )core)builtin)proton)TritonSemantic)GluonSemantic   )get_instrumentation_on)tritongluonr   c                 |    [        U [        [        5      5      (       d  [        S[	        U 5       S[         35      eg )NzUnsupported semantic type: z. Supported semantics are: )
isinstancetuple
_SEMANTICS	TypeErrortype)semantics    X/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/triton/profiler/language.py_check_supported_semanticr      sE    hj 1225d8n5E F44><A B 	B 3    semantic_namec                 <    [         R                  [        U    5        g N)r   add_ALL_SEMANTICSr   s    r   enable_semanticr      s    NN>-01r   c                 <    [         R                  [        U    5        g r   )r   remover   r   s    r   disable_semanticr       s    n]34r   is_start
scope_namec                 8   [        5       (       d  g [        U5        [        R                  " U 5      n [        R                  " U5      nUR                  R                  5       n[        R                  " [        R                  " X0U5      [        R                  5      $ r   )
r	   r   tl_unwrap_if_constexprbuilderget_op_buildertensortriton_protoncreate_proton_recordvoid)r    r!   r   
op_builders       r   recordr,   $   so    !##h'&&x0H((4J!!002J99]77
jY[][b[bccr   Nnamec                     [        SXS9  g )NTr    r!   r   r,   r-   	_semantics     r   enter_scoper3   .   s    
DT>r   c                     [        SXS9  g )NFr/   r0   r1   s     r   
exit_scoper5   3   s    
Ed?r   c                   2    \ rS rSrSS\4S jjrS rS rSrg)	scope8   Nr-   c                     Xl         X l        g r   r-   r   )selfr-   r2   s      r   __init__scope.__init__:   s    	!r   c                 @    [        U R                  U R                  S9  g N)r2   )r3   r-   r   )r;   s    r   	__enter__scope.__enter__>   s    DII7r   c                 @    [        U R                  U R                  S9  g r?   )r5   r-   r   )r;   exc_type	exc_value	tracebacks       r   __exit__scope.__exit__A   s    4996r   r:   r   )	__name__
__module____qualname____firstlineno__strr<   r@   rF   __static_attributes__ r   r   r7   r7   8   s    "S "87r   r7   r   )triton.languager   r#   triton.language.corer   triton._C.libtritonr   r(   triton.language.semanticr   ,triton.experimental.gluon.language._semanticr   flagsr	   r   r   r   rL   r   r   	constexprr,   r3   r5   r7   rN   r   r   <module>rV      s    & ( 7 3 F )  W%&
B23 25C 5dR\\ dr|| d 	?bll ? 	? 	@R\\ @ 	@
7 
7r   