
    Ji6                         % S SK JrJr  S SKJr   " S S\5      r " S S\5      r " S S5      r\" 5       r\" S	\S
9r	\\   \
S	'   S\SS4S jr " S S5      r\" \5      rS\\   SS4S jrg)    )OptionalProtocol)
ContextVarc                   "    \ rS rSrS\4S jrSrg)Buffer   returnc                     g N selfs    \/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/triton/runtime/_allocation.pydata_ptrBuffer.data_ptr           r   N)__name__
__module____qualname____firstlineno__intr   __static_attributes__r   r   r   r   r      s    # r   r   c                   4    \ rS rSrS\S\S\\   S\4S jrSrg)		Allocator   size	alignmentstreamr	   c                     g r   r   r   r   r   r   s       r   __call__Allocator.__call__   r   r   r   N	r   r   r   r   r   r   r   r"   r   r   r   r   r   r      s'    S S (3- F r   r   c                   4    \ rS rSrS\S\S\\   S\4S jrSrg)	NullAllocator   r   r   r   r	   c                     [        S5      e)NzxKernel 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   Nr$   r   r   r   r&   r&      s,    PS PS P(3- PF Pr   r&   
_allocator)default	allocatorr	   Nc                 .    [         R                  U 5        g)zt
The allocator function is called during kernel launch for kernels that
require additional global memory workspace.
N)r+   setr-   s    r   set_allocatorr1      s    
 NN9r   c                   j    \ rS rSrSrS\SS4S jrS\4S jrS\SS4S jrS	\	S
\	S\
\	   S\4S jrSrg)_AllocatorWrapper%   z
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.
r-   r	   Nc                     Xl         g r   r+   r   r-   s     r   __init___AllocatorWrapper.__init__+       #r   c                     U R                   $ r   r6   r   s    r   get_AllocatorWrapper.get.   s    r   c                     Xl         g r   r6   r7   s     r   r/   _AllocatorWrapper.set1   r:   r   r   r   r   c                 &    U R                  XU5      $ r   r6   r!   s       r   r"   _AllocatorWrapper.__call__4   s    t77r   r6   )r   r   r   r   __doc__r   r8   r<   r/   r   r   r   r"   r   r   r   r   r3   r3   %   s^    
$) $ $Y $Y $4 $8S 8S 8(3- 8F 8r   r3   c                 J    [         R                  U b  U 5        g[        5        g)z|
The profile allocator function is called before kernel launch for kernels
that require additional global memory workspace.
N)_profile_allocatorr/   _NULL_ALLOCATORr0   s    r   set_profile_allocatorrF   ;   s    
 	(=9S?Sr   )typingr   r   contextvarsr   r   r   r&   rE   r+   __annotations__r1   r3   rD   rF   r   r   r   <module>rJ      s    % % "X  P P  /$.|_$U
Jy! UY 4 8 8& '7 TXi%8 TT Tr   