o
    oh                     @   s.   d dl mZ dZdd Zdee fddZdS )	    )Listi   c                 C   s   | | d @ dkS )N   r    )xr   r   j/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/triton/language/_utils.pyis_power_of_two   s   r   shapec                 C   s|   d}t | D ]&\}}t|tstd| dt| dt|s(td| d||9 }q|tkr<td| dt d|S )	Nr   zShape element z1 must have type `constexpr[int]`, got `constexpr[]z must be a power of 2znumel (z') exceeds triton maximum tensor numel ())	enumerate
isinstanceint	TypeErrortyper   
ValueErrorTRITON_MAX_TENSOR_NUMEL)r   numelidr   r   r   validate_block_shape
   s   

r   N)typingr   r   r   r   r   r   r   r   r   <module>   s    