+
    ‹°³j   ã                   óà   a € R t0 t ^ RIHtHt ^ RIHt  ! R R]4      t ! R R]4      t ! R R4      t]! 4       t	]! R	]	R
7      t
] ^ k R R lt ! R R4      t]! ]	4      tR R ltR R ltR# )é    )ÚOptionalÚProtocol)Ú
ContextVarc                   ó2   a € ] tR t^t o V 3R lR ltRtV tR# )ÚBufferc                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn)Úint)ÚformatÚ__classdict__s   "€Ú[/home/luca/screen-checking/.venv/lib/python3.14/site-packages/triton/runtime/_allocation.pyÚ__annotate__ÚBuffer.__annotate__   s   ø€ ÷ ñ ™#ñ ó    c                ó   € R # ©N© ©Úselfs   &r   Údata_ptrÚBuffer.data_ptr   ó   € Ùr   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__static_attributes__Ú__classdictcell__©r   s   @r   r   r      ó   ø‡ € ÷ö r   r   c                   ó2   a € ] tR t^t o V 3R lR ltRtV tR# )Ú	Allocatorc                óB   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[/# ©r
   ÚsizeÚ	alignmentÚstreamr   ©r   r   r   )r   r   s   "€r   r   ÚAllocator.__annotate__   s-   ø€ ÷ ñ ™Sð ©Sð ¹(Á3½-ð ÉFñ r   c                ó   € R # r   r   ©r   r'   r(   r)   s   &&&&r   Ú__call__ÚAllocator.__call__   r   r   r   N©r   r   r   r   r.   r   r    r!   s   @r   r$   r$      r"   r   r$   c                   ó2   a € ] tR t^t o V 3R lR ltRtV tR# )ÚNullAllocatorc                óB   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[/# r&   r*   )r   r   s   "€r   r   ÚNullAllocator.__annotate__   s3   ø€ ÷ Pñ P™Sð P©Sð P¹(Á3½-ð PÉFñ Pr   c                ó   € \        R4      h)zGKernel requires a runtime memory allocation, but no allocator was set. zxKernel requires a runtime memory allocation, but no allocator was set. Use triton.set_allocator to specify an allocator.)ÚRuntimeErrorr-   s   &&&&r   r.   ÚNullAllocator.__call__   s   € Üð Oó Pð 	Pr   r   Nr0   r!   s   @r   r2   r2      s   ø‡ € ÷Pö Pr   r2   Ú
_allocator)Údefaultc                ó(   € V ^8„  d   QhR\         RR/# ©r
   Ú	allocatorr   N©r$   )r   s   "r   r   r      s   € ÷ ñ œYð ¨4ñ r   c                ó0   € \         P                  V 4       R# )zt
The allocator function is called during kernel launch for kernels that
require additional global memory workspace.
N)r8   Úset©r<   s   &r   Úset_allocatorrA      s   € ô
 ‡N�N�9Ör   c                   ól   a € ] tR t^%t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltR
t	V t
R# )Ú_AllocatorWrapperz™
Wrapper to provide ContextVar-like .get()/.set() methods. profile_allocator is
used in same way as allocator so it is useful to maintain the interface.
c                ó$   <€ V ^8„  d   QhRS[ RR/# r;   r=   )r   r   s   "€r   r   Ú_AllocatorWrapper.__annotate__+   s   ø€ ÷ $ñ $¡)ð $°ñ $r   c                ó   € Wn         R # r   ©r8   ©r   r<   s   &&r   Ú__init__Ú_AllocatorWrapper.__init__+   ó   € Ø#Žr   c                ó    <€ V ^8„  d   QhRS[ /# r	   r=   )r   r   s   "€r   r   rE   .   s   ø€ ÷ ñ ‘Yñ r   c                ó   € V P                   # r   rG   r   s   &r   ÚgetÚ_AllocatorWrapper.get.   s   € Ø�‰Ðr   c                ó$   <€ V ^8„  d   QhRS[ RR/# r;   r=   )r   r   s   "€r   r   rE   1   s   ø€ ÷ $ñ $™Yð $¨4ñ $r   c                ó   € Wn         R # r   rG   rH   s   &&r   r?   Ú_AllocatorWrapper.set1   rK   r   c                óB   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[/# r&   r*   )r   r   s   "€r   r   rE   4   s-   ø€ ÷ 8ñ 8™Sð 8©Sð 8¹(Á3½-ð 8ÉFñ 8r   c                ó&   € V P                  WV4      # r   rG   r-   s   &&&&r   r.   Ú_AllocatorWrapper.__call__4   s   € Ø�‰˜t°Ó7Ð7r   rG   N)r   r   r   r   Ú__doc__rI   rN   r?   r.   r   r    r!   s   @r   rC   rC   %   s2   ø‡ € ñ÷
$ð $÷ð ÷$ð $÷8ö 8r   rC   c                ó>   € V ^8„  d   QhR\         \        ,          RR/# r;   )r   r$   )r   s   "r   r   r   ;   s#   € ÷ Tñ T¤X¬iÕ%8ð T¸Tñ Tr   c                óP   € \         P                  V e	   V 4       R# \        4       R# )z|
The profile allocator function is called before kernel launch for kernels
that require additional global memory workspace.
N)Ú_profile_allocatorr?   Ú_NULL_ALLOCATORr@   s   &r   Úset_profile_allocatorr[   ;   s   € ô
 ×Ñ¨	Ò(=˜9ÖSÄ?ÖSr   c                ó$   € V ^8„  d   QhR\         /# r	   )Úbool)r   s   "r   r   r   C   s   € ÷ Cñ Cœtñ Cr   c                  óP   € \        \        P                  4       \        4      '       * # r   )Ú
isinstancerY   rN   r2   r   r   r   Úhas_profile_allocatorr`   C   s   € ÜÔ,×0Ñ0Ó2´MÓBÔBÐBr   c                óV   € V ^8„  d   Qh/ ^ \         9   d   \        \        ,          ;R&   # )r
   r8   )Ú__conditional_annotations__r   r$   )r   s   "r   r   r      s    € × %Ñ %÷2 VÒ UŒJ”yÕ!Ñ Uò3 &r   N)rb   Útypingr   r   Úcontextvarsr   r   r$   r2   rZ   r8   rA   rC   rY   r[   r`   r   )rb   s   @r   Ú<module>re      ss   øðß %Ô %Ý "ôˆXô ô�ô ÷Pñ Pñ  “/€á$.¨|À_Ô$U€
Ó Uõ÷8ñ 8ñ& ' Ó7Ð õT÷Cr   