o
    oh                     @   sL   d dl mZ ddlmZ G dd deZG dd deZG dd	 d	eZd
S )   )TritonError    )Optionalc                   @   .   e Zd Zddee fddZdefddZdS )	InterpreterErrorNerror_messagec                 C   
   || _ d S Nr   selfr    r   i/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/triton/runtime/errors.py__init__      
zInterpreterError.__init__returnc                 C   s
   | j pdS )N r
   r   r   r   r   __str__
   r   zInterpreterError.__str__r	   __name__
__module____qualname__r   strr   r   r   r   r   r   r          r   c                   @   s*   e Zd Zdd ZdefddZdd ZdS )	OutOfResourcesc                 C   s   || _ || _|| _d S r	   )requiredlimitname)r   r   r   r   r   r   r   r      s   
zOutOfResources.__init__r   c                 C   s   d| j  d| j d| j dS )Nzout of resource: z, Required: z, Hardware limit: z0. Reducing block sizes or `num_stages` may help.)r   r   r   r   r   r   r   r      s   zOutOfResources.__str__c                 C   s   t | | j| j| jffS r	   )typer   r   r   r   r   r   r   
__reduce__   s   zOutOfResources.__reduce__N)r   r   r   r   r   r   r    r   r   r   r   r      s    r   c                   @   r   )	
PTXASErrorNr   c                 C   r   r	   r
   r   r   r   r   r      r   zPTXASError.__init__r   c                 C   s   | j pd}d| S )Nr   zPTXAS error: r
   r   r   r   r   r   "   s   

zPTXASError.__str__r	   r   r   r   r   r   r!      r   r!   N)errorsr   typingr   r   r   r!   r   r   r   r   <module>   s
    	