ó
    “~i…  ã            	      óì   • S SK Jr  S SKJr  S SKJr  S SKJrJr  S SK	J
r
JrJrJrJr  S SKJr  \
" S5      rSS	/r " S
 S\5      r " S S\\   5      r SSSSSSSSS.               SS jjjrg)é    )Úannotations©Ú	ASTSource)ÚLanguage)ÚJITFunctionÚconstexpr_function)ÚTypeVarÚOptionalÚCallableÚIterableÚUnion)ÚirÚTr   Újitc                  ó6   ^ • \ rS rSrSSU 4S jjjrS rSrU =r$ )ÚGluonASTSourceé   c                ó^   >• [         TU ]  XX45        [        R                  U l        SU l        g )NÚttgir)ÚsuperÚ__init__r   ÚGLUONÚlanguageÚext)ÚselfÚfnÚ	signatureÚ
constexprsÚattrsÚ	__class__s        €Ú_/home/mande/repo/quber/.venv/lib/python3.13/site-packages/triton/experimental/gluon/_runtime.pyr   ÚGluonASTSource.__init__   s$   ø€ Ü‰Ñ˜¨
Ô:Ü Ÿ™ˆŒØˆ�ó    c           
     ó¢  • SSK Jn  SSKJn  [        R
                  " U5      nUR                  5       n	U" U5      n
U
R                  U5      nU	R                  SUR                  U5      5        U	R                  SUR                  UR                  5      5        U	R                  SUR                  UR                  5      5        U	R                  SUR                  UR                  5      5        UR                  S:H  nU(       a8  UR                  b+  U	R                  S	UR                  UR                  5      5        U" U R                   XX#XIS
9n	U	$ )Nr   )Úmake_backend)Úast_to_ttirz
ttg.targetzttg.num-warpszttg.num-ctaszttg.threads-per-warpÚcudazttg.maxnreg)ÚcontextÚoptionsÚcodegen_fnsÚ
module_mapÚmodule)Útriton.compiler.compilerr%   Útriton.compiler.code_generatorr&   r   ÚbuilderÚcreate_moduleÚget_target_nameÚset_attrÚget_string_attrÚget_int32_attrÚ	num_warpsÚnum_ctasÚ	warp_sizeÚbackend_nameÚmaxnregr   )r   Útargetr)   r*   r+   r(   r%   r&   r/   r,   ÚbackendÚis_cudas               r!   Úmake_irÚGluonASTSource.make_ir   s  € Ý9Ý>ä—*’*˜WÓ%ˆØ×&Ñ&Ó(ˆñ ˜vÓ&ˆØ×(Ñ(¨Ó1ˆà�‰˜ g×&=Ñ&=¸fÓ&EÔFØ�‰˜¨×)?Ñ)?À×@QÑ@QÓ)RÔSØ�‰˜¨×(>Ñ(>¸w×?OÑ?OÓ(PÔQØ�‰Ð.°×0FÑ0FÀw×GXÑGXÓ0YÔZà×&Ñ&¨&Ñ0ˆÞ�w—‘Ñ2Ø�O‰O˜M¨7×+AÑ+AÀ'Ç/Á/Ó+RÔSá˜TŸW™W dÀWØ(2ñCˆàˆr#   )r   r   )NN)ÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r=   Ú__static_attributes__Ú__classcell__©r    s   @r!   r   r      s   ø† ÷ñ ÷
ð r#   r   c                  ó.   ^ • \ rS rSrU 4S jrS rSrU =r$ )ÚGluonJITFunctioné-   c                ó:   >• [         TU ]  5       n[        U l        U$ ©N)r   Úcreate_binderr   r   )r   Úresultr    s     €r!   rM   ÚGluonJITFunction.create_binder/   s   ø€ Ü‘Ñ&Ó(ˆÜ'ˆŒØˆr#   c                ó   • g)NT© )r   s    r!   Úis_gluonÚGluonJITFunction.is_gluon4   s   € Ør#   r   )rA   rB   rC   rD   rM   rR   rE   rF   rG   s   @r!   rI   rI   -   s   ø† õ÷
ð r#   rI   N)ÚversionÚreprÚlaunch_metadataÚdo_not_specializeÚdo_not_specialize_on_alignmentÚdebugÚnoinlinec               óF   ^^^^^^^• SUUUUUUU4S jjnU b  U" U 5      $ U$ )a  
Decorator for JIT-compiling a function using the Triton compiler.

:note: When a jit'd function is called, arguments are
    implicitly converted to pointers if they have a :code:`.data_ptr()` method
    and a `.dtype` attribute.

:note: This function will be compiled and run on the GPU. It will only have access to:

       * python primitives,
       * builtins within the triton package,
       * arguments to this function,
       * other jit'd functions

:param fn: the function to be jit-compiled
:type fn: Callable
c                óH   >• [        U 5      (       d   e[        U TTTTTTTS9$ )N)rT   rW   rX   rY   rZ   rU   rV   )ÚcallablerI   )r   rY   rW   rX   rV   rZ   rU   rT   s    €€€€€€€r!   Ú	decoratorÚjit.<locals>.decoratorU   s6   ø€ Ü˜�|‰|Ðˆ|ÜØØØ/Ø+IØØØØ+ñ	
ð 		
r#   )r   r   r?   zJITFunction[T]rQ   )	r   rT   rU   rV   rW   rX   rY   rZ   r^   s	    ``````` r!   r   r   8   s&   þ€ ÷:
õ 
ð 
�~Ù˜‹}Ðð Ðr#   rL   )r   zOptional[T]rU   úOptional[Callable]rV   r`   rW   úOptional[Iterable[int | str]]rX   ra   rY   úOptional[bool]rZ   rb   r?   z9Union[GluonJITFunction[T], Callable[[T], JITFunction[T]]])Ú
__future__r   r-   r   Útriton.backends.compilerr   Útriton.runtime.jitr   r   Útypingr	   r
   r   r   r   Útriton._C.libtritonr   r   Ú__all__r   rI   r   rQ   r#   r!   Ú<module>ri      s¿   ðÝ "Ý .Ý -ß >ß ?Õ ?Ý "áˆCƒL€à Ð
'€ô�Yô ô@�{ 1‘~ô ð ð.ð Ø#Ø*.Ø7;ØDHØ Ø#ñ.Øð.ð ð	.ð
 (ð.ð 5ð.ð %Bð.ð ð.ð ð.ð ?÷.r#   