o
    oÇh  ã                   @   s`   U d dl mZmZ G dd„ deƒZG dd„ deƒZG dd„ dƒZeƒ aeed< d	efd
d„ZdS )é    )ÚOptionalÚProtocolc                   @   s   e Zd Zdefdd„ZdS )ÚBufferÚreturnc                 C   ó   d S ©N© )Úselfr   r   ún/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/triton/runtime/_allocation.pyÚdata_ptr   ó   zBuffer.data_ptrN)Ú__name__Ú
__module__Ú__qualname__Úintr   r   r   r   r
   r      s    r   c                   @   ó*   e Zd Zdededee defdd„ZdS )Ú	AllocatorÚsizeÚ	alignmentÚstreamr   c                 C   r   r   r   ©r	   r   r   r   r   r   r
   Ú__call__   r   zAllocator.__call__N©r   r   r   r   r   r   r   r   r   r   r
   r   
   ó    "r   c                   @   r   )ÚNullAllocatorr   r   r   r   c                 C   s   t dƒ‚)NzxKernel requires a runtime memory allocation, but no allocator was set. Use triton.set_allocator to specify an allocator.)ÚRuntimeErrorr   r   r   r
   r      s   zNullAllocator.__call__Nr   r   r   r   r
   r      r   r   Ú
_allocatorÚ	allocatorc                 C   s   | a dS )z€
    The allocator function is called during kernel launch for kernels that
    require additional global memory workspace.
    N)r   )r   r   r   r
   Úset_allocator   s   r   N)	Útypingr   r   r   r   r   r   Ú__annotations__r   r   r   r   r
   Ú<module>   s    